From 4c9789b2284a3d8bde67405fe8651fbf674dbca8 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 1 May 2007 13:37:43 +0000 Subject: [PATCH] Merging changes from old (archiva-0.9) trunk into branch. svn merge revision 518676 to 534045. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@534082 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-base/archiva-configuration/pom.xml | 4 +- archiva-base/archiva-proxy/pom.xml | 6 + archiva-base/archiva-repository-layer/pom.xml | 2 - .../site/apt/guides/getting-started/index.apt | 4 +- .../archiva-plexus-runtime/pom.xml | 2 +- archiva-web/archiva-webapp-test/pom.xml | 55 ++++- .../web/test/AbstractArchivaTestCase.java | 27 +- .../web/test/BrowseRepositoryTest.java | 194 +++++++++++++++ .../maven/archiva/web/test/LoginTest.java | 10 +- .../web/test/ManagedRepositoryTest.java | 201 +++++++++++++++ .../web/test/ProxiedRepositoryTest.java | 233 ++++++++++++++++++ .../maven/archiva/web/test/SearchTest.java | 129 ++++++++++ .../maven/archiva/web/test/SettingsTest.java | 184 ++++++++++++++ .../resources/appserver-base/conf/archiva.xml | 1 + .../resources/appserver-base/conf/shared.xml | 1 + .../test/resources/repository/.datarefresh | 7 + .../artifact-a/1.0/artifact-a-1.0.jar.md5 | 1 + .../artifact-a/1.0/artifact-a-1.0.jar.sha1 | 1 + .../test/artifact-a/1.0/artifact-a-1.0.pom | 25 ++ .../artifact-a/1.0/artifact-a-1.0.pom.md5 | 1 + .../artifact-a/1.0/artifact-a-1.0.pom.sha1 | 1 + .../web/test/artifact-a/maven-metadata.xml | 11 + .../test/artifact-a/maven-metadata.xml.md5 | 1 + .../test/artifact-a/maven-metadata.xml.sha1 | 1 + .../artifact-b/2.0/artifact-b-2.0.jar.md5 | 1 + .../artifact-b/2.0/artifact-b-2.0.jar.sha1 | 1 + .../test/artifact-b/2.0/artifact-b-2.0.pom | 25 ++ .../artifact-b/2.0/artifact-b-2.0.pom.md5 | 1 + .../artifact-b/2.0/artifact-b-2.0.pom.sha1 | 1 + .../web/test/artifact-b/maven-metadata.xml | 11 + .../test/artifact-b/maven-metadata.xml.md5 | 1 + .../test/artifact-b/maven-metadata.xml.sha1 | 1 + .../artifact-c/3.0/artifact-c-3.0.jar.md5 | 1 + .../artifact-c/3.0/artifact-c-3.0.jar.sha1 | 1 + .../test/artifact-c/3.0/artifact-c-3.0.pom | 26 ++ .../artifact-c/3.0/artifact-c-3.0.pom.md5 | 1 + .../artifact-c/3.0/artifact-c-3.0.pom.sha1 | 1 + .../web/test/artifact-c/maven-metadata.xml | 11 + .../test/artifact-c/maven-metadata.xml.md5 | 1 + .../test/artifact-c/maven-metadata.xml.sha1 | 1 + .../artifact-s/0.1/artifact-s-0.1.jar.md5 | 1 + .../artifact-s/0.1/artifact-s-0.1.jar.sha1 | 1 + .../test/artifact-s/0.1/artifact-s-0.1.pom | 25 ++ .../artifact-s/0.1/artifact-s-0.1.pom.md5 | 1 + .../artifact-s/0.1/artifact-s-0.1.pom.sha1 | 1 + .../web/test/artifact-s/maven-metadata.xml | 11 + .../test/artifact-s/maven-metadata.xml.md5 | 1 + .../test/artifact-s/maven-metadata.xml.sha1 | 1 + .../conf/Catalina/localhost/archiva.xml | 6 + archiva-web/archiva-webapp/pom.xml | 12 +- .../webapp/WEB-INF/jsp/decorators/default.jsp | 10 +- maven-meeper/pom.xml | 3 +- maven-meeper/src/bin/synchronize.sh | 10 + .../m2-sync/conf/com.agical.rmock.sh | 7 + .../synchronize/m2-sync/conf/com.pyx4me.sh | 9 + .../synchronize/m2-sync/conf/net.sf.jxls.sh | 7 + .../synchronize/m2-sync/conf/org.jdtaus.sh | 9 + pom.xml | 31 ++- 58 files changed, 1293 insertions(+), 40 deletions(-) create mode 100644 archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java create mode 100644 archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java create mode 100644 archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java create mode 100644 archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java create mode 100644 archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom create mode 100644 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 create mode 100644 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 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 create mode 100644 archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 create mode 100755 maven-meeper/src/bin/synchronize/m2-sync/conf/com.agical.rmock.sh create mode 100755 maven-meeper/src/bin/synchronize/m2-sync/conf/com.pyx4me.sh create mode 100755 maven-meeper/src/bin/synchronize/m2-sync/conf/net.sf.jxls.sh create mode 100755 maven-meeper/src/bin/synchronize/m2-sync/conf/org.jdtaus.sh diff --git a/archiva-base/archiva-configuration/pom.xml b/archiva-base/archiva-configuration/pom.xml index 4fd8e9441..13e5d4d83 100644 --- a/archiva-base/archiva-configuration/pom.xml +++ b/archiva-base/archiva-configuration/pom.xml @@ -66,12 +66,10 @@ org.codehaus.plexus.registry plexus-registry-api - 1.0-alpha-2 org.codehaus.plexus.registry plexus-registry-commons - 1.0-alpha-2 test @@ -92,7 +90,7 @@ org.codehaus.modello modello-maven-plugin - 1.0-alpha-15-SNAPSHOT + 1.0-alpha-15 diff --git a/archiva-base/archiva-proxy/pom.xml b/archiva-base/archiva-proxy/pom.xml index 679910306..e9d55f1b3 100644 --- a/archiva-base/archiva-proxy/pom.xml +++ b/archiva-base/archiva-proxy/pom.xml @@ -52,6 +52,12 @@ org.codehaus.plexus plexus-digest + + + org.codehaus.plexus + plexus-container-default + + org.codehaus.plexus diff --git a/archiva-base/archiva-repository-layer/pom.xml b/archiva-base/archiva-repository-layer/pom.xml index c4570e90b..b7cbcec17 100644 --- a/archiva-base/archiva-repository-layer/pom.xml +++ b/archiva-base/archiva-repository-layer/pom.xml @@ -70,13 +70,11 @@ org.codehaus.plexus.cache plexus-cache-api - 1.0-alpha-2 compile org.codehaus.plexus.cache plexus-cache-ehcache - 1.0-alpha-2 compile diff --git a/archiva-site/src/site/apt/guides/getting-started/index.apt b/archiva-site/src/site/apt/guides/getting-started/index.apt index 1e76cc826..21fa59727 100644 --- a/archiva-site/src/site/apt/guides/getting-started/index.apt +++ b/archiva-site/src/site/apt/guides/getting-started/index.apt @@ -42,7 +42,7 @@ To build * Download the 1.0.1B jta zip from: {{http://java.sun.com/products/jta/}} - * Install it: mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta Dversion=1.0.1B -Dpackaging=jar -Dfile=jta-1_0_1B-classes.zip + * Install it: mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=jta-1_0_1B-classes.zip Otherwise: @@ -92,7 +92,7 @@ To deploy Archiva to Tomcat 5.5 instead, or see {{{http://issues.apache.org/bugzilla/show_bug.cgi?id=40668} Bug 40668}} for a workaround. - * Copy archiva/archiva-webapp/target/archiva-webapp-1.0-SNAPSHOT/WEB-INF/lib/derby-10.1.3.1.jar into the tomcat common/lib + * Copy $HOME/.m2/org/apache/derby/derby/10.1.3.1/derby-10.1.3.1.jar (or from the remote repository) into the tomcat common/lib * To deal with a current bug, you'll also need to add the following to your ${catalina.home}/conf/web.xml in the relevant section (search for jspx): diff --git a/archiva-web/archiva-standalone/archiva-plexus-runtime/pom.xml b/archiva-web/archiva-standalone/archiva-plexus-runtime/pom.xml index 237663cd5..bb0338b86 100644 --- a/archiva-web/archiva-standalone/archiva-plexus-runtime/pom.xml +++ b/archiva-web/archiva-standalone/archiva-plexus-runtime/pom.xml @@ -141,7 +141,7 @@ src/main/assembly/bin.xml - archiva + archiva-${version} diff --git a/archiva-web/archiva-webapp-test/pom.xml b/archiva-web/archiva-webapp-test/pom.xml index bfaf14816..36b3e505a 100644 --- a/archiva-web/archiva-webapp-test/pom.xml +++ b/archiva-web/archiva-webapp-test/pom.xml @@ -42,6 +42,23 @@ 1.0-SNAPSHOT test + + + + org.apache.derby + derby + 10.1.3.1 + + + javax.mail + mail + 1.4 + + + javax.activation + activation + 1.1 + @@ -69,11 +86,43 @@ ${project.build.directory}/${container.name}conf/webapps/archiva + + prepare-provided-dependencies + generate-resources + + copy-dependencies + + + false + true + false + ${project.build.directory}/providedDependencies + + maven-antrun-plugin + + generate-resources + + run + + + + + + + + + + + + + + + copy-container-conf package @@ -84,8 +133,8 @@ - - + + @@ -168,7 +217,7 @@ ${project.build.directory}/logs/${container.name}.out 600000 - ${project.build.directory} + ${project.build.directory}/appserver-base diff --git a/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java b/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java index 63510c7b1..de0db4e7e 100644 --- a/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java +++ b/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java @@ -44,15 +44,15 @@ public abstract class AbstractArchivaTestCase if ( getTitle().equals( getTitlePrefix() + "Configuration" ) ) { //Add Managed Repository - setFieldValue( "id", "web-ui" ); - setFieldValue( "urlName", "web-ui" ); + setFieldValue( "id", "test-repository" ); + setFieldValue( "urlName", "test-repository" ); setFieldValue( "name", "Web UI Test Managed Repository" ); - setFieldValue( "directory", getBasedir() + "target/web-ui-dir" ); + setFieldValue( "directory", getBasedir() + "/target/repository" ); clickButtonWithValue( "Add Repository" ); //Set Index location assertPage( "Configuration" ); - setFieldValue( "indexPath", getBasedir() + "target/web-ui-index" ); + setFieldValue( "indexPath", getBasedir() + "/target/index" ); clickButtonWithValue( "Save Configuration" ); assertPage( "Administration" ); } @@ -60,16 +60,17 @@ public abstract class AbstractArchivaTestCase 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( "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']" ) ); + assertTrue( "bannerRight is missing", + getSelenium().isElementPresent( "xpath=//div[@id='banner']/span[@id='bannerRight']" ) ); } protected String getTitlePrefix() diff --git a/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java b/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-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 Napoleon Esmundo C. Ramirez + */ +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-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java b/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java index 03093d37e..6dda27d90 100644 --- a/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java +++ b/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java @@ -59,11 +59,11 @@ public class LoginTest submitLoginPage( adminUsername, adminPassword ); clickLinkWithText( "User Management" ); - assertPage( "[Admin] User List" ); - assertLinkNotPresent( username ); + //assertPage( "[Admin] User List" ); + //assertLinkNotPresent( username ); clickButtonWithValue( "Create New User" ); - assertPage( "[Admin] User Create" ); + //assertPage( "[Admin] User Create" ); setFieldValue( "user.username", username ); setFieldValue( "user.fullName", username + " FullName" ); setFieldValue( "user.email", username + "@localhost.com" ); @@ -71,8 +71,8 @@ public class LoginTest setFieldValue( "user.confirmPassword", password ); clickButtonWithValue( "Create User" ); waitPage(); - assertPage( "[Admin] User List" ); - assertLinkPresent( username ); + //assertPage( "[Admin] User List" ); + //assertLinkPresent( username ); logout(); } diff --git a/archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java b/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-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 Napoleon Esmundo C. Ramirez + */ +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-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java b/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-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 Maria Odea Ching + */ +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-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java b/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-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-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java b/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-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 Maria Odea Ching + */ +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-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml b/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml new file mode 100644 index 000000000..9afb83352 --- /dev/null +++ b/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml @@ -0,0 +1 @@ + diff --git a/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml b/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml new file mode 100644 index 000000000..9afb83352 --- /dev/null +++ b/archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml @@ -0,0 +1 @@ + diff --git a/archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh b/archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh new file mode 100644 index 000000000..c53a40aad --- /dev/null +++ b/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-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-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-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-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-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-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-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-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-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 @@ + + 4.0.0 + org.apache.maven.archiva.web.test + artifact-a + jar + 1.0 + artifact-a + http://maven.apache.org + + + org.apache.maven.archiva.web.test + artifact-b + 2.0 + + + + + + org.apache.maven.wagon + wagon-webdav + + + + diff --git a/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-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-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-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-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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml b/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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.archiva.web.test + artifact-a + 1.0 + + + 1.0 + + 20070417090928 + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 b/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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 b/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-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-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-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-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-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-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-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-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-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-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 @@ + + 4.0.0 + org.apache.maven.archiva.web.test + artifact-b + jar + 2.0 + artifact-b + http://maven.apache.org + + + org.apache.maven.archiva.web.test + artifact-c + 3.0 + + + + + + org.apache.maven.wagon + wagon-webdav + + + + diff --git a/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-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-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-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-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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml b/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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.archiva.web.test + artifact-b + 2.0 + + + 2.0 + + 20070417090908 + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 b/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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 b/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-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-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-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-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-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-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-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-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-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-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 @@ + + 4.0.0 + org.apache.maven.archiva.web.test + artifact-c + jar + 3.0 + artifact-c + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + + + + org.apache.maven.wagon + wagon-webdav + + + + diff --git a/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-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-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-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-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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml b/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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.archiva.web.test + artifact-c + 3.0 + + + 3.0 + + 20070417090835 + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 b/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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 b/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-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-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-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-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-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-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-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-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-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-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 @@ + + 4.0.0 + org.apache.maven.archiva.web.test + artifact-s + jar + 0.1 + artifact-s + http://maven.apache.org + + + org.apache.maven.archiva.web.test + artifact-a + 1.0 + + + + + + org.apache.maven.wagon + wagon-webdav + + + + diff --git a/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-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-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-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-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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml b/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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml @@ -0,0 +1,11 @@ + + org.apache.maven.archiva.web.test + artifact-s + 0.1 + + + 0.1 + + 20070417090721 + + \ No newline at end of file diff --git a/archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 b/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-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-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 b/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-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-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml b/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml index af0692056..180dbb742 100644 --- a/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml +++ b/archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml @@ -27,4 +27,10 @@ driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:target/database/users;create=true" /> + + diff --git a/archiva-web/archiva-webapp/pom.xml b/archiva-web/archiva-webapp/pom.xml index 5de5472b5..e693ed9a1 100644 --- a/archiva-web/archiva-webapp/pom.xml +++ b/archiva-web/archiva-webapp/pom.xml @@ -141,12 +141,20 @@ org.codehaus.plexus.registry plexus-registry-api - 1.0-alpha-2 org.codehaus.plexus.registry plexus-registry-commons - 1.0-alpha-2 + + + org.codehaus.plexus.cache + plexus-cache-api + compile + + + org.codehaus.plexus.cache + plexus-cache-ehcache + compile org.codehaus.plexus diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp index 848aaaf6b..f9d5710bb 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp @@ -31,12 +31,10 @@ - + " type="text/css" media="all"/> + " type="text/css" media="all"/> + " type="text/css" media="all"/> + " type="text/css" media="all"/> " type="text/css" media="print"/> " /> diff --git a/maven-meeper/pom.xml b/maven-meeper/pom.xml index 7843c9e46..e79f34b2f 100644 --- a/maven-meeper/pom.xml +++ b/maven-meeper/pom.xml @@ -15,8 +15,7 @@ ~ limitations under the License. --> - + org.apache.maven.archiva archiva-parent diff --git a/maven-meeper/src/bin/synchronize.sh b/maven-meeper/src/bin/synchronize.sh index 43abc34bc..525d15bb9 100755 --- a/maven-meeper/src/bin/synchronize.sh +++ b/maven-meeper/src/bin/synchronize.sh @@ -105,6 +105,16 @@ sha1sum $CL/maven-metadata.xml > $CL/maven-metadata.xml.sha1 retval=$?; if [ $retval != 0 ]; then exit $retval; fi retval=$?; if [ $retval != 0 ]; then exit $retval; fi +# ------------------------------------------------------------------------ +# Cica.es synchronization: sync the central repository to Cica.es +# ------------------------------------------------------------------------ + +[ "$MODE" = "batch" ] && echo && echo "Press any key to run the sync to Cica, or hit ^C to quit." && echo + +./synchronize-central-to-cica.sh $syncProperties +retval=$?; if [ $retval != 0 ]; then exit $retval; fi +retval=$?; if [ $retval != 0 ]; then exit $retval; fi + # ------------------------------------------------------------------------ # Copy the mod_rewrite rules to the Maven 1.x repository # ------------------------------------------------------------------------ diff --git a/maven-meeper/src/bin/synchronize/m2-sync/conf/com.agical.rmock.sh b/maven-meeper/src/bin/synchronize/m2-sync/conf/com.agical.rmock.sh new file mode 100755 index 000000000..b9acd7cd5 --- /dev/null +++ b/maven-meeper/src/bin/synchronize/m2-sync/conf/com.agical.rmock.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +CONTACTS="Daniel brolund " +MODE=rsync_ssh + +FROM=mavensync@shell.sourceforge.net:/home/groups/r/rm/rmock/htdocs/repository +GROUP_DIR=com/agical/rmock diff --git a/maven-meeper/src/bin/synchronize/m2-sync/conf/com.pyx4me.sh b/maven-meeper/src/bin/synchronize/m2-sync/conf/com.pyx4me.sh new file mode 100755 index 000000000..bae239a6d --- /dev/null +++ b/maven-meeper/src/bin/synchronize/m2-sync/conf/com.pyx4me.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +CONTACT="Vlad Skarzhevskyy " +MODE=rsync + +FROM=mavensync@pyx4me.com::maven2-release +GROUP_DIR=com/pyx4me/ + +NO_SSH=true \ No newline at end of file diff --git a/maven-meeper/src/bin/synchronize/m2-sync/conf/net.sf.jxls.sh b/maven-meeper/src/bin/synchronize/m2-sync/conf/net.sf.jxls.sh new file mode 100755 index 000000000..6125dc3db --- /dev/null +++ b/maven-meeper/src/bin/synchronize/m2-sync/conf/net.sf.jxls.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +CONTACTS="Leonid Vysochyn " +MODE=rsync_ssh + +FROM=mavensync@shell.sourceforge.net:/home/groups/j/jx/jxls/htdocs/repository/releases +GROUP_DIR=net/sf/jxls diff --git a/maven-meeper/src/bin/synchronize/m2-sync/conf/org.jdtaus.sh b/maven-meeper/src/bin/synchronize/m2-sync/conf/org.jdtaus.sh new file mode 100755 index 000000000..f2e9aa7b0 --- /dev/null +++ b/maven-meeper/src/bin/synchronize/m2-sync/conf/org.jdtaus.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +CONTACTS="Christian Schulte , jDTAUS Support " +MODE=rsync + +FROM=rsync://repository.jdtaus.org/repository +GROUP_DIR=org/jdtaus/ + +NO_SSH=true diff --git a/pom.xml b/pom.xml index 4b7094fa9..d8d355c13 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.apache.maven maven-parent - 4 + 5 ../pom/maven/pom.xml org.apache.maven.archiva @@ -86,6 +86,10 @@ http://svn.apache.org/viewcvs.cgi/maven/archiva/trunk + + apache.releases + scpexe://people.apache.org/www/people.apache.org/builds/maven/archiva/${version}/m2-staging-repository + apache.website @@ -136,6 +140,11 @@ + + org.codehaus.modello + modello-maven-plugin + 1.0-alpha-15 + @@ -183,6 +192,26 @@ plexus-utils 1.4 + + org.codehaus.plexus.registry + plexus-registry-api + 1.0-alpha-2 + + + org.codehaus.plexus.registry + plexus-registry-commons + 1.0-alpha-2 + + + org.codehaus.plexus.cache + plexus-cache-api + 1.0-alpha-2 + + + org.codehaus.plexus.cache + plexus-cache-ehcache + 1.0-alpha-2 + org.slf4j slf4j-log4j12 -- 2.39.5