]> source.dussan.org Git - archiva.git/commitdiff
Merging changes from old (archiva-0.9) trunk into branch. archiva-1.0.x@534089 archiva-backend-security@534089 tags/1.0-beta-1@534089 tags/archiva-1.0-alpha-1@534089 tags/archiva-1.0-alpha-2@534089 tags/archiva-1.0-beta-1@534089 tags/archiva-1.0-beta-2@534089 tags/archiva-1.0-beta-3@534089 tags/archiva-1.0-beta-4@534089 tags/archiva-1.0.1@534089 tags/archiva-1.0@534089 tags/archiva-parent-1.0-alpha-2@534089 trunk@534089
authorJoakim Erdfelt <joakime@apache.org>
Tue, 1 May 2007 13:37:43 +0000 (13:37 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Tue, 1 May 2007 13:37:43 +0000 (13:37 +0000)
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

58 files changed:
archiva-base/archiva-configuration/pom.xml
archiva-base/archiva-proxy/pom.xml
archiva-base/archiva-repository-layer/pom.xml
archiva-site/src/site/apt/guides/getting-started/index.apt
archiva-web/archiva-standalone/archiva-plexus-runtime/pom.xml
archiva-web/archiva-webapp-test/pom.xml
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/AbstractArchivaTestCase.java
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/BrowseRepositoryTest.java [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/LoginTest.java
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ManagedRepositoryTest.java [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/ProxiedRepositoryTest.java [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SearchTest.java [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/it/org/apache/maven/archiva/web/test/SettingsTest.java [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/archiva.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/appserver-base/conf/shared.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/.datarefresh [new file with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 [new file with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 [new file with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 [new file with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
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 with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-web/archiva-webapp-test/src/test/tomcat5x/conf/Catalina/localhost/archiva.xml
archiva-web/archiva-webapp/pom.xml
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
maven-meeper/pom.xml
maven-meeper/src/bin/synchronize.sh
maven-meeper/src/bin/synchronize/m2-sync/conf/com.agical.rmock.sh [new file with mode: 0755]
maven-meeper/src/bin/synchronize/m2-sync/conf/com.pyx4me.sh [new file with mode: 0755]
maven-meeper/src/bin/synchronize/m2-sync/conf/net.sf.jxls.sh [new file with mode: 0755]
maven-meeper/src/bin/synchronize/m2-sync/conf/org.jdtaus.sh [new file with mode: 0755]
pom.xml

index 4fd8e94415d217dd9c1696e56e517c2fc4490293..13e5d4d836bb8766fc5abdba5fd86d56c0a9bed5 100644 (file)
     <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>plexus-registry-api</artifactId>
-      <version>1.0-alpha-2</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>plexus-registry-commons</artifactId>
-      <version>1.0-alpha-2</version>
       <scope>test</scope>
     </dependency>
     <!-- Test Deps -->
@@ -92,7 +90,7 @@
       <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
-        <version>1.0-alpha-15-SNAPSHOT</version>
+        <version>1.0-alpha-15</version>
         <executions>
           <execution>
             <goals>
index 679910306257c76697385639c8331a3117f6a590..e9d55f1b3cfbc578e9e1e54d0219c555d121f40e 100644 (file)
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-digest</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
index c4570e90b24c6e456d4b174cd8ecace760251c25..b7cbcec17bc7f1fbe2e8aeec862c93848de69ca1 100644 (file)
     <dependency>
       <groupId>org.codehaus.plexus.cache</groupId>
       <artifactId>plexus-cache-api</artifactId>
-      <version>1.0-alpha-2</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus.cache</groupId>
       <artifactId>plexus-cache-ehcache</artifactId>
-      <version>1.0-alpha-2</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
index 1e76cc826090693ee26d7a874516a1964363f062..21fa5972785a3576906d69e2610bc37071ff43b4 100644 (file)
@@ -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):
 
index 237663cd5b27b88d050948654d3c26fa2b2c20b2..bb0338b86f9e73fd2f32dcc4d5691b6f5ab1aeeb 100644 (file)
         </executions>
         <configuration>
           <descriptor>src/main/assembly/bin.xml</descriptor>
-          <finalName>archiva</finalName>
+          <finalName>archiva-${version}</finalName>
         </configuration>
       </plugin>
       <plugin>
index bfaf14816fe1d3d7505b160a6e3ffc569d2cb6b9..36b3e505a9c5b3fbf2702db2c16d309bc9fbf61c 100644 (file)
       <version>1.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
+    
+    <!-- Dependencies below are provided by the appserver -->
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.1.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.mail</groupId>
+      <artifactId>mail</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.activation</groupId>
+      <artifactId>activation</artifactId>
+      <version>1.1</version>
+    </dependency>
   </dependencies>
 
   <build>
               <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>
+              </tasks>
+            </configuration>
+          </execution>
           <execution>
             <id>copy-container-conf</id>
             <phase>package</phase>
                 </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}/${container.name}conf/webapps/archiva/WEB-INF/lib">
-                    <include name="**/derby-*.jar"/>
+                  <fileset dir="${project.build.directory}/providedDependencies">
+                    <include name="**/*.jar"/>
                   </fileset>
                 </copy>
               </tasks>
             <output>${project.build.directory}/logs/${container.name}.out</output>
             <timeout>600000</timeout>
             <systemProperties>
-              <appserver.base>${project.build.directory}</appserver.base>
+              <appserver.base>${project.build.directory}/appserver-base</appserver.base>
             </systemProperties>
           </container>
           <configuration>
index 63510c7b1eeac28c90aececfc2b667fbf74e4099..de0db4e7e399b195a720458fd533b3b443898136 100644 (file)
@@ -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 (file)
index 0000000..a02dc1d
--- /dev/null
@@ -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"));
+    }
+}
index 03093d37ed3bc993058beeb89d763bf09acd8571..6dda27d904a2b306bdf13fa6997057d63fb7fe06 100644 (file)
@@ -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 (file)
index 0000000..b25ae81
--- /dev/null
@@ -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-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 (file)
index 0000000..3709957
--- /dev/null
@@ -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-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 (file)
index 0000000..67ce427
--- /dev/null
@@ -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 (file)
index 0000000..2b88efb
--- /dev/null
@@ -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-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 (file)
index 0000000..9afb833
--- /dev/null
@@ -0,0 +1 @@
+<configuration />
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 (file)
index 0000000..9afb833
--- /dev/null
@@ -0,0 +1 @@
+<configuration />
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 (file)
index 0000000..c53a40a
--- /dev/null
@@ -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 (file)
index 0000000..158138e
--- /dev/null
@@ -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 (file)
index 0000000..c9524a0
--- /dev/null
@@ -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 (file)
index 0000000..9d419ea
--- /dev/null
@@ -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-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 (file)
index 0000000..93cdd6f
--- /dev/null
@@ -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 (file)
index 0000000..293b6c1
--- /dev/null
@@ -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 (file)
index 0000000..1136769
--- /dev/null
@@ -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-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 (file)
index 0000000..a02aa88
--- /dev/null
@@ -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 (file)
index 0000000..11bee70
--- /dev/null
@@ -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 (file)
index 0000000..3bb4fd4
--- /dev/null
@@ -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 (file)
index 0000000..e5d0934
--- /dev/null
@@ -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 (file)
index 0000000..2185436
--- /dev/null
@@ -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-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 (file)
index 0000000..5fabe58
--- /dev/null
@@ -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 (file)
index 0000000..6eb9715
--- /dev/null
@@ -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 (file)
index 0000000..60b171d
--- /dev/null
@@ -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-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 (file)
index 0000000..80c7033
--- /dev/null
@@ -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 (file)
index 0000000..42390ad
--- /dev/null
@@ -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 (file)
index 0000000..edc258a
--- /dev/null
@@ -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 (file)
index 0000000..aafda15
--- /dev/null
@@ -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 (file)
index 0000000..8299fbf
--- /dev/null
@@ -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-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 (file)
index 0000000..d225acc
--- /dev/null
@@ -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 (file)
index 0000000..1f2435e
--- /dev/null
@@ -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 (file)
index 0000000..1d7394c
--- /dev/null
@@ -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-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 (file)
index 0000000..8c03782
--- /dev/null
@@ -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 (file)
index 0000000..5358603
--- /dev/null
@@ -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 (file)
index 0000000..9d902f0
--- /dev/null
@@ -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 (file)
index 0000000..b351a03
--- /dev/null
@@ -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 (file)
index 0000000..478f8fd
--- /dev/null
@@ -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-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 (file)
index 0000000..b49dc16
--- /dev/null
@@ -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 (file)
index 0000000..ae029df
--- /dev/null
@@ -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 (file)
index 0000000..ddcad75
--- /dev/null
@@ -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-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 (file)
index 0000000..f6bd697
--- /dev/null
@@ -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 (file)
index 0000000..c341e62
--- /dev/null
@@ -0,0 +1 @@
+dea84d579f673d2d87c7bd47e4318cdf8e59e4d0
\ No newline at end of file
index af06920564cb7a556b6bc9258cd7b6db72e5403c..180dbb74292d7621edf07f3e9718abbbd7a8a912 100644 (file)
             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>
index 5de5472b5d029aa09f7ba7b08641a0c553ef0aaa..e693ed9a1a2cd28ef1d1ebff2b02e046a5c2711f 100644 (file)
     <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>plexus-registry-api</artifactId>
-      <version>1.0-alpha-2</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>plexus-registry-commons</artifactId>
-      <version>1.0-alpha-2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.cache</groupId>
+      <artifactId>plexus-cache-api</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.cache</groupId>
+      <artifactId>plexus-cache-ehcache</artifactId>
+      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
index 848aaaf6bcb7382e8cc8d13a316521fc7f50c076..f9d5710bbe8dea3755c1f9b0e032baf14fc5858c 100644 (file)
     <decorator:title default="Maven Archiva"/>
   </title>
 
-  <style type="text/css" media="all">
-    @import url( "<c:url value="/css/maven-base.css" />" );
-    @import url( "<c:url value="/css/maven-theme.css" />" );
-    @import url( "<c:url value="/css/pss/table.css" />" );
-    @import url( "<c:url value="/css/site.css" />" );
-  </style>
+  <link rel="stylesheet" href="<c:url value="/css/maven-base.css"/>" type="text/css" media="all"/>
+  <link rel="stylesheet" href="<c:url value="/css/maven-theme.css"/>" type="text/css" media="all"/>
+  <link rel="stylesheet" href="<c:url value="/css/pss/table.css"/>" type="text/css" media="all"/>
+  <link rel="stylesheet" href="<c:url value="/css/site.css"/>" type="text/css" media="all"/>
   <link rel="stylesheet" href="<c:url value="/css/print.css"/>" type="text/css" media="print"/>
   <link rel="shortcut icon" href="<c:url value="/favicon.ico" />" />
   <script type="text/javascript" src="<c:url value="/js/scriptaculous/prototype.js"/>"></script>
index 7843c9e464c2abe4d4475fb701eb5feb1f3ded9d..e79f34b2fbaf3ed3741aa30a184a93613e406861 100644 (file)
@@ -15,8 +15,7 @@
   ~ 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">
+<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">
   <parent>
     <groupId>org.apache.maven.archiva</groupId>
     <artifactId>archiva-parent</artifactId>
index 43abc34bca042c93f128c371ffe401c0796d3d7c..525d15bb984cbfea7cab375fbf0269d3b255819f 100755 (executable)
@@ -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 (executable)
index 0000000..b9acd7c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+CONTACTS="Daniel brolund <daniel.brolund@agical.com>"
+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 (executable)
index 0000000..bae239a
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+CONTACT="Vlad Skarzhevskyy <skarzhevskyy@gmail.com>"
+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 (executable)
index 0000000..6125dc3
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+CONTACTS="Leonid Vysochyn <leonid.vysochyn@gmail.com>"
+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 (executable)
index 0000000..f2e9aa7
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+CONTACTS="Christian Schulte <cs@jdtaus.org>, jDTAUS Support <support@jdtaus.org>"
+MODE=rsync
+
+FROM=rsync://repository.jdtaus.org/repository
+GROUP_DIR=org/jdtaus/
+
+NO_SSH=true
diff --git a/pom.xml b/pom.xml
index 4b7094fa92df78655a243bcd8cda35f82a06cb89..d8d355c1334e526aa65e397824fe8504edb1c4c5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
    <parent>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-parent</artifactId>
-      <version>4</version>
+      <version>5</version>
       <relativePath>../pom/maven/pom.xml</relativePath>
    </parent>
    <groupId>org.apache.maven.archiva</groupId>
       <url>http://svn.apache.org/viewcvs.cgi/maven/archiva/trunk</url>
    </scm>
    <distributionManagement>
+      <repository>
+        <id>apache.releases</id>
+        <url>scpexe://people.apache.org/www/people.apache.org/builds/maven/archiva/${version}/m2-staging-repository</url>
+      </repository>
       <site>
          <id>apache.website</id>
          <url>
                   </tagBase>
                </configuration>
             </plugin>
+            <plugin>
+               <groupId>org.codehaus.modello</groupId>
+               <artifactId>modello-maven-plugin</artifactId>
+               <version>1.0-alpha-15</version>
+            </plugin>
          </plugins>
       </pluginManagement>
    </build>
             <artifactId>plexus-utils</artifactId>
             <version>1.4</version>
          </dependency>
+         <dependency>
+            <groupId>org.codehaus.plexus.registry</groupId>
+            <artifactId>plexus-registry-api</artifactId>
+            <version>1.0-alpha-2</version>
+         </dependency>
+         <dependency>
+            <groupId>org.codehaus.plexus.registry</groupId>
+            <artifactId>plexus-registry-commons</artifactId>
+            <version>1.0-alpha-2</version>
+         </dependency>
+         <dependency>
+            <groupId>org.codehaus.plexus.cache</groupId>
+            <artifactId>plexus-cache-api</artifactId>
+            <version>1.0-alpha-2</version>
+         </dependency>
+         <dependency>
+            <groupId>org.codehaus.plexus.cache</groupId>
+            <artifactId>plexus-cache-ehcache</artifactId>
+            <version>1.0-alpha-2</version>
+         </dependency>
          <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>