diff options
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test')
77 files changed, 4301 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml new file mode 100644 index 000000000..e88468971 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml @@ -0,0 +1,313 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.archiva</groupId> + <artifactId>archiva-web</artifactId> + <version>1.0-alpha-3-SNAPSHOT</version> + </parent> + <artifactId>archiva-webapp-test</artifactId> + <packaging>pom</packaging> + <name>Archiva Web :: Application Tests</name> + <dependencies> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-command-line</artifactId> + </dependency> + <dependency> + <groupId>org.apache.archiva</groupId> + <artifactId>archiva-webapp</artifactId> + <type>war</type> + </dependency> + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-web-ui-tests</artifactId> + <version>1.0-SNAPSHOT</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + </dependency> + + <!-- Dependency for MavenConnectionTest --> + <dependency> + <groupId>jdom</groupId> + <artifactId>jdom</artifactId> + </dependency> + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + </dependency> + + <!-- Dependencies below are provided by the appserver --> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + </dependency> + <dependency> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + </dependency> + <dependency> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + </dependency> + </dependencies> + + <build> + <testSourceDirectory>src/test/it</testSourceDirectory> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>dependency-maven-plugin</artifactId> + <executions> + <execution> + <id>unzip-archiva-webapp</id> + <phase>generate-resources</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>archiva-webapp</artifactId> + <version>${project.version}</version> + <type>war</type> + </artifactItem> + </artifactItems> + <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory> + </configuration> + </execution> + <execution> + <id>prepare-provided-dependencies</id> + <phase>generate-resources</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <excludeTransitive>false</excludeTransitive> + <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy todir="${project.build.directory}/appserver-base"> + <fileset dir="src/test/resources/appserver-base" /> + </copy> + <copy todir="${project.build.directory}/repository"> + <fileset dir="src/test/resources/repository" /> + </copy> + <copy todir="${project.build.directory}/index"> + <fileset dir="src/test/resources/index" /> + </copy> + <copy todir="${project.build.directory}/snapshots"> + <fileset dir="src/test/resources/snapshots" /> + </copy> + <copy todir="${project.build.directory}/projects"> + <fileset dir="src/test/resources/projects" /> + </copy> + <copy todir="${project.build.directory}/local-repo"> + <fileset dir="src/test/resources/local-repo" /> + </copy> + </tasks> + </configuration> + </execution> + <execution> + <id>copy-container-conf</id> + <phase>package</phase> + <configuration> + <tasks> + <copy todir="${project.build.directory}/${container.name}conf"> + <fileset dir="src/test/${container.name}"/> + </copy> + <copy + todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.20/apache-tomcat-5.5.20/common/lib"> + <fileset dir="${project.build.directory}/providedDependencies"> + <include name="**/*.jar"/> + </fileset> + </copy> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> + <id>check-archiva-loaded</id> + <phase>integration-test</phase> + <configuration> + <tasks> + <get src="http://localhost:9696/archiva/" dest="${project.build.directory}/index.html"/> + <delete file="${project.build.directory}/index.html"/> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>testCompile</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>selenium-maven-plugin</artifactId> + <version>1.0-beta-1</version> + <executions> + <execution> + <id>start-selenium</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start-server</goal> + </goals> + </execution> + </executions> + <configuration> + <background>true</background> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <executions> + <execution> + <id>start-container</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-container</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + <configuration> + <wait>false</wait> + <container> + <containerId>${container.name}</containerId> + <zipUrlInstaller> + <url>${container.url}</url> + <installDir>${project.build.directory}/installs/${container.name}</installDir> + </zipUrlInstaller> + <log>${project.build.directory}/logs/${container.name}.log</log> + <output>${project.build.directory}/logs/${container.name}.out</output> + <timeout>600000</timeout> + <systemProperties> + <appserver.base>${project.build.directory}/appserver-base</appserver.base> + </systemProperties> + </container> + <configuration> + <home>${project.build.directory}/${container.name}conf</home> + <type>existing</type> + <properties> + <cargo.servlet.port>9696</cargo.servlet.port> + </properties> + </configuration> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <phase>integration-test</phase> + <goals> + <goal>test</goal> + </goals> + </execution> + </executions> + <configuration> + <systemProperties> + <property> + <name>browser</name> + <value>${browser}</value> + </property> + </systemProperties> + </configuration> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>tomcat5x</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <container.name>tomcat5x</container.name> + <container.url>http://apache.multidist.com/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.zip</container.url> + </properties> + </profile> + + <profile> + <id>firefox</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <browser>*firefox</browser> + </properties> + </profile> + <profile> + <id>iexplore</id> + <properties> + <browser>*iexplore</browser> + </properties> + </profile> + <profile> + <id>otherbrowser</id> + <properties> + <browser>*custom ${browserPath}</browser> + </properties> + </profile> + </profiles> + +</project> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java new file mode 100644 index 000000000..de0db4e7e --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java @@ -0,0 +1,90 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.maven.shared.web.test.AbstractSeleniumTestCase; + +/** + * @author Edwin Punzalan + */ +public abstract class AbstractArchivaTestCase + extends AbstractSeleniumTestCase +{ + private String baseUrl = "http://localhost:9696/archiva"; + + protected String getApplicationName() + { + return "Archiva"; + } + + protected String getInceptionYear() + { + return "2005"; + } + + protected void postAdminUserCreation() + { + if ( getTitle().equals( getTitlePrefix() + "Configuration" ) ) + { + //Add Managed Repository + setFieldValue( "id", "test-repository" ); + setFieldValue( "urlName", "test-repository" ); + setFieldValue( "name", "Web UI Test Managed Repository" ); + setFieldValue( "directory", getBasedir() + "/target/repository" ); + clickButtonWithValue( "Add Repository" ); + + //Set Index location + assertPage( "Configuration" ); + setFieldValue( "indexPath", getBasedir() + "/target/index" ); + clickButtonWithValue( "Save Configuration" ); + assertPage( "Administration" ); + } + } + + public void assertHeader() + { + assertTrue( "banner is missing", getSelenium().isElementPresent( "xpath=//div[@id='banner']" ) ); + assertTrue( "bannerLeft is missing", + getSelenium().isElementPresent( "xpath=//div[@id='banner']" + "/span[@id='bannerLeft']" ) ); + assertTrue( "bannerLeft link is missing", getSelenium().isElementPresent( + "xpath=//div[@id='banner']" + "/span[@id='bannerLeft']/a[@href='http://maven.apache.org/archiva/']" ) ); + assertTrue( "bannerLeft img is missing", getSelenium().isElementPresent( "xpath=//div[@id='banner']" + + "/span[@id='bannerLeft']/a[@href='http://maven.apache.org/archiva/']" + "/img[@src='" + getWebContext() + + "/images/archiva.png']" ) ); + + assertTrue( "bannerRight is missing", + getSelenium().isElementPresent( "xpath=//div[@id='banner']/span[@id='bannerRight']" ) ); + } + + protected String getTitlePrefix() + { + return "Maven Archiva :: "; + } + + public String getBaseUrl() + { + return baseUrl; + } + + protected String getWebContext() + { + return "/archiva"; + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java new file mode 100644 index 000000000..a02dc1d6a --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java @@ -0,0 +1,194 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Archiva's webapp UI test for browsing the indexed repository. + * + * @author <a href="mailto:nramirez@exist.com">Napoleon Esmundo C. Ramirez</a> + */ +public class BrowseRepositoryTest + extends AbstractArchivaTestCase +{ + private void browseArtifact() + { + clickLinkWithText( "Browse" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertLinkPresent( "org.apache.maven.archiva.web.test/" ); + + clickLinkWithText( "org.apache.maven.archiva.web.test/" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "Artifacts" ); + assertLinkPresent( "artifact-a/" ); + + clickLinkWithText( "artifact-a/" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "Versions" ); + assertLinkPresent( "1.0/" ); + + clickLinkWithText( "1.0/" ); + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertLinkPresent( "Main" ); + } + + public void testBrowseArtifactInfo() + { + browseArtifact(); + + assertTextPresent( "Info" ); + assertLinkPresent( "Dependencies" ); + assertLinkPresent( "Dependency Tree" ); + assertLinkPresent( "Used By" ); + assertLinkPresent( "Mailing Lists" ); + + assertEquals("Group ID", getSelenium().getTable("//table[1].0.0")); + assertEquals("org.apache.maven.archiva.web.test", getSelenium().getTable("//table[1].0.1")); + assertEquals("Artifact ID", getSelenium().getTable("//table[1].1.0")); + assertEquals("artifact-a", getSelenium().getTable("//table[1].1.1")); + assertEquals("Version", getSelenium().getTable("//table[1].2.0")); + assertEquals("1.0", getSelenium().getTable("//table[1].2.1")); + assertEquals("Packaging", getSelenium().getTable("//table[1].3.0")); + assertEquals("jar", getSelenium().getTable("//table[1].3.1")); + } + + public void testBrowseArtifactDependencies() + { + browseArtifact(); + + clickLinkWithText( "Dependencies" ); + assertLinkPresent( "Info" ); + assertTextPresent( "Dependencies" ); + assertLinkPresent( "Dependency Tree" ); + assertLinkPresent( "Used By" ); + assertLinkPresent( "Mailing Lists" ); + + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertLinkPresent( "artifact-b" ); + } + + public void testBrowseArtifactDependencyTree() + { + browseArtifact(); + + clickLinkWithText( "Dependency Tree" ); + assertLinkPresent( "Info" ); + assertLinkPresent( "Dependencies" ); + assertTextPresent( "Dependency Tree" ); + assertLinkPresent( "Used By" ); + assertLinkPresent( "Mailing Lists" ); + + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertLinkPresent( "artifact-b" ); + assertLinkPresent( "artifact-c" ); + } + + public void testBrowseArtifactUsedBy() + { + browseArtifact(); + + clickLinkWithText( "Used By" ); + assertLinkPresent( "Info" ); + assertLinkPresent( "Dependencies" ); + assertLinkPresent( "Dependency Tree" ); + assertTextPresent( "Used By" ); + assertLinkPresent( "Mailing Lists" ); + + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertLinkPresent( "artifact-s" ); + } + + public void testBrowseArtifactMailingLists() + { + browseArtifact(); + + clickLinkWithText( "Mailing Lists" ); + assertLinkPresent( "Info" ); + assertLinkPresent( "Dependencies" ); + assertLinkPresent( "Dependency Tree" ); + assertLinkPresent( "Used By" ); + assertTextPresent( "Mailing Lists" ); + + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertTextPresent( "No mailing lists" ); + } + + public void testBrowseUpRepositoryDirectory() + { + browseArtifact(); + + assertLinkPresent( "artifact-a" ); + + clickLinkWithText( "artifact-a" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertTextPresent( "Versions" ); + assertLinkPresent( "1.0/" ); + assertLinkPresent( "test" ); + + clickLinkWithText( "test" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "Artifacts" ); + assertLinkPresent( "artifact-a/" ); + assertLinkPresent( "web" ); + + clickLinkWithText( "web" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "Groups" ); + assertLinkPresent( "org.apache.maven.archiva.web.test/" ); + assertLinkPresent( "[top]" ); + + clickLinkWithText( "[top]" ); + assertPage( "Browse Repository" ); + assertTextPresent( "Browse Repository" ); + assertTextPresent( "Groups" ); + assertLinkPresent( "org.apache.maven.archiva.web.test/" ); + } + + public void testBrowseDependencyArtifact() + { + browseArtifact(); + + clickLinkWithText( "Dependencies" ); + assertPage( "Browse Repository" ); + assertTextPresent( "artifact-a" ); + assertLinkPresent( "artifact-b" ); + + clickLinkWithText( "artifact-b" ); + assertEquals("Group ID", getSelenium().getTable("//table[1].0.0")); + assertEquals("org.apache.maven.archiva.web.test", getSelenium().getTable("//table[1].0.1")); + assertEquals("Artifact ID", getSelenium().getTable("//table[1].1.0")); + assertEquals("artifact-b", getSelenium().getTable("//table[1].1.1")); + assertEquals("Version", getSelenium().getTable("//table[1].2.0")); + assertEquals("2.0", getSelenium().getTable("//table[1].2.1")); + assertEquals("Packaging", getSelenium().getTable("//table[1].3.0")); + assertEquals("jar", getSelenium().getTable("//table[1].3.1")); + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java new file mode 100644 index 000000000..6dda27d90 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java @@ -0,0 +1,102 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * @author Edwin Punzalan + */ +public class LoginTest + extends AbstractArchivaTestCase +{ + public void testBadLogin() + { + goToLoginPage(); + submitLoginPage( "badUsername", "badPassword", false ); + assertTextPresent( "You have entered an incorrect username and/or password" ); + } + + public void testUserLogin() + { + createUser( "test-user", "temp-pass" ); + + goToLoginPage(); + submitLoginPage( "test-user", "temp-pass" ); + + // change of password required for new users + if ( getTitle().equals( getTitlePrefix() + "Change Password" ) ) + { + setFieldValue( "existingPassword", "temp-pass" ); + setFieldValue( "newPassword", "p4ssw0rd" ); + setFieldValue( "newPasswordConfirm", "p4ssw0rd" ); + clickButtonWithValue( "Change Password" ); + } + + logout(); + + deleteUser( "test-user" ); + } + + private void createUser( String username, String password ) + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "User Management" ); + //assertPage( "[Admin] User List" ); + //assertLinkNotPresent( username ); + clickButtonWithValue( "Create New User" ); + + //assertPage( "[Admin] User Create" ); + setFieldValue( "user.username", username ); + setFieldValue( "user.fullName", username + " FullName" ); + setFieldValue( "user.email", username + "@localhost.com" ); + setFieldValue( "user.password", password ); + setFieldValue( "user.confirmPassword", password ); + clickButtonWithValue( "Create User" ); + waitPage(); + //assertPage( "[Admin] User List" ); + //assertLinkPresent( username ); + + logout(); + } + + private void deleteUser( String username ) + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "User Management" ); + assertPage( "[Admin] User List" ); + assertLinkPresent( username ); + + //this does not work bec the image is pointing to /archiva/archiva/images/pss/admin/delete.gif + // when ran in selenium + // clickLinkWithXPath( "//a[@href='/security/userdelete.action?username=" + username + "']" ); + //so instead we use this + open( "/archiva/security/userdelete.action?username=" + username ); + + assertPage( "[Admin] User Delete" ); + assertTextPresent( "The following user will be deleted: " + username ); + clickButtonWithValue( "Delete User" ); + assertPage( "[Admin] User List" ); + + logout(); + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java new file mode 100644 index 000000000..b25ae8195 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java @@ -0,0 +1,201 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Archiva's webapp UI test for adding/editing/deleting managed repositories. + * + * @author <a href="mailto:nramirez@exist.com">Napoleon Esmundo C. Ramirez</a> + */ +public class ManagedRepositoryTest + extends AbstractArchivaTestCase +{ + private static final String TEST_REPOSITORY_ID = "test-repository-id"; + + private static final String TEST_REPOSITORY_URL = "test-repository-url"; + + private static final String TEST_REPOSITORY_NAME = "test-repository-name"; + + private static final String TEST_REPOSITORY_DIRECTORY = "test-repository-directory"; + + + private void clickManagedRepositories() + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "Managed Repositories" ); + assertPage( "Administration" ); + assertTextPresent( "Administration" ); + } + + private void createManagedRepository( String id, String url, String name, String directory ) + { + clickManagedRepositories(); + + clickLinkWithText( "Add Repository" ); + assertTextPresent( "Configuration" ); + + setFieldValue( "addRepository_id", id ); + setFieldValue( "urlName", url ); + setFieldValue( "addRepository_name", name ); + setFieldValue( "addRepository_directory", directory ); + + clickButtonWithValue( "Add Repository", false ); + } + + private void removeManagedRepository( String id ) + { + logout(); + + clickManagedRepositories(); + + clickLinkWithLocator( "//a[contains(@href, '/admin/deleteRepository!input.action?repoId=" + id + "')]" ); + clickLinkWithLocator( "deleteRepository_operationdelete-contents", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( TEST_REPOSITORY_ID ); + } + + public void testAddRepositoryWithValidValues() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + + removeManagedRepository( TEST_REPOSITORY_ID ); + } + + public void testAddRepositoryWithInvalidValues() + { + createManagedRepository( "", "", "", "" ); + + assertTextPresent( "You must enter the repository identifier." ); + assertTextPresent( "You must enter the url name." ); + assertTextPresent( "You must enter the repository name." ); + assertTextPresent( "You must enter the repository directory." ); + } + + public void testEditRepositoryWithValidValues() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_NAME ); + + clickLinkWithLocator( "//a[contains(@href, '/admin/editRepository!input.action?repoId=" + TEST_REPOSITORY_ID + "')]" ); + assertPage( "Configuration" ); + assertTextPresent( "Configuration" ); + + assertTextPresent( "Edit Managed Repository" ); + assertEquals( TEST_REPOSITORY_URL, getFieldValue( "urlName" ) ); + assertEquals( TEST_REPOSITORY_NAME, getFieldValue( "editRepository_name" ) ); + assertTrue( getFieldValue( "editRepository_directory" ).endsWith( TEST_REPOSITORY_DIRECTORY ) ); + + setFieldValue( "urlName", "edited-" + TEST_REPOSITORY_URL ); + setFieldValue( "editRepository_name", "edited-" + TEST_REPOSITORY_NAME ); + setFieldValue( "editRepository_directory", "edited-" + TEST_REPOSITORY_DIRECTORY ); + + clickButtonWithValue( "Update Repository" ); + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + assertTextPresent( "edited-" + TEST_REPOSITORY_NAME ); + + removeManagedRepository( TEST_REPOSITORY_ID ); + } + + public void testEditRepositoryWithInvalidValues() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_NAME ); + + clickLinkWithLocator( "//a[contains(@href, '/admin/editRepository!input.action?repoId=" + TEST_REPOSITORY_ID + "')]" ); + assertPage( "Configuration" ); + assertTextPresent( "Configuration" ); + + assertTextPresent( "Edit Managed Repository" ); + assertEquals( TEST_REPOSITORY_URL, getFieldValue( "urlName" ) ); + assertEquals( TEST_REPOSITORY_NAME, getFieldValue( "editRepository_name" ) ); + assertTrue( getFieldValue( "editRepository_directory" ).endsWith( TEST_REPOSITORY_DIRECTORY ) ); + + setFieldValue( "urlName", "" ); + setFieldValue( "editRepository_name", "" ); + setFieldValue( "editRepository_directory", "" ); + + clickButtonWithValue( "Update Repository", false ); + assertTextPresent( "You must enter the url name." ); + assertTextPresent( "You must enter the repository name." ); + assertTextPresent( "You must enter the repository directory." ); + + removeManagedRepository( TEST_REPOSITORY_ID ); + } + + public void testDeleteRepositoryButLeaveUnmodified() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + + clickLinkWithLocator( "//a[contains(@href, '/admin/deleteRepository!input.action?repoId=" + TEST_REPOSITORY_ID + "')]" ); + clickLinkWithLocator( "deleteRepository_operationunmodified", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + + removeManagedRepository( TEST_REPOSITORY_ID ); + } + + public void testDeleteRepositoryAndContents() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + + removeManagedRepository( TEST_REPOSITORY_ID ); + } + + public void testDeleteRepositoryButLeaveContentsUnmodified() + { + createManagedRepository( TEST_REPOSITORY_ID, TEST_REPOSITORY_URL, TEST_REPOSITORY_NAME, TEST_REPOSITORY_DIRECTORY ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( TEST_REPOSITORY_ID ); + + clickLinkWithLocator( "//a[contains(@href, '/admin/deleteRepository!input.action?repoId=" + TEST_REPOSITORY_ID + "')]" ); + clickLinkWithLocator( "deleteRepository_operationdelete-entry", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( TEST_REPOSITORY_ID ); + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/MavenConnectionTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/MavenConnectionTest.java new file mode 100644 index 000000000..a0eb5aebf --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/MavenConnectionTest.java @@ -0,0 +1,397 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.codehaus.plexus.util.cli.CommandLineUtils; +import org.codehaus.plexus.util.cli.Commandline; +import org.codehaus.plexus.util.cli.StreamConsumer; +import org.codehaus.plexus.util.cli.WriterStreamConsumer; +import org.codehaus.plexus.commandline.ExecutableResolver; +import org.codehaus.plexus.commandline.DefaultExecutableResolver; +import org.jdom.input.SAXBuilder; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.output.XMLOutputter; +import org.jdom.xpath.XPath; + +import java.io.File; +import java.io.Writer; +import java.io.FileWriter; +import java.io.FileReader; +import java.io.BufferedReader; +import java.util.List; +import java.util.Collections; + + +/** + * Test maven connection to archiva + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + */ +public class MavenConnectionTest + extends AbstractArchivaTestCase +{ + public static final String PATH_TO_ARCHIVA_XML = "/target/appserver-base/conf/archiva.xml"; + + public static final String PATH_TO_SETTINGS_XML = "/target/local-repo/settings.xml"; + + public static final String NEW_LOCAL_REPO_VALUE = "/target/local-repo"; + + /** + * @throws Exception + */ + public void setUp() + throws Exception + { + super.setUp(); + + String newValue = getBasedir() + NEW_LOCAL_REPO_VALUE; + updateXml( new File( getBasedir(), PATH_TO_ARCHIVA_XML ), newValue ); + updateXml( new File( getBasedir(), PATH_TO_SETTINGS_XML ), newValue ); + } + + /** + * Update localRepository element value + * + * @param f + * @param newValue + * @throws Exception + */ + private void updateXml( File f, String newValue ) + throws Exception + { + SAXBuilder builder = new SAXBuilder(); + FileReader reader = new FileReader( f ); + Document document = builder.build( reader ); + + Element localRepository = + (Element) XPath.newInstance( "./" + "localRepository" ).selectSingleNode( document.getRootElement() ); + localRepository.setText( newValue ); + + // re-write xml file + FileWriter writer = new FileWriter( f ); + XMLOutputter output = new XMLOutputter(); + output.output( document, writer ); + } + + private void clickManagedRepositories() + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "Managed Repositories" ); + assertPage( "Administration" ); + assertTextPresent( "Administration" ); + } + + private void removeManagedRepository( String id ) + { + clickManagedRepositories(); + + clickLinkWithLocator( "//a[contains(@href, '/admin/deleteRepository!input.action?repoId=" + id + "')]" ); + clickLinkWithLocator( "deleteRepository_operationdelete-contents", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + } + + /** + * Click Settings from the navigation menu + */ + private void clickProxiedRepositories() + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "Proxied Repositories" ); + assertPage( "Administration" ); + assertTextPresent( "Proxied Repositories" ); + } + + /** + * Remove the created test repo + */ + protected void removeProxiedRepository() + { + if ( !isLinkPresent( "Login" ) ) + { + logout(); + } + + clickProxiedRepositories(); + + if ( isTextPresent( "Delete Repository " ) ) + { + clickLinkWithText( "Delete Repository" ); + assertPage( "Configuration" ); + clickLinkWithLocator( "deleteProxiedRepository_operationdelete-entry", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( "Test Proxied Repository" ); + } + + logout(); + } + + /** + * Execute 'mvn' from commandline + * + * @param workingDir + * @param outputFile + * @return + * @throws Exception + */ + private int executeMaven( String workingDir, File outputFile ) + throws Exception + { + + ExecutableResolver executableResolver = new DefaultExecutableResolver(); + + String actualExecutable = "mvn"; + File workingDirectory = new File( workingDir ); + + List path = executableResolver.getDefaultPath(); + + if ( path == null ) + { + path = Collections.EMPTY_LIST; + } + + File e = executableResolver.findExecutable( "mvn", path ); + + if ( e != null ) + { + actualExecutable = e.getAbsolutePath(); + } + + File actualExecutableFile = new File( actualExecutable ); + + if ( !actualExecutableFile.exists() ) + { + actualExecutable = "mvn"; + } + + // Set command line + Commandline cmd = new Commandline(); + + cmd.addSystemEnvironment(); + + cmd.addEnvironment( "MAVEN_TERMINATE_CMD", "on" ); + + cmd.setExecutable( actualExecutable ); + + cmd.setWorkingDirectory( workingDirectory.getAbsolutePath() ); + + cmd.createArgument().setValue( "clean" ); + + cmd.createArgument().setValue( "install" ); + + cmd.createArgument().setValue( "-s" ); + + cmd.createArgument().setValue( getBasedir() + "/target/local-repo/settings.xml" ); + + // Excute command + + Writer writer = new FileWriter( outputFile ); + + StreamConsumer consumer = new WriterStreamConsumer( writer ); + + int exitCode = CommandLineUtils.executeCommandLine( cmd, consumer, consumer ); + + writer.flush(); + + writer.close(); + + return exitCode; + } + + public void testBadDependency() + throws Exception + { + File outputFile = new File( getBasedir(), "/target/projects/bad-dependency/bad-dependency.log" ); + int exitCode = executeMaven( getBasedir() + "/target/projects/bad-dependency", outputFile ); + + assertEquals( 1, exitCode ); + + File f = new File( getBasedir(), + "/target/local-repo/org/apache/mavem/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar" ); + assertTrue( !f.exists() ); + + BufferedReader reader = new BufferedReader( new FileReader( outputFile ) ); + String str; + boolean foundSnapshot = false, foundBadDep = false; + + while ( ( str = reader.readLine() ) != null ) + { + //System.out.println( str ); + if ( str.indexOf( + "mvn install:install-file -DgroupId=org.apache.maven.archiva.web.test -DartifactId=foo-bar" ) != -1 ) + { + foundSnapshot = true; + } + else if ( str.indexOf( + "mvn install:install-file -DgroupId=org.apache.maven.archiva.web.test -DartifactId=bad-dependency" ) != + -1 ) + { + foundBadDep = true; + } + } + + reader.close(); + + assertTrue( foundSnapshot ); + assertTrue( foundBadDep ); + } + + /* + @todo: commented out since tests are currently failing due to MRM-323 + + public void testDownloadArtifactFromManagedRepo() + throws Exception + { + clickManagedRepositories(); + + clickLinkWithText( "Add Repository" ); + assertTextPresent( "Configuration" ); + + setFieldValue( "addRepository_id", "snapshots" ); + setFieldValue( "urlName", "snapshots" ); + setFieldValue( "addRepository_name", "snapshots-repository" ); + setFieldValue( "addRepository_directory", getBasedir() + "/target/snapshots" ); + + clickButtonWithValue( "Add Repository" ); + assertPage( "Administration" ); + + clickLinkWithText( "User Management" ); + clickLinkWithLocator( "//a[contains(@href, '/security/useredit.action?username=admin')]" ); + clickLinkWithText( "Edit Roles" ); + checkField( "addRolesToUser_addSelectedRolesRepository Observer - snapshots" ); + checkField( "addRolesToUser_addSelectedRolesRepository Manager - snapshots" ); + + clickButtonWithValue( "Add Selected Roles" ); + assertPage( "[Admin] User List" ); + + logout(); + + File outputFile = new File( getBasedir(), "/target/projects/bad-dependency/bad-dependency2.log" ); + int exitCode = executeMaven( getBasedir() + "/target/projects/bad-dependency", + outputFile ); + + assertEquals( 0, exitCode ); + + File f = new File( getBasedir(), + "/target/local-repo/org/apache/maven/archiva/web/test/foo-bar-1.0-SNAPSHOT.jar" ); + assertTrue( f.exists() ); + + BufferedReader reader = new BufferedReader( new FileReader( outputFile ) ); + String str; + + while( ( str = reader.readLine() ) != null) + { + System.out.println( str ); + } + reader.close(); + + removeManagedRepository( "snapshots" ); + } + + + public void testDownloadArtifactFromProxiedRepo() + throws Exception + { + //add managed repository + clickManagedRepositories(); + + clickLinkWithText( "Add Repository" ); + assertTextPresent( "Configuration" ); + + setFieldValue( "addRepository_id", "repository" ); + setFieldValue( "urlName", "repository" ); + setFieldValue( "addRepository_name", "repository" ); + setFieldValue( "addRepository_directory", getBasedir() + "/target/repository" ); + + clickButtonWithValue( "Add Repository" ); + waitPage(); + assertPage( "Administration" ); + + clickLinkWithText( "User Management" ); + clickLinkWithLocator( "//a[contains(@href, '/security/useredit.action?username=admin')]" ); + clickLinkWithText( "Edit Roles" ); + checkField( "addRolesToUser_addSelectedRolesRepository Observer - repository" ); + checkField( "addRolesToUser_addSelectedRolesRepository Manager - repository" ); + + clickButtonWithValue( "Add Selected Roles" ); + assertPage( "[Admin] User List" ); + logout(); + + //add proxied repository + clickProxiedRepositories(); + clickLinkWithText( "Add Repository" ); + assertPage( "Configuration" ); + setFieldValue( "id", "central" ); + setFieldValue( "name", "Central Repository" ); + setFieldValue( "url", "http://mirrors.ibiblio.org/pub/mirrors/maven2" ); + clickButtonWithValue( "Add Repository" ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( "Central Repository" ); + assertLinkPresent( "Edit Repository" ); + + logout(); + + File outputFile = new File( getBasedir(), "/target/projects/dependency-in-proxied/dependency-in-proxied.log" ); + int exitCode = executeMaven( getBasedir() + "/target/projects/dependency-in-proxied", + outputFile ); + + assertEquals( 0, exitCode ); + + File f = new File( getBasedir(),"/target/repository/com/lowagie/itext/1.3/itext-1.3.jar" ); + assertTrue( f.exists() ); + + f = new File( getBasedir(), "/target/local-repo/com/lowagie/itext/1.3/itext-1.3.jar" ); + assertTrue( f.exists() ); + + + BufferedReader reader = new BufferedReader( new FileReader( outputFile ) ); + String str; + + while( ( str = reader.readLine() ) != null) + { + System.out.println( str ); + } + reader.close(); + + removeProxiedRepository(); + removeManagedRepository( "repository" ); + } + + */ + + /** + * @throws Exception + */ + public void tearDown() + throws Exception + { + super.tearDown(); + } +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java new file mode 100644 index 000000000..370995765 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java @@ -0,0 +1,233 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Test archiva proxied repositories configuration + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + */ +public class ProxiedRepositoryTest + extends AbstractArchivaTestCase +{ + /** + * + */ + protected void initialize() + { + super.initialize(); + + createTestRepo(); + } + + /** + * Create a proxied repo which will be used for testing + */ + private void createTestRepo() + { + clickProxiedRepositories(); + + if ( isTextPresent( "There are no proxied repositories configured yet." ) ) + { + clickLinkWithText( "Add Repository" ); + assertPage( "Configuration" ); + setFieldValue( "id", "test-proxied" ); + setFieldValue( "name", "Test Proxied Repository" ); + setFieldValue( "url", "http://test.com/test-proxied" ); + clickButtonWithValue( "Add Repository" ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( "Test Proxied Repository" ); + assertLinkPresent( "Edit Repository" ); + } + + logout(); + } + + /** + * Test add proxied repo with invalid data + */ + public void testInvalidAddProxiedRepoConfiguration() + { + clickProxiedRepositories(); + + clickLinkWithText( "Add Repository" ); + assertPage( "Configuration" ); + + clickButtonWithValue( "Add Repository", false ); + assertPage( "Configuration" ); + assertTextPresent( "You must enter the repository identifier." ); + assertTextPresent( "You must enter the repository name." ); + assertTextPresent( "You must enter the repository URL." ); + + logout(); + } + + /** + * Test edit proxied repo with valid data + */ + public void testValidEditProxiedRepoConfiguration() + { + clickProxiedRepositories(); + clickLinkWithText( "Edit Repository" ); + + assertPage( "Configuration" ); + assertTextPresent( "Edit Proxied Repository" ); + setFieldValue( "name", "Test Valid" ); + setFieldValue( "url", "http://valid.org/test-valid" ); + clickButtonWithValue( "Update Repository" ); + waitPage(); + + assertPage( "Administration" ); + assertTextPresent( "Test Valid" ); + assertLinkPresent( "Edit Repository" ); + + logout(); + } + + /** + * Test edit proxied repo with invalid data + */ + public void testInvalidEditProxiedRepoConfiguration() + { + clickProxiedRepositories(); + clickLinkWithText( "Edit Repository" ); + + assertPage( "Configuration" ); + assertTextPresent( "Edit Proxied Repository" ); + setFieldValue( "name", "" ); + setFieldValue( "url", "" ); + clickButtonWithValue( "Update Repository", false ); + + assertPage( "Configuration" ); + assertTextPresent( "You must enter the repository name." ); + assertTextPresent( "You must enter the repository URL." ); + + logout(); + } + + /** + * Test delete repository, unmodified entry and contents + */ + public void testDeleteRepoUnmodified() + { + clickProxiedRepositories(); + clickLinkWithText( "Delete Repository" ); + + assertPage( "Configuration" ); + assertTextPresent( "Delete Proxied Repository" ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextPresent( "Test Proxied Repository" ); + + logout(); + } + + /** + * Test delete repository including contents + */ + public void testDeleteRepoRemoveFromDisk() + { + clickProxiedRepositories(); + clickLinkWithText( "Delete Repository" ); + + assertPage( "Configuration" ); + clickLinkWithLocator( "deleteProxiedRepository_operationdelete-contents", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( "Test Proxied Repository" ); + + logout(); + } + + /** + * Test delete repository, unmodified contents/entry deleted + */ + public void testDeleteRepoUnmodifiedContents() + { + clickProxiedRepositories(); + clickLinkWithText( "Delete Repository" ); + + assertPage( "Configuration" ); + clickLinkWithLocator( "deleteProxiedRepository_operationdelete-entry", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( "Test Proxied Repository" ); + + logout(); + } + + /** + * Click Settings from the navigation menu + */ + private void clickProxiedRepositories() + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "Proxied Repositories" ); + assertPage( "Administration" ); + assertTextPresent( "Proxied Repositories" ); + } + + /** + * Remove the created test repo + */ + protected void removeTestRepo() + { + if ( !isLinkPresent( "Login" ) ) + { + logout(); + } + + clickProxiedRepositories(); + + if ( isTextPresent( "Delete Repository " ) ) + { + clickLinkWithText( "Delete Repository" ); + assertPage( "Configuration" ); + clickLinkWithLocator( "deleteProxiedRepository_operationdelete-entry", false ); + clickButtonWithValue( "Go" ); + + assertPage( "Administration" ); + assertTextNotPresent( "Test Proxied Repository" ); + } + + logout(); + } + + /** + * Revert to original value + * + * @throws Exception + */ + public void tearDown() + throws Exception + { + removeTestRepo(); + + super.tearDown(); + } + +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java new file mode 100644 index 000000000..67ce4271a --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java @@ -0,0 +1,129 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public class SearchTest + extends AbstractArchivaTestCase +{ + private static int PAGE_LOAD_WAIT = 1500; + + public void testSearchNonExistingArtifact() + { + searchForArtifact( "asdf" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertTextPresent( "No results found" ); + } + + public void testSearchExistingArtifact() + { + searchForArtifact( "artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Search Results" ); + + assertTextPresent( "artifact-a" ); + } + + public void testViewSearchedArtifact() + { + // test viewing artifact (header link) listed in search results + + searchForArtifact( "artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + getSelenium().click( "link=artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Browse Repository" ); + + assertTextPresent( "artifact-a" ); + + //test viewing artifact listed in search results + + searchForArtifact( "artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + clickLinkWithText( "1.0" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Browse Repository" ); + + assertTextPresent( "Artifact ID" ); + + assertTextPresent( "artifact-a" ); + + assertTextPresent( "Version" ); + + assertTextPresent( "1.0" ); + } + + public void testBrowseSearchedArtifact() + { + // test viewing artifact listed in search results + + searchForArtifact( "artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + getSelenium().click("//p[1]/span/a[1]"); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Browse Repository" ); + + assertTextPresent( "artifact-a" ); + } + + public void testBrowseRepoFromSearchResults() + { + searchForArtifact( "artifact-a" ); + + waitPage( PAGE_LOAD_WAIT ); + + clickLinkWithText( "[top]" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Browse Repository" ); + } + + private void searchForArtifact( String artifactId ) + { + if ( !"Maven Archiva :: Quick Search".equals( getSelenium().getTitle() ) ) + { + clickLinkWithText( "Search" ); + + waitPage( PAGE_LOAD_WAIT ); + + assertPage( "Quick Search" ); + } + + setFieldValue( "quickSearch_q", artifactId ); + + clickButtonWithValue( "Submit" ); + } +}
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java new file mode 100644 index 000000000..2b88efb33 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java @@ -0,0 +1,184 @@ +package org.apache.maven.archiva.web.test; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +/** + * Test archiva 'Settings' + * + * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> + */ +public class SettingsTest + extends AbstractArchivaTestCase +{ + /* + public void testRunIndexer() + { + clickSettings(); + + clickLinkWithText( "Run Now" ); + waitPage(); + + assertPage( "Administration" ); + + logout(); + } */ + + public void testEditIndexDirectory() + { + clickEditConfiguration(); + + setFieldValue( "indexPath", getBasedir() + "/target/web-ui-index" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + assertTextPresent( getBasedir() + "/target/web-ui-index" ); + + logout(); + } + + public void testValidIndexSchedule() + { + clickEditConfiguration(); + + setFieldValue( "second", "*" ); + setFieldValue( "minute", "*" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + } + + public void testInvalidIndexSchedule() + { + clickEditConfiguration(); + setFieldValue( "second", "asdf" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Configuration" ); + assertTextPresent( "Invalid Cron Expression" ); + + logout(); + } + + public void testEditProxyHost() + { + clickEditConfiguration(); + + setFieldValue( "proxy.host", "asdf" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + } + + public void testValidProxyPort() + { + clickEditConfiguration(); + + setFieldValue( "proxy.port", "32143" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + } + + public void testInvalidProxyPort() + { + clickEditConfiguration(); + setFieldValue( "proxy.port", "asdf" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Configuration" ); + assertTextPresent( "Port" ); + assertTextPresent( "Invalid field value for field \"proxy.port\"" ); + + setFieldValue( "proxy.port", "-1" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + } + + public void testEditProxyCredentials() + { + clickEditConfiguration(); + + setFieldValue( "proxy.username", "asdf" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + } + + /** + * Click Edit Configuration link + */ + private void clickEditConfiguration() + { + clickSettings(); + + clickLinkWithText( "Edit Configuration" ); + assertPage( "Configuration" ); + } + + /** + * Click Settings from the navigation menu + */ + private void clickSettings() + { + goToLoginPage(); + submitLoginPage( adminUsername, adminPassword ); + + clickLinkWithText( "Settings" ); + assertPage( "Administration" ); + } + + public void tearDown() + throws Exception + { + clickEditConfiguration(); + setFieldValue( "indexPath", getBasedir() + "/target/web-ui-index" ); + setFieldValue( "second", "0" ); + setFieldValue( "minute", "0,30" ); + setFieldValue( "hour", "*" ); + setFieldValue( "dayOfMonth", "*" ); + setFieldValue( "month", "*" ); + setFieldValue( "dayOfWeek", "?" ); + setFieldValue( "year", "" ); + setFieldValue( "proxy.port", "8080" ); + setFieldValue( "proxy.host", "" ); + setFieldValue( "proxy.username", "" ); + setFieldValue( "proxy.password", "" ); + clickButtonWithValue( "Save Configuration" ); + waitPage(); + assertPage( "Administration" ); + + logout(); + + super.tearDown(); + } + +} diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml new file mode 100644 index 000000000..4208167ec --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml @@ -0,0 +1,3 @@ +<configuration> + <localRepository></localRepository> +</configuration> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml new file mode 100644 index 000000000..9afb83352 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml @@ -0,0 +1 @@ +<configuration /> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/_7.cfs b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/_7.cfs Binary files differnew file mode 100644 index 000000000..e95ea7eb8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/_7.cfs diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/deletable b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/deletable Binary files differnew file mode 100644 index 000000000..593f4708d --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/deletable diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/segments b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/segments Binary files differnew file mode 100644 index 000000000..d9d4f014f --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/index/segments diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/local-repo/settings.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/local-repo/settings.xml new file mode 100644 index 000000000..23b66a9db --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/local-repo/settings.xml @@ -0,0 +1,44 @@ +<settings> + <localRepository></localRepository> + <servers> + <server> + <id>snapshots</id> + <username>admin</username> + <password>admin1</password> + </server> + </servers> + <profiles> + <profile> + <id>repositories</id> + <repositories> + <repository> + <id>snapshots</id> + <name>snapshots-repository</name> + <url>http://localhost:9696/archiva/repository/snapshots/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>snapshots</id> + <name>snapshots-repository</name> + <url>http://localhost:9696/archiva/repository/snapshot/</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> + <activeProfiles> + <activeProfile>repositories</activeProfile> + </activeProfiles> +</settings>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency.log b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency.log diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency2.log b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency2.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/bad-dependency2.log diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/pom.xml new file mode 100644 index 000000000..921fe5710 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/bad-dependency/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva</groupId> + <artifactId>bad-dependency</artifactId> + <version>1.0</version> + <packaging>jar</packaging> + <name>Bad Dependency</name> + <dependencies> + <dependency> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>bad-dependency</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>foo-bar</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/pom.xml new file mode 100644 index 000000000..132a9d229 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/projects/dependency-in-proxied/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva</groupId> + <artifactId>dependency-in-proxied</artifactId> + <version>1.0</version> + <packaging>jar</packaging> + <name>Dependency In Proxied</name> + <dependencies> + <!--dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-jxr</artifactId> + <version>2.1</version> + </dependency--> + <dependency> + <groupId>com.lowagie</groupId> + <artifactId>itext</artifactId> + <version>1.3</version> + </dependency> + </dependencies> +</project>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh new file mode 100644 index 000000000..c53a40aad --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh @@ -0,0 +1,7 @@ +#Last Scan Information, managed by Archiva. DO NOT EDIT +#Thu Apr 19 17:04:36 PHT 2007 +scan.included.files=12 +scan.skipped.files=0 +scan.finished.timestamp=1176973476967 +scan.consumed.files=20 +scan.started.timestamp=1176973467414 diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.md5 new file mode 100644 index 000000000..158138e09 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.md5 @@ -0,0 +1 @@ +0360f14347d5502114ba7afe4ea2e07f
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.sha1 new file mode 100644 index 000000000..c9524a069 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.sha1 @@ -0,0 +1 @@ +4a667b9923fb936409b96c8242bebc2f96f374f5
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom new file mode 100644 index 000000000..9d419ea6d --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom @@ -0,0 +1,25 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-a</artifactId> + <packaging>jar</packaging> + <version>1.0</version> + <name>artifact-a</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-b</artifactId> + <version>2.0</version> + </dependency> + </dependencies> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav</artifactId> + </extension> + </extensions> + </build> +</project> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.md5 new file mode 100644 index 000000000..93cdd6f43 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.md5 @@ -0,0 +1 @@ +cdf69ffbcb888aacea6cfeaf479fefd1
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.sha1 new file mode 100644 index 000000000..293b6c1f4 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.sha1 @@ -0,0 +1 @@ +f6a384b1ab62ed45ae7dee1a059815e94bbc7fa6
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml new file mode 100644 index 000000000..113676922 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-a</artifactId> + <version>1.0</version> + <versioning> + <versions> + <version>1.0</version> + </versions> + <lastUpdated>20070417090928</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 new file mode 100644 index 000000000..a02aa88a4 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 @@ -0,0 +1 @@ +bc87573a595a2c387b5baa4ad7d06743
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 new file mode 100644 index 000000000..11bee708c --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +e9ecaaa14a3c09b07206980c15749a631dbc986a
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.md5 new file mode 100644 index 000000000..3bb4fd4e6 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.md5 @@ -0,0 +1 @@ +16a308257949f23afa5d1f1dec41aa44
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.sha1 new file mode 100644 index 000000000..e5d0934b1 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.sha1 @@ -0,0 +1 @@ +36a3a9cc35b8ca0d73998d7b39d290b489800a22
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom new file mode 100644 index 000000000..218543673 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom @@ -0,0 +1,25 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-b</artifactId> + <packaging>jar</packaging> + <version>2.0</version> + <name>artifact-b</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-c</artifactId> + <version>3.0</version> + </dependency> + </dependencies> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav</artifactId> + </extension> + </extensions> + </build> +</project> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.md5 new file mode 100644 index 000000000..5fabe5807 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.md5 @@ -0,0 +1 @@ +be5b8f8539a62b5935793ebeb87215fd
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.sha1 new file mode 100644 index 000000000..6eb9715a0 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.sha1 @@ -0,0 +1 @@ +012a658d4a4f70aa3e8dd4b2db67020817b7dfcc
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml new file mode 100644 index 000000000..60b171df5 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-b</artifactId> + <version>2.0</version> + <versioning> + <versions> + <version>2.0</version> + </versions> + <lastUpdated>20070417090908</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 new file mode 100644 index 000000000..80c703319 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 @@ -0,0 +1 @@ +bedfccc27fc7dc262d5c99a7aa8b83d8
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 new file mode 100644 index 000000000..42390adcc --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +4902ea6b16838ff26f9136460c4394b0ad7cc7f5
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.md5 new file mode 100644 index 000000000..edc258a75 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.md5 @@ -0,0 +1 @@ +853a10a201f8a296e37e856615c5349c
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.sha1 new file mode 100644 index 000000000..aafda15fa --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.sha1 @@ -0,0 +1 @@ +5155da8820ed77c43e983c1244d94a3b27bf08f7
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom new file mode 100644 index 000000000..8299fbf11 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom @@ -0,0 +1,26 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-c</artifactId> + <packaging>jar</packaging> + <version>3.0</version> + <name>artifact-c</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav</artifactId> + </extension> + </extensions> + </build> +</project> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.md5 new file mode 100644 index 000000000..d225acc75 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.md5 @@ -0,0 +1 @@ +4df0417579b1492f37da14316adb85af
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.sha1 new file mode 100644 index 000000000..1f2435ee6 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.sha1 @@ -0,0 +1 @@ +c3b007acd9c17b80753b39a4121255965e7e2e65
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml new file mode 100644 index 000000000..1d7394c7a --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-c</artifactId> + <version>3.0</version> + <versioning> + <versions> + <version>3.0</version> + </versions> + <lastUpdated>20070417090835</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 new file mode 100644 index 000000000..8c0378271 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 @@ -0,0 +1 @@ +74d58d97e78d5e51cc02c489c5edba0d
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 new file mode 100644 index 000000000..535860369 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +5c7571eb35248be0f65758783b036e8f7899c146
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 new file mode 100644 index 000000000..9d902f06e --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 @@ -0,0 +1 @@ +55f498a518e1151ce2e54daa674691de
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 new file mode 100644 index 000000000..b351a034e --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 @@ -0,0 +1 @@ +730551bde461564d3f8a7e0178ef9bc54a86d2dd
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom new file mode 100644 index 000000000..478f8fd50 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom @@ -0,0 +1,25 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-s</artifactId> + <packaging>jar</packaging> + <version>0.1</version> + <name>artifact-s</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-a</artifactId> + <version>1.0</version> + </dependency> + </dependencies> + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav</artifactId> + </extension> + </extensions> + </build> +</project> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 new file mode 100644 index 000000000..b49dc167a --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 @@ -0,0 +1 @@ +746ba2848229dbc1c9683ece0e7f02c8
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 new file mode 100644 index 000000000..ae029df5c --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 @@ -0,0 +1 @@ +0d068f63069a86d982075a1dca7fe74fd95a29df
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml new file mode 100644 index 000000000..ddcad75d9 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>artifact-s</artifactId> + <version>0.1</version> + <versioning> + <versions> + <version>0.1</version> + </versions> + <lastUpdated>20070417090721</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 new file mode 100644 index 000000000..f6bd69743 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 @@ -0,0 +1 @@ +baa0ad0afaba9cee66ec262b38f796b6
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 new file mode 100644 index 000000000..c341e6296 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +dea84d579f673d2d87c7bd47e4318cdf8e59e4d0
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/.datarefresh b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/.datarefresh new file mode 100644 index 000000000..c53a40aad --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/.datarefresh @@ -0,0 +1,7 @@ +#Last Scan Information, managed by Archiva. DO NOT EDIT +#Thu Apr 19 17:04:36 PHT 2007 +scan.included.files=12 +scan.skipped.files=0 +scan.finished.timestamp=1176973476967 +scan.consumed.files=20 +scan.started.timestamp=1176973467414 diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar Binary files differnew file mode 100644 index 000000000..033956d43 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 new file mode 100644 index 000000000..0a3eeb690 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 @@ -0,0 +1 @@ +306d556e6e5e4d604dc854d09ddcdefd
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 new file mode 100644 index 000000000..39c5c3061 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 @@ -0,0 +1 @@ +afb6586f5eb4c63dd5735a0bed11c99c7fac6755
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom new file mode 100644 index 000000000..d580176ff --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?><project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>foo-bar</artifactId> + <version>1.0-SNAPSHOT</version> + <distributionManagement> + <status>deployed</status> + </distributionManagement> +</project>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 new file mode 100644 index 000000000..6caf8be40 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 @@ -0,0 +1 @@ +8e896baea663a45d7bd2737f8e464481
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 new file mode 100644 index 000000000..a3bbc7ea1 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 @@ -0,0 +1 @@ +e37897c617d78dedd978766a2db318d301e80105
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml new file mode 100644 index 000000000..ab1eb426d --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>foo-bar</artifactId> + <version>1.0-SNAPSHOT</version> + <versioning> + <snapshot> + <buildNumber>1</buildNumber> + </snapshot> + <lastUpdated>20070425105840</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 new file mode 100644 index 000000000..76ef1e4b3 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 @@ -0,0 +1 @@ +add4f71a005137e9a296c5b192e900c2
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 new file mode 100644 index 000000000..ebe7cf339 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +b505e302169e04fc821bf571da7435b1e42ef8d7
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml new file mode 100644 index 000000000..8f00ecefa --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?><metadata> + <groupId>org.apache.maven.archiva.web.test</groupId> + <artifactId>foo-bar</artifactId> + <version>1.0-SNAPSHOT</version> + <versioning> + <versions> + <version>1.0-SNAPSHOT</version> + </versions> + <lastUpdated>20070425105840</lastUpdated> + </versioning> +</metadata>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 new file mode 100644 index 000000000..f6270d9c8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 @@ -0,0 +1 @@ +f3b657fb48d2e82fee5fada169756938
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 new file mode 100644 index 000000000..7f4812f9f --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 @@ -0,0 +1 @@ +f4629e609deb95cefdcdddc6dd8c2942d1c3e47f
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml new file mode 100644 index 000000000..180dbb742 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<Context path="/archiva" + docBase="${catalina.base}/webapps/archiva"> + + <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource" + username="sa" + password="" + driverClassName="org.apache.derby.jdbc.EmbeddedDriver" + url="jdbc:derby:target/database/users;create=true" + /> + + <Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource" + username="sa" + password="" + driverClassName="org.apache.derby.jdbc.EmbeddedDriver" + url="jdbc:derby:database/archiva;create=true" /> +</Context> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/host-manager.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/host-manager.xml new file mode 100644 index 000000000..e41e1a918 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/host-manager.xml @@ -0,0 +1,32 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <!-- + + Context configuration file for the Tomcat Host Manager Web App + + $Id$ + + --> + + +<Context docBase="${catalina.home}/server/webapps/host-manager" + privileged="true" antiResourceLocking="false" antiJARLocking="false"> + +</Context> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/manager.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/manager.xml new file mode 100644 index 000000000..29abc9f1c --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/manager.xml @@ -0,0 +1,36 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <!-- + + Context configuration file for the Tomcat Manager Web App + + $Id$ + + --> + + +<Context docBase="${catalina.home}/server/webapps/manager" + privileged="true" antiResourceLocking="false" antiJARLocking="false"> + + <!-- Link to the user database we will get roles from --> + <ResourceLink name="users" global="UserDatabase" + type="org.apache.catalina.UserDatabase"/> + +</Context> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.policy b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.policy new file mode 100644 index 000000000..53a6c90e2 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.policy @@ -0,0 +1,172 @@ +// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 5
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option. In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id: catalina.policy 393732 2006-04-13 06:32:25Z pero $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the launcher code
+grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the commons-logging API
+grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the JMX server
+grant codeBase "file:${catalina.home}/bin/jmx.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to JULI
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "common" directory
+grant codeBase "file:${catalina.home}/common/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the container's core code, plus any additional
+// libraries installed in the "server" directory
+grant codeBase "file:${catalina.home}/server/-" {
+ permission java.security.AllPermission;
+};
+
+// The permissions granted to the balancer WEB-INF/classes and WEB-INF/lib directory
+grant codeBase "file:${catalina.home}/webapps/balancer/-" {
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
+};
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+ // Required for JNDI lookup of named JDBC DataSource's and
+ // javamail named MimePart DataSource used to send mail
+ permission java.util.PropertyPermission "java.home", "read";
+ permission java.util.PropertyPermission "java.naming.*", "read";
+ permission java.util.PropertyPermission "javax.sql.*", "read";
+
+ // OS Specific properties to allow read access
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ // JVM properties to allow read access
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+
+ // Required for OpenJMX
+ permission java.lang.RuntimePermission "getAttribute";
+
+ // Allow read of JAXP compliant XML parser debug
+ permission java.util.PropertyPermission "jaxp.debug", "read";
+
+ // Precompiled JSPs need access to this package.
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server. You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.properties b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.properties new file mode 100644 index 000000000..3e937aced --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/catalina.properties @@ -0,0 +1,85 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageAccess unless the +# corresponding RuntimePermission ("accessClassInPackage."+package) has +# been granted. +package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageDefinition unless the +# corresponding RuntimePermission ("defineClassInPackage."+package) has +# been granted. +# +# by default, no packages are restricted for definition, and none of +# the class loaders supplied with the JDK call checkPackageDefinition. +# +package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. + +# +# +# List of comma-separated paths defining the contents of the "common" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank,the JVM system loader will be used as Catalina's "common" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +common.loader=${catalina.home}/common/classes,${catalina.home}/common/i18n/*.jar,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar + +# +# List of comma-separated paths defining the contents of the "server" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank, the "common" loader will be used as Catalina's "server" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +server.loader=${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar + +# +# List of comma-separated paths defining the contents of the "shared" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, +# the "common" loader will be used as Catalina's "shared" loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# Please note that for individual jar files, e.g. bar.jar, you need the URL form +# starting with file:. +shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar + +# +# String cache configuration. +tomcat.util.buf.StringCache.byte.enabled=true +#tomcat.util.buf.StringCache.char.enabled=true +#tomcat.util.buf.StringCache.trainThreshold=500000 +#tomcat.util.buf.StringCache.cacheSize=5000 diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/context.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/context.xml new file mode 100644 index 000000000..895adb9b1 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/context.xml @@ -0,0 +1,31 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <!-- The contents of this file will be loaded for each web application --> +<Context> + + <!-- Default set of monitored resources --> + <WatchedResource>WEB-INF/web.xml</WatchedResource> + + <!-- Uncomment this to disable session persistence across Tomcat restarts --> + <!-- + <Manager pathname="" /> + --> + +</Context>
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/logging.properties b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/logging.properties new file mode 100644 index 000000000..07f85e265 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/logging.properties @@ -0,0 +1,74 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4admin.org.apache.juli.FileHandler, 5host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.FileHandler.level = FINE +1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.FileHandler.prefix = catalina. + +2localhost.org.apache.juli.FileHandler.level = FINE +2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.FileHandler.prefix = localhost. + +3manager.org.apache.juli.FileHandler.level = FINE +3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.FileHandler.prefix = manager. + +4admin.org.apache.juli.FileHandler.level = FINE +4admin.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +4admin.org.apache.juli.FileHandler.prefix = admin. + +5host-manager.org.apache.juli.FileHandler.level = FINE +5host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs +5host-manager.org.apache.juli.FileHandler.prefix = host-manager. + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers = 4admin.org.apache.juli.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 5host-manager.org.apache.juli.FileHandler + +# For example, set the com.xyz.foo logger to only log SEVERE +# messages: +#org.apache.catalina.startup.ContextConfig.level = FINE +#org.apache.catalina.startup.HostConfig.level = FINE +#org.apache.catalina.session.ManagerBase.level = FINE diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server-minimal.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server-minimal.xml new file mode 100644 index 000000000..316475801 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server-minimal.xml @@ -0,0 +1,44 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<Server port="8005" shutdown="SHUTDOWN"> + + <GlobalNamingResources> + <!-- Used by Manager webapp --> + <Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" + description="User database that can be updated and saved" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + pathname="conf/tomcat-users.xml"/> + </GlobalNamingResources> + + <Service name="Catalina"> + <Connector port="8080"/> + + <!-- This is here for compatibility only, not required --> + <Connector port="8009" protocol="AJP/1.3"/> + + <Engine name="Catalina" defaultHost="localhost"> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName="UserDatabase"/> + <Host name="localhost" appBase="webapps"/> + </Engine> + + </Service> +</Server> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server.xml new file mode 100644 index 000000000..22a041059 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/server.xml @@ -0,0 +1,384 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <!-- Example Server Configuration File --> + <!-- Note that component elements are nested corresponding to their +parent-child relationships with each other --> + + <!-- A "Server" is a singleton element that represents the entire JVM, + which may contain one or more "Service" instances. The Server + listens for a shutdown command on the indicated port. + + Note: A "Server" is not itself a "Container", so you may not + define subcomponents such as "Valves" or "Loggers" at this level. + --> + +<Server port="8005" shutdown="SHUTDOWN"> + + <!-- Comment these entries out to disable JMX MBeans support used for the + administration web application --> + <Listener className="org.apache.catalina.core.AprLifecycleListener"/> + <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/> + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> + <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> + + <!-- Global JNDI resources --> + <GlobalNamingResources> + + <!-- Test entry for demonstration purposes --> + <Environment name="simpleValue" type="java.lang.Integer" value="30"/> + + <!-- Editable user database that can also be used by + UserDatabaseRealm to authenticate users --> + <Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" + description="User database that can be updated and saved" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + pathname="conf/tomcat-users.xml"/> + + </GlobalNamingResources> + + <!-- A "Service" is a collection of one or more "Connectors" that share + a single "Container" (and therefore the web applications visible + within that Container). Normally, that Container is an "Engine", + but this is not required. + + Note: A "Service" is not itself a "Container", so you may not + define subcomponents such as "Valves" or "Loggers" at this level. + --> + + <!-- Define the Tomcat Stand-Alone Service --> + <Service name="Catalina"> + + <!-- A "Connector" represents an endpoint by which requests are received + and responses are returned. Each Connector passes requests on to the + associated "Container" (normally an Engine) for processing. + + By default, a non-SSL HTTP/1.1 Connector is established on port 8080. + You can also enable an SSL HTTP/1.1 Connector on port 8443 by + following the instructions below and uncommenting the second Connector + entry. SSL support requires the following steps (see the SSL Config + HOWTO in the Tomcat 5 documentation bundle for more detailed + instructions): + * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or + later, and put the JAR files into "$JAVA_HOME/jre/lib/ext". + * Execute: + %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) + $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) + with a password value of "changeit" for both the certificate and + the keystore itself. + + By default, DNS lookups are enabled when a web application calls + request.getRemoteHost(). This can have an adverse impact on + performance, so you can disable it by setting the + "enableLookups" attribute to "false". When DNS lookups are disabled, + request.getRemoteHost() will return the String version of the + IP address of the remote client. + --> + + <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> + <Connector port="9696" maxHttpHeaderSize="8192" + maxThreads="150" minSpareThreads="25" maxSpareThreads="75" + enableLookups="false" redirectPort="8443" acceptCount="100" + connectionTimeout="20000" disableUploadTimeout="true"/> + <!-- Note : To disable connection timeouts, set connectionTimeout value + to 0 --> + + <!-- Note : To use gzip compression you could set the following properties : + + compression="on" + compressionMinSize="2048" + noCompressionUserAgents="gozilla, traviata" + compressableMimeType="text/html,text/xml" + --> + + <!-- Define a SSL HTTP/1.1 Connector on port 8443 --> + <!-- + <Connector port="8443" maxHttpHeaderSize="8192" + maxThreads="150" minSpareThreads="25" maxSpareThreads="75" + enableLookups="false" disableUploadTimeout="true" + acceptCount="100" scheme="https" secure="true" + clientAuth="false" sslProtocol="TLS" /> + --> + + <!-- Define an AJP 1.3 Connector on port 8009 --> + <Connector port="8009" + enableLookups="false" redirectPort="8443" protocol="AJP/1.3"/> + + <!-- Define a Proxied HTTP/1.1 Connector on port 8082 --> + <!-- See proxy documentation for more information about using this. --> + <!-- + <Connector port="8082" + maxThreads="150" minSpareThreads="25" maxSpareThreads="75" + enableLookups="false" acceptCount="100" connectionTimeout="20000" + proxyPort="80" disableUploadTimeout="true" /> + --> + + <!-- An Engine represents the entry point (within Catalina) that processes + every request. The Engine implementation for Tomcat stand alone + analyzes the HTTP headers included with the request, and passes them + on to the appropriate Host (virtual host). --> + + <!-- You should set jvmRoute to support load-balancing via AJP ie : + <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1"> + --> + + <!-- Define the top level container in our container hierarchy --> + <Engine name="Catalina" defaultHost="localhost"> + + <!-- The request dumper valve dumps useful debugging information about + the request headers and cookies that were received, and the response + headers and cookies that were sent, for all requests received by + this instance of Tomcat. If you care only about requests to a + particular virtual host, or a particular application, nest this + element inside the corresponding <Host> or <Context> entry instead. + + For a similar mechanism that is portable to all Servlet 2.4 + containers, check out the "RequestDumperFilter" Filter in the + example application (the source for this filter may be found in + "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters"). + + Request dumping is disabled by default. Uncomment the following + element to enable it. --> + <!-- + <Valve className="org.apache.catalina.valves.RequestDumperValve"/> + --> + + <!-- Because this Realm is here, an instance will be shared globally --> + + <!-- This Realm uses the UserDatabase configured in the global JNDI + resources under the key "UserDatabase". Any edits + that are performed against this UserDatabase are immediately + available for use by the Realm. --> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName="UserDatabase"/> + + <!-- Comment out the old realm but leave here for now in case we + need to go back quickly --> + <!-- + <Realm className="org.apache.catalina.realm.MemoryRealm" /> + --> + + <!-- Replace the above Realm with one of the following to get a Realm + stored in a database and accessed via JDBC --> + + <!-- + <Realm className="org.apache.catalina.realm.JDBCRealm" + driverName="org.gjt.mm.mysql.Driver" + connectionURL="jdbc:mysql://localhost/authority" + connectionName="test" connectionPassword="test" + userTable="users" userNameCol="user_name" userCredCol="user_pass" + userRoleTable="user_roles" roleNameCol="role_name" /> + --> + + <!-- + <Realm className="org.apache.catalina.realm.JDBCRealm" + driverName="oracle.jdbc.driver.OracleDriver" + connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL" + connectionName="scott" connectionPassword="tiger" + userTable="users" userNameCol="user_name" userCredCol="user_pass" + userRoleTable="user_roles" roleNameCol="role_name" /> + --> + + <!-- + <Realm className="org.apache.catalina.realm.JDBCRealm" + driverName="sun.jdbc.odbc.JdbcOdbcDriver" + connectionURL="jdbc:odbc:CATALINA" + userTable="users" userNameCol="user_name" userCredCol="user_pass" + userRoleTable="user_roles" roleNameCol="role_name" /> + --> + + <!-- Define the default virtual host + Note: XML Schema validation will not work with Xerces 2.2. + --> + <Host name="localhost" appBase="webapps" + unpackWARs="true" autoDeploy="true" + xmlValidation="false" xmlNamespaceAware="false"> + + <!-- Defines a cluster for this node, + By defining this element, means that every manager will be changed. + So when running a cluster, only make sure that you have webapps in there + that need to be clustered and remove the other ones. + A cluster has the following parameters: + + className = the fully qualified name of the cluster class + + clusterName = a descriptive name for your cluster, can be anything + + mcastAddr = the multicast address, has to be the same for all the nodes + + mcastPort = the multicast port, has to be the same for all the nodes + + mcastBindAddress = bind the multicast socket to a specific address + + mcastTTL = the multicast TTL if you want to limit your broadcast + + mcastSoTimeout = the multicast readtimeout + + mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat + + mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received + + tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes + + tcpListenAddress = the listen address (bind address) for TCP cluster request on this host, + in case of multiple ethernet cards. + auto means that address becomes + InetAddress.getLocalHost().getHostAddress() + + tcpListenPort = the tcp listen port + + tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS + has a wakup bug in java.nio. Set to 0 for no timeout + + printToScreen = true means that managers will also print to std.out + + expireSessionsOnShutdown = true means that + + useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called. + false means to replicate the session after each request. + false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager) + <% + HashMap map = (HashMap)session.getAttribute("map"); + map.put("key","value"); + %> + replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'. + * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication. + * Synchronous means that the thread that executes the request, is also the + thread the replicates the data to the other nodes, and will not return until all + nodes have received the information. + * Asynchronous means that there is a specific 'sender' thread for each cluster node, + so the request thread will queue the replication request into a "smart" queue, + and then return to the client. + The "smart" queue is a queue where when a session is added to the queue, and the same session + already exists in the queue from a previous request, that session will be replaced + in the queue instead of replicating two requests. This almost never happens, unless there is a + large network delay. + --> + <!-- + When configuring for clustering, you also add in a valve to catch all the requests + coming in, at the end of the request, the session may or may not be replicated. + A session is replicated if and only if all the conditions are met: + 1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND + 2. a session exists (has been created) + 3. the request is not trapped by the "filter" attribute + + The filter attribute is to filter out requests that could not modify the session, + hence we don't replicate the session after the end of this request. + The filter is negative, ie, anything you put in the filter, you mean to filter out, + ie, no replication will be done on requests that match one of the filters. + The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to. + + filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI + ending with .gif and .js are intercepted. + + The deployer element can be used to deploy apps cluster wide. + Currently the deployment only deploys/undeploys to working members in the cluster + so no WARs are copied upons startup of a broken node. + The deployer watches a directory (watchDir) for WAR files when watchEnabled="true" + When a new war file is added the war gets deployed to the local instance, + and then deployed to the other instances in the cluster. + When a war file is deleted from the watchDir the war is undeployed locally + and cluster wide + --> + + <!-- + <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" + managerClassName="org.apache.catalina.cluster.session.DeltaManager" + expireSessionsOnShutdown="false" + useDirtyFlag="true" + notifyListenersOnReplication="true"> + + <Membership + className="org.apache.catalina.cluster.mcast.McastService" + mcastAddr="228.0.0.4" + mcastPort="45564" + mcastFrequency="500" + mcastDropTime="3000"/> + + <Receiver + className="org.apache.catalina.cluster.tcp.ReplicationListener" + tcpListenAddress="auto" + tcpListenPort="4001" + tcpSelectorTimeout="100" + tcpThreadCount="6"/> + + <Sender + className="org.apache.catalina.cluster.tcp.ReplicationTransmitter" + replicationMode="pooled" + ackTimeout="15000" + waitForAck="true"/> + + <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve" + filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/> + + <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer" + tempDir="/tmp/war-temp/" + deployDir="/tmp/war-deploy/" + watchDir="/tmp/war-listen/" + watchEnabled="false"/> + + <ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/> + </Cluster> + --> + + + <!-- Normally, users must authenticate themselves to each web app + individually. Uncomment the following entry if you would like + a user to be authenticated the first time they encounter a + resource protected by a security constraint, and then have that + user identity maintained across *all* web applications contained + in this virtual host. --> + <!-- + <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> + --> + + <!-- Access log processes all requests for this virtual host. By + default, log files are created in the "logs" directory relative to + $CATALINA_HOME. If you wish, you can specify a different + directory with the "directory" attribute. Specify either a relative + (to $CATALINA_HOME) or absolute path to the desired directory. + --> + <!-- + <Valve className="org.apache.catalina.valves.AccessLogValve" + directory="logs" prefix="localhost_access_log." suffix=".txt" + pattern="common" resolveHosts="false"/> + --> + + <!-- Access log processes all requests for this virtual host. By + default, log files are created in the "logs" directory relative to + $CATALINA_HOME. If you wish, you can specify a different + directory with the "directory" attribute. Specify either a relative + (to $CATALINA_HOME) or absolute path to the desired directory. + This access log implementation is optimized for maximum performance, + but is hardcoded to support only the "common" and "combined" patterns. + --> + <!-- + <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" + directory="logs" prefix="localhost_access_log." suffix=".txt" + pattern="common" resolveHosts="false"/> + --> + + </Host> + + </Engine> + + </Service> + +</Server> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/tomcat-users.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/tomcat-users.xml new file mode 100644 index 000000000..472566645 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/tomcat-users.xml @@ -0,0 +1,29 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + + <!-- + NOTE: By default, no user is included in the "manager" role required + to operate the "/manager" web application. If you wish to use this app, + you must define such a user - the username and password are arbitrary. + --> +<tomcat-users> + <user name="tomcat" password="tomcat" roles="tomcat"/> + <user name="role1" password="tomcat" roles="role1"/> + <user name="both" password="tomcat" roles="tomcat,role1"/> +</tomcat-users> diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/web.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/web.xml new file mode 100644 index 000000000..0263f1e46 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/web.xml @@ -0,0 +1,1183 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" + version="2.4"> + + <!-- ======================== Introduction ============================== --> + <!-- This document defines default values for *all* web applications --> + <!-- loaded into this instance of Tomcat. As each application is --> + <!-- deployed, this file is processed, followed by the --> + <!-- "/WEB-INF/web.xml" deployment descriptor from your own --> + <!-- applications. --> + <!-- --> + <!-- WARNING: Do not configure application-specific resources here! --> + <!-- They should go in the "/WEB-INF/web.xml" file in your application. --> + + + <!-- ================== Built In Servlet Definitions ==================== --> + + + <!-- The default servlet for all web applications, that serves static --> + <!-- resources. It processes all requests that are not mapped to other --> + <!-- servlets with servlet mappings (defined either here or in your own --> + <!-- web.xml file. This servlet supports the following initialization --> + <!-- parameters (default values are in square brackets): --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- fileEncoding Encoding to be used to read static resources --> + <!-- [platform default] --> + <!-- --> + <!-- input Input buffer size (in bytes) when reading --> + <!-- resources to be served. [2048] --> + <!-- --> + <!-- listings Should directory listings be produced if there --> + <!-- is no welcome file in this directory? [false] --> + <!-- WARNING: Listings for directories with many --> + <!-- entries can be slow and may consume --> + <!-- significant proportions of server resources. --> + <!-- --> + <!-- output Output buffer size (in bytes) when writing --> + <!-- resources to be served. [2048] --> + <!-- --> + <!-- readonly Is this context "read only", so HTTP --> + <!-- commands like PUT and DELETE are --> + <!-- rejected? [true] --> + <!-- --> + <!-- readmeFile File name to display with the directory --> + <!-- contents. [null] --> + <!-- --> + <!-- sendfileSize If the connector used supports sendfile, this --> + <!-- represents the minimal file size in KB for --> + <!-- which sendfile will be used. Use a negative --> + <!-- value to always disable sendfile. [48] --> + <!-- --> + <!-- For directory listing customization. Checks localXsltFile, then --> + <!-- globalXsltFile, then defaults to original behavior. --> + <!-- --> + <!-- localXsltFile Make directory listings an XML doc and --> + <!-- pass the result to this style sheet residing --> + <!-- in that directory. This overrides --> + <!-- globalXsltFile[null] --> + <!-- --> + <!-- globalXsltFile Site wide configuration version of --> + <!-- localXsltFile This argument is expected --> + <!-- to be a physical file. [null] --> + <!-- --> + <!-- --> + + <servlet> + <servlet-name>default</servlet-name> + <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>listings</param-name> + <param-value>false</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + + + <!-- The "invoker" servlet, which executes anonymous servlet classes --> + <!-- that have not been defined in a web.xml file. Traditionally, this --> + <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map --> + <!-- it to other patterns as well. The extra path info portion of such a --> + <!-- request must be the fully qualified class name of a Java class that --> + <!-- implements Servlet (or extends HttpServlet), or the servlet name --> + <!-- of an existing servlet definition. This servlet supports the --> + <!-- following initialization parameters (default values are in square --> + <!-- brackets): --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + + <!-- + <servlet> + <servlet-name>invoker</servlet-name> + <servlet-class> + org.apache.catalina.servlets.InvokerServlet + </servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <load-on-startup>2</load-on-startup> + </servlet> + --> + + + <!-- The JSP page compiler and execution servlet, which is the mechanism --> + <!-- used by Tomcat to support JSP pages. Traditionally, this servlet --> + <!-- is mapped to the URL pattern "*.jsp". This servlet supports the --> + <!-- following initialization parameters (default values are in square --> + <!-- brackets): --> + <!-- --> + <!-- checkInterval If development is false and checkInterval is --> + <!-- greater than zero, background compilations are --> + <!-- enabled. checkInterval is the time in seconds --> + <!-- between checks to see if a JSP page needs to --> + <!-- be recompiled. [0] --> + <!-- --> + <!-- modificationTestInterval --> + <!-- Causes a JSP (and its dependent files) to not --> + <!-- be checked for modification during the --> + <!-- specified time interval (in seconds) from the --> + <!-- last time the JSP was checked for --> + <!-- modification. A value of 0 will cause the JSP --> + <!-- to be checked on every access. --> + <!-- Used in development mode only. [4] --> + <!-- --> + <!-- compiler Which compiler Ant should use to compile JSP --> + <!-- pages. See the Ant documentation for more --> + <!-- information. [javac] --> + <!-- --> + <!-- classdebuginfo Should the class file be compiled with --> + <!-- debugging information? [true] --> + <!-- --> + <!-- classpath What class path should I use while compiling --> + <!-- generated servlets? [Created dynamically --> + <!-- based on the current web application] --> + <!-- --> + <!-- development Is Jasper used in development mode? If true, --> + <!-- the frequency at which JSPs are checked for --> + <!-- modification may be specified via the --> + <!-- modificationTestInterval parameter. [true] --> + <!-- --> + <!-- enablePooling Determines whether tag handler pooling is --> + <!-- enabled [true] --> + <!-- --> + <!-- fork Tell Ant to fork compiles of JSP pages so that --> + <!-- a separate JVM is used for JSP page compiles --> + <!-- from the one Tomcat is running in. [true] --> + <!-- --> + <!-- ieClassId The class-id value to be sent to Internet --> + <!-- Explorer when using <jsp:plugin> tags. --> + <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] --> + <!-- --> + <!-- javaEncoding Java file encoding to use for generating java --> + <!-- source files. [UTF8] --> + <!-- --> + <!-- keepgenerated Should we keep the generated Java source code --> + <!-- for each page instead of deleting it? [true] --> + <!-- --> + <!-- mappedfile Should we generate static content with one --> + <!-- print statement per input line, to ease --> + <!-- debugging? [true] --> + <!-- --> + <!-- trimSpaces Should white spaces in template text between --> + <!-- actions or directives be trimmed? [false] --> + <!-- --> + <!-- suppressSmap Should the generation of SMAP info for JSR45 --> + <!-- debugging be suppressed? [false] --> + <!-- --> + <!-- dumpSmap Should the SMAP info for JSR45 debugging be --> + <!-- dumped to a file? [false] --> + <!-- False if suppressSmap is true --> + <!-- --> + <!-- genStrAsCharArray Should text strings be generated as char --> + <!-- arrays, to improve performance in some cases? --> + <!-- [false] --> + <!-- --> + <!-- errorOnUseBeanInvalidClassAttribute --> + <!-- Should Jasper issue an error when the value of --> + <!-- the class attribute in an useBean action is --> + <!-- not a valid bean class? [true] --> + <!-- --> + <!-- scratchdir What scratch directory should we use when --> + <!-- compiling JSP pages? [default work directory --> + <!-- for the current web application] --> + <!-- --> + <!-- xpoweredBy Determines whether X-Powered-By response --> + <!-- header is added by generated servlet [false] --> + <!-- --> + <!-- compilerTargetVM Compiler target VM --> + <!-- default is System.properties --> + <!-- java.specification.version > 1.4 --> + <!-- [1.5] else [1.4] --> + <!-- --> + <!-- compilerSourceVM Compiler source VM --> + <!-- default is System.properties --> + <!-- java.specification.version > 1.4 --> + <!-- [1.5] else [1.4] --> + <!-- --> + <!-- If you wish to use Jikes to compile JSP pages: --> + <!-- Please see the "Using Jikes" section of the Jasper-HowTo --> + <!-- page in the Tomcat documentation. --> + + <servlet> + <servlet-name>jsp</servlet-name> + <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> + <init-param> + <param-name>fork</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>xpoweredBy</param-name> + <param-value>false</param-value> + </init-param> + <load-on-startup>3</load-on-startup> + </servlet> + + + <!-- NOTE: An SSI Filter is also available as an alternative SSI --> + <!-- implementation. Use either the Servlet or the Filter but NOT both. --> + <!-- --> + <!-- Server Side Includes processing servlet, which processes SSI --> + <!-- directives in HTML pages consistent with similar support in web --> + <!-- servers like Apache. Traditionally, this servlet is mapped to the --> + <!-- URL pattern "*.shtml". This servlet supports the following --> + <!-- initialization parameters (default values are in square brackets): --> + <!-- --> + <!-- buffered Should output from this servlet be buffered? --> + <!-- (0=false, 1=true) [0] --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- expires The number of seconds before a page with SSI --> + <!-- directives will expire. [No default] --> + <!-- --> + <!-- isVirtualWebappRelative --> + <!-- Should "virtual" paths be interpreted as --> + <!-- relative to the context root, instead of --> + <!-- the server root? (0=false, 1=true) [0] --> + <!-- --> + <!-- inputEncoding The encoding to assume for SSI resources if --> + <!-- one is not available from the resource. --> + <!-- [Platform default] --> + <!-- --> + <!-- outputEncoding The encoding to use for the page that results --> + <!-- from the SSI processing. [UTF-8] --> + <!-- --> + <!-- --> + <!-- IMPORTANT: To use the SSI servlet, you also need to rename the --> + <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file --> + <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar --> + + <!-- + <servlet> + <servlet-name>ssi</servlet-name> + <servlet-class> + org.apache.catalina.ssi.SSIServlet + </servlet-class> + <init-param> + <param-name>buffered</param-name> + <param-value>1</param-value> + </init-param> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>expires</param-name> + <param-value>666</param-value> + </init-param> + <init-param> + <param-name>isVirtualWebappRelative</param-name> + <param-value>0</param-value> + </init-param> + <load-on-startup>4</load-on-startup> + </servlet> + --> + + + <!-- Common Gateway Includes (CGI) processing servlet, which supports --> + <!-- execution of external applications that conform to the CGI spec --> + <!-- requirements. Typically, this servlet is mapped to the URL pattern --> + <!-- "/cgi-bin/*", which means that any CGI applications that are --> + <!-- executed must be present within the web application. This servlet --> + <!-- supports the following initialization parameters (default values --> + <!-- are in square brackets): --> + <!-- --> + <!-- cgiPathPrefix The CGI search path will start at --> + <!-- webAppRootDir + File.separator + this prefix. --> + <!-- [WEB-INF/cgi] --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- executable Name of the exectuable used to run the --> + <!-- script. [perl] --> + <!-- --> + <!-- parameterEncoding Name of parameter encoding to be used with --> + <!-- CGI servlet. --> + <!-- [System.getProperty("file.encoding","UTF-8")] --> + <!-- --> + <!-- passShellEnvironment Should the shell environment variables (if --> + <!-- any) be passed to the CGI script? [false] --> + <!-- --> + <!-- IMPORTANT: To use the CGI servlet, you also need to rename the --> + <!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file --> + <!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar --> + + <!-- + <servlet> + <servlet-name>cgi</servlet-name> + <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>cgiPathPrefix</param-name> + <param-value>WEB-INF/cgi</param-value> + </init-param> + <load-on-startup>5</load-on-startup> + </servlet> + --> + + + <!-- ================ Built In Servlet Mappings ========================= --> + + + <!-- The servlet mappings for the built in servlets defined above. Note --> + <!-- that, by default, the CGI and SSI servlets are *not* mapped. You --> + <!-- must uncomment these mappings (or add them to your application's own --> + <!-- web.xml deployment descriptor) to enable these services --> + + <!-- The mapping for the default servlet --> + <servlet-mapping> + <servlet-name>default</servlet-name> + <url-pattern>/</url-pattern> + </servlet-mapping> + + <!-- The mapping for the invoker servlet --> + <!-- + <servlet-mapping> + <servlet-name>invoker</servlet-name> + <url-pattern>/servlet/*</url-pattern> + </servlet-mapping> + --> + + <!-- The mapping for the JSP servlet --> + <servlet-mapping> + <servlet-name>jsp</servlet-name> + <url-pattern>*.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>jsp</servlet-name> + <url-pattern>*.jspx</url-pattern> + </servlet-mapping> + + <!-- The mapping for the SSI servlet --> + <!-- + <servlet-mapping> + <servlet-name>ssi</servlet-name> + <url-pattern>*.shtml</url-pattern> + </servlet-mapping> + --> + + <!-- The mapping for the CGI Gateway servlet --> + + <!-- + <servlet-mapping> + <servlet-name>cgi</servlet-name> + <url-pattern>/cgi-bin/*</url-pattern> + </servlet-mapping> + --> + + + <!-- ================== Built In Filter Definitions ===================== --> + + <!-- NOTE: An SSI Servlet is also available as an alternative SSI --> + <!-- implementation. Use either the Servlet or the Filter but NOT both. --> + <!-- --> + <!-- Server Side Includes processing filter, which processes SSI --> + <!-- directives in HTML pages consistent with similar support in web --> + <!-- servers like Apache. Traditionally, this filter is mapped to the --> + <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will --> + <!-- selectively enable/disable SSI processing based on mime types. For --> + <!-- this to work you will need to uncomment the .shtml mime type --> + <!-- definition towards the bottom of this file. --> + <!-- The contentType init param allows you to apply SSI processing to JSP --> + <!-- pages, javascript, or any other content you wish. This filter --> + <!-- supports the following initialization parameters (default values are --> + <!-- in square brackets): --> + <!-- --> + <!-- contentType A regex pattern that must be matched before --> + <!-- SSI processing is applied. --> + <!-- [text/x-server-parsed-html(;.*)?] --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- expires The number of seconds before a page with SSI --> + <!-- directives will expire. [No default] --> + <!-- --> + <!-- isVirtualWebappRelative --> + <!-- Should "virtual" paths be interpreted as --> + <!-- relative to the context root, instead of --> + <!-- the server root? (0=false, 1=true) [0] --> + <!-- --> + <!-- --> + <!-- IMPORTANT: To use the SSI filter, you also need to rename the --> + <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file --> + <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar --> + + <!-- + <filter> + <filter-name>ssi</filter-name> + <filter-class> + org.apache.catalina.ssi.SSIFilter + </filter-class> + <init-param> + <param-name>contentType</param-name> + <param-value>text/x-server-parsed-html(;.*)?</param-value> + </init-param> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>expires</param-name> + <param-value>666</param-value> + </init-param> + <init-param> + <param-name>isVirtualWebappRelative</param-name> + <param-value>0</param-value> + </init-param> + </filter> + --> + + + <!-- ==================== Built In Filter Mappings ====================== --> + + <!-- The mapping for the SSI Filter --> + <!-- + <filter-mapping> + <filter-name>ssi</filter-name> + <url-pattern>*.shtml</url-pattern> + </filter-mapping> + --> + + + <!-- ==================== Default Session Configuration ================= --> + <!-- You can set the default session timeout (in minutes) for all newly --> + <!-- created sessions by modifying the value below. --> + + <session-config> + <session-timeout>30</session-timeout> + </session-config> + + + <!-- ===================== Default MIME Type Mappings =================== --> + <!-- When serving static resources, Tomcat will automatically generate --> + <!-- a "Content-Type" header based on the resource's filename extension, --> + <!-- based on these mappings. Additional mappings can be added here (to --> + <!-- apply to all web applications), or in your own application's web.xml --> + <!-- deployment descriptor. --> + + <mime-mapping> + <extension>abs</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ai</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aif</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aifc</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aiff</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aim</extension> + <mime-type>application/x-aim</mime-type> + </mime-mapping> + <mime-mapping> + <extension>art</extension> + <mime-type>image/x-jg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asf</extension> + <mime-type>video/x-ms-asf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asx</extension> + <mime-type>video/x-ms-asf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>au</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>avi</extension> + <mime-type>video/x-msvideo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>avx</extension> + <mime-type>video/x-rad-screenplay</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bcpio</extension> + <mime-type>application/x-bcpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bin</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bmp</extension> + <mime-type>image/bmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>body</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdf</extension> + <mime-type>application/x-netcdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cer</extension> + <mime-type>application/x-x509-ca-cert</mime-type> + </mime-mapping> + <mime-mapping> + <extension>class</extension> + <mime-type>application/java</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cpio</extension> + <mime-type>application/x-cpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>csh</extension> + <mime-type>application/x-csh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>css</extension> + <mime-type>text/css</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dib</extension> + <mime-type>image/bmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>doc</extension> + <mime-type>application/msword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dtd</extension> + <mime-type>application/xml-dtd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dv</extension> + <mime-type>video/x-dv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dvi</extension> + <mime-type>application/x-dvi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eps</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>etx</extension> + <mime-type>text/x-setext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>exe</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gif</extension> + <mime-type>image/gif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gtar</extension> + <mime-type>application/x-gtar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gz</extension> + <mime-type>application/x-gzip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hdf</extension> + <mime-type>application/x-hdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>htc</extension> + <mime-type>text/x-component</mime-type> + </mime-mapping> + <mime-mapping> + <extension>htm</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>html</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hqx</extension> + <mime-type>application/mac-binhex40</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ico</extension> + <mime-type>image/x-icon</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ief</extension> + <mime-type>image/ief</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jad</extension> + <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jar</extension> + <mime-type>application/java-archive</mime-type> + </mime-mapping> + <mime-mapping> + <extension>java</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jnlp</extension> + <mime-type>application/x-java-jnlp-file</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpe</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpeg</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpg</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>js</extension> + <mime-type>text/javascript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jsf</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jspf</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kar</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>latex</extension> + <mime-type>application/x-latex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m3u</extension> + <mime-type>audio/x-mpegurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mac</extension> + <mime-type>image/x-macpaint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>man</extension> + <mime-type>application/x-troff-man</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mathml</extension> + <mime-type>application/mathml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>me</extension> + <mime-type>application/x-troff-me</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mid</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>midi</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mif</extension> + <mime-type>application/vnd.mif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mov</extension> + <mime-type>video/quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>movie</extension> + <mime-type>video/x-sgi-movie</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp1</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp2</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp3</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpa</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpe</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpeg</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpega</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpg</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpv2</extension> + <mime-type>video/mpeg2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ms</extension> + <mime-type>application/x-troff-ms</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nc</extension> + <mime-type>application/x-netcdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oda</extension> + <mime-type>application/oda</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Database --> + <extension>odb</extension> + <mime-type>application/vnd.oasis.opendocument.database</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Chart --> + <extension>odc</extension> + <mime-type>application/vnd.oasis.opendocument.chart</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Formula --> + <extension>odf</extension> + <mime-type>application/vnd.oasis.opendocument.formula</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Drawing --> + <extension>odg</extension> + <mime-type>application/vnd.oasis.opendocument.graphics</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Image --> + <extension>odi</extension> + <mime-type>application/vnd.oasis.opendocument.image</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Master Document --> + <extension>odm</extension> + <mime-type>application/vnd.oasis.opendocument.text-master</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Presentation --> + <extension>odp</extension> + <mime-type>application/vnd.oasis.opendocument.presentation</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Spreadsheet --> + <extension>ods</extension> + <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Text --> + <extension>odt</extension> + <mime-type>application/vnd.oasis.opendocument.text</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ogg</extension> + <mime-type>application/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Drawing Template --> + <extension>otg</extension> + <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- HTML Document Template --> + <extension>oth</extension> + <mime-type>application/vnd.oasis.opendocument.text-web</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Presentation Template --> + <extension>otp</extension> + <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Spreadsheet Template --> + <extension>ots</extension> + <mime-type>application/vnd.oasis.opendocument.spreadsheet-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Text Template --> + <extension>ott</extension> + <mime-type>application/vnd.oasis.opendocument.text-template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pbm</extension> + <mime-type>image/x-portable-bitmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pct</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pdf</extension> + <mime-type>application/pdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pgm</extension> + <mime-type>image/x-portable-graymap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pic</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pict</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pls</extension> + <mime-type>audio/x-scpls</mime-type> + </mime-mapping> + <mime-mapping> + <extension>png</extension> + <mime-type>image/png</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pnm</extension> + <mime-type>image/x-portable-anymap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pnt</extension> + <mime-type>image/x-macpaint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppm</extension> + <mime-type>image/x-portable-pixmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pps</extension> + <mime-type>application/vnd.ms-powerpoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppt</extension> + <mime-type>application/vnd.ms-powerpoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ps</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>psd</extension> + <mime-type>image/x-photoshop</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qt</extension> + <mime-type>video/quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qti</extension> + <mime-type>image/x-quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qtif</extension> + <mime-type>image/x-quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ras</extension> + <mime-type>image/x-cmu-raster</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rdf</extension> + <mime-type>application/rdf+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rgb</extension> + <mime-type>image/x-rgb</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rm</extension> + <mime-type>application/vnd.rn-realmedia</mime-type> + </mime-mapping> + <mime-mapping> + <extension>roff</extension> + <mime-type>application/x-troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rtf</extension> + <mime-type>text/rtf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rtx</extension> + <mime-type>text/richtext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sh</extension> + <mime-type>application/x-sh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>shar</extension> + <mime-type>application/x-shar</mime-type> + </mime-mapping> + <!-- + <mime-mapping> + <extension>shtml</extension> + <mime-type>text/x-server-parsed-html</mime-type> + </mime-mapping> + --> + <mime-mapping> + <extension>smf</extension> + <mime-type>audio/x-midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sit</extension> + <mime-type>application/x-stuffit</mime-type> + </mime-mapping> + <mime-mapping> + <extension>snd</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>src</extension> + <mime-type>application/x-wais-source</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sv4cpio</extension> + <mime-type>application/x-sv4cpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sv4crc</extension> + <mime-type>application/x-sv4crc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svg</extension> + <mime-type>image/svg+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svgz</extension> + <mime-type>image/svg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>swf</extension> + <mime-type>application/x-shockwave-flash</mime-type> + </mime-mapping> + <mime-mapping> + <extension>t</extension> + <mime-type>application/x-troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tar</extension> + <mime-type>application/x-tar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tcl</extension> + <mime-type>application/x-tcl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tex</extension> + <mime-type>application/x-tex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>texi</extension> + <mime-type>application/x-texinfo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>texinfo</extension> + <mime-type>application/x-texinfo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tif</extension> + <mime-type>image/tiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tiff</extension> + <mime-type>image/tiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tr</extension> + <mime-type>application/x-troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tsv</extension> + <mime-type>text/tab-separated-values</mime-type> + </mime-mapping> + <mime-mapping> + <extension>txt</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ulw</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ustar</extension> + <mime-type>application/x-ustar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vrml</extension> + <mime-type>model/vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vsd</extension> + <mime-type>application/x-visio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vxml</extension> + <mime-type>application/voicexml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wav</extension> + <mime-type>audio/x-wav</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Wireless Bitmap --> + <extension>wbmp</extension> + <mime-type>image/vnd.wap.wbmp</mime-type> + </mime-mapping> + <mime-mapping> + <!-- WML Source --> + <extension>wml</extension> + <mime-type>text/vnd.wap.wml</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Compiled WML --> + <extension>wmlc</extension> + <mime-type>application/vnd.wap.wmlc</mime-type> + </mime-mapping> + <mime-mapping> + <!-- WML Script Source --> + <extension>wmls</extension> + <mime-type>text/vnd.wap.wmlscript</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Compiled WML Script --> + <extension>wmlscriptc</extension> + <mime-type>application/vnd.wap.wmlscriptc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wrl</extension> + <mime-type>model/vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xbm</extension> + <mime-type>image/x-xbitmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xht</extension> + <mime-type>application/xhtml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xhtml</extension> + <mime-type>application/xhtml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xls</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xml</extension> + <mime-type>application/xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpm</extension> + <mime-type>image/x-xpixmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xsl</extension> + <mime-type>application/xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xslt</extension> + <mime-type>application/xslt+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xul</extension> + <mime-type>application/vnd.mozilla.xul+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xwd</extension> + <mime-type>image/x-xwindowdump</mime-type> + </mime-mapping> + <mime-mapping> + <extension>Z</extension> + <mime-type>application/x-compress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z</extension> + <mime-type>application/x-compress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zip</extension> + <mime-type>application/zip</mime-type> + </mime-mapping> + + <!-- ==================== Default Welcome File List ===================== --> + <!-- When a request URI refers to a directory, the default servlet looks --> + <!-- for a "welcome file" within that directory and, if present, --> + <!-- to the corresponding resource URI for display. If no welcome file --> + <!-- is present, the default servlet either serves a directory listing, --> + <!-- or returns a 404 status, depending on how it is configured. --> + <!-- --> + <!-- If you define welcome files in your own application's web.xml --> + <!-- deployment descriptor, that list *replaces* the list configured --> + <!-- here, so be sure that you include any of the default values that --> + <!-- you wish to include. --> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> + +</web-app> |