]> source.dussan.org Git - archiva.git/commitdiff
start adding layout for selenium test for webapp-js
authorOlivier Lamy <olamy@apache.org>
Wed, 28 Dec 2011 23:15:19 +0000 (23:15 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 28 Dec 2011 23:15:19 +0000 (23:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1225381 13f79535-47bb-0310-9956-ffa450edef68

98 files changed:
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/i18nload.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/topbar.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
archiva-modules/archiva-web/archiva-webapp-test-js/ReadMe.txt [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/archiva.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/repository.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/shared.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/_7.cfs [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/deletable [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/segments [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/local-repo/settings.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency.log [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency2.log [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/pom.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/pom.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/.datarefresh [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractMergingRepositoriesTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/archiva.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.policy [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.properties [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/context.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/logging.properties [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/server.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/web.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/pom.xml
archiva-modules/archiva-web/pom.xml
pom.xml

index abee4c15663498a8a9ebe56c62d600a0f37c3705..15147b171abea3e7be0f08d0ff33e227da90dd42 100644 (file)
@@ -25,6 +25,11 @@ $(function() {
   loadAndParseFile("restServices/redbackServices/utilServices/getBundleResources", {cache:false, mode: 'map',encoding:'utf-8'});
   // load browser locale
   var browserLang = $.i18n.browserLang();
+  var requestLang = $.urlParam('request_lang');
+  if (requestLang) {
+    browserLang=requestLang;
+  }
+  $.log("use browserLang:"+browserLang);
   loadAndParseFile("restServices/redbackServices/utilServices/getBundleResources?locale="+browserLang, {cache:false, mode: 'map',encoding:'utf-8'});
   // -- archiva
   // load default
index e058dacf22e1fb46c23c172e739d10276b152852..5c43413317be5170091108c1f435c40a31cd7bc8 100644 (file)
@@ -6,10 +6,10 @@
       <h4 class="brand"><a href="index.html">Archiva</a></h4>
       <ul class="nav secondary-nav">
         <li id="create-admin-link" style="display: none">
-          <a href="#" onclick="adminCreateBox();">${$.i18n.prop('create.admin.page.link')}</a>
+          <a href="#" onclick="adminCreateBox();" id="create-admin-link-a">${$.i18n.prop('create.admin.page.link')}</a>
         </li>
         <li id="login-link" style="display: none">
-          <a href="#" onclick="loginBox();">
+          <a href="#" onclick="loginBox();" id="login-link-a">
             <span class="label success">${login}</span>
           </a>
         </li>
@@ -17,7 +17,7 @@
           <a href="#" onclick="editUserDetailsBox();">${$.i18n.prop('edit.details')}</a>
         </li>
         <li id="logout-link" style="display: none">
-          <a href="#" onclick="logout();">
+          <a href="#" onclick="logout();" id="logout-link-a">
             <span class="label important">${logout}</span>
           </a>
         </li>
index fb301b0f9c34e0c1bb823de961c7a61cf11ed443..d3a99be3ce8ad0821cd61bfb9fa703dd7953be69 100644 (file)
@@ -110,7 +110,14 @@ $(function() {
               var created = JSON.parse(result);
               if (created == true) {
                 displaySuccessMessage("admin user created");
-                loginCall(currentAdminUser.username(), currentAdminUser.password(),function(){screenChange();checkCreateAdminLink();checkSecurityLinks();});
+                var onSuccessCall=function(){
+                  $.log("onSuccessCall after admin creation");
+                  reccordLoginCookie(currentAdminUser);
+                  screenChange();
+                  checkCreateAdminLink();
+                  checkSecurityLinks();
+                }
+                loginCall(currentAdminUser.username(), currentAdminUser.password(),onSuccessCall);
                 return this;
               } else {
                 displayErrorMessage("admin user not created");
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/ReadMe.txt b/archiva-modules/archiva-web/archiva-webapp-test-js/ReadMe.txt
new file mode 100644 (file)
index 0000000..21fb729
--- /dev/null
@@ -0,0 +1,34 @@
+ReadMe
+----------
+Run selenium tests in src/test/testng with Maven and TestNG
+  - mvn clean install 
+
+Run Selenium tests in src/test/testng against an existing Archiva instance
+  - Start Archiva
+  - Configure admin user for archiva (match values in src/test/resources/testng.properties )
+  - modify src/test/resources/testng.properties as needed
+  - mvn clean install -Dcontainer-existing
+
+The Cargo installations are stored outside of target to avoid multiple downloads.
+To remove the Cargo installations and re-download them next run, use:
+  - mvn -Pclean-cargo clean
+
+Internet Explorer and Safari users must disable their popup blockers. Using *iexplore as
+the browser requires running as an Administrator on Windows 7/Vista, or alternatively you
+can use *iexploreproxy.
+
+
+  
+
+IMPORTANT:
+
+When writing Selenium tests for artifact upload, please avoid using the "test" syllable/word for 
+the groupId or artifactId (ex. test.group:testAddArtifactValidValues:1.0) as this is used for the 
+search tests. The tests explicitly assert the returned number of hits for searching an artifact with 
+a groupId or artifactId containing the word "test", so if you upload or add a new artifact which has
+the term "test", the number of hits will be different and the search tests will fail.
+
+See org.apache.archiva.web.test.SearchTest.java or read the related thread discussion at
+http://old.nabble.com/Selenium-tests-failure-in-trunk-td27830786.html
+   
+
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml
new file mode 100644 (file)
index 0000000..c932399
--- /dev/null
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.archiva</groupId>
+    <artifactId>archiva-web</artifactId>
+    <version>1.4-M3-SNAPSHOT</version>
+  </parent>
+  <artifactId>archiva-webapp-test-js</artifactId>
+  <packaging>pom</packaging>
+  <name>Archiva Web :: Javascript Application Tests</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-command-line</artifactId>
+      <exclusions>
+        <exclusion>
+          <artifactId>plexus-container-default</artifactId>
+          <groupId>org.codehaus.plexus</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>plexus-component-api</artifactId>
+          <groupId>org.codehaus.plexus</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.archiva</groupId>
+      <artifactId>archiva-webapp-js</artifactId>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-slf4j-logging</artifactId>
+      <exclusions>
+        <exclusion>
+          <artifactId>plexus-component-api</artifactId>
+          <groupId>org.codehaus.plexus</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+      <artifactId>selenium-java-client-driver</artifactId>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <!-- Dependency for MavenConnectionTest -->
+    <dependency>
+      <groupId>jdom</groupId>
+      <artifactId>jdom</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>jaxen</groupId>
+      <artifactId>jaxen</artifactId>
+    </dependency>
+
+    <!-- Dependencies below are provided by the appserver -->
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.mail</groupId>
+      <artifactId>mail</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.activation</groupId>
+      <artifactId>activation</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testSourceDirectory>src/test/testng</testSourceDirectory>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </testResource>
+    </testResources>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>selenium-maven-plugin</artifactId>
+          <version>${seleniumPluginVersion}</version>
+          <dependencies>
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-server</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-remote-driver</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+
+            <dependency>
+              <groupId>org.seleniumhq.selenium</groupId>
+              <artifactId>selenium-api</artifactId>
+              <version>${selenium-server.version}</version>
+            </dependency>
+          </dependencies>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>src/test/resources/appserver-base/**</exclude>
+              <exclude>src/test/resources/repository/**</exclude>
+              <exclude>src/test/resources/local-repo/**</exclude>
+              <exclude>src/test/resources/projects/**</exclude>
+              <exclude>src/test/resources/snapshots/**</exclude>
+              <exclude>src/test/tomcat*/conf/catalina.policy</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>testResources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <verbose>true</verbose>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>testCompile</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <redirectTestOutputToFile>false</redirectTestOutputToFile>
+          <properties>
+            <!--
+              Use this instead of suiteXmlFiles so that we can add the exclusion, as it is only accepted without suiteXmlFiles
+            -->
+            <property>
+              <name>listener</name>
+              <value>org.apache.archiva.web.test.listener.CaptureScreenShotsListener</value>
+            </property>
+            <property>
+              <name>excludegroups</name>
+              <!-- Exclude on all browsers but Firefox, as it is the only one that Selenium supports file uploads on -->
+              <value>${excluded.groups}</value>
+            </property>
+          </properties>
+          <runOrder>alphabetical</runOrder>
+        </configuration>
+        <executions>
+          <execution>
+            <id>integration-tests</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <systemProperties>
+                <property>
+                  <name>browser</name>
+                  <value>${selenium.browser}</value>
+                </property>
+                <property>
+                  <name>baseUrl</name>
+                  <value>${baseUrl}</value>
+                </property>
+                <property>
+                  <name>maxWaitTimeInMs</name>
+                  <value>${maxWaitTimeInMs}</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>create-container</id>
+      <activation>
+        <property>
+          <name>!container</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>unzip-archiva-webapp</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>unpack</goal>
+                </goals>
+                <configuration>
+                  <artifactItems>
+                    <artifactItem>
+                      <groupId>${project.groupId}</groupId>
+                      <artifactId>archiva-webapp-js</artifactId>
+                      <version>${project.version}</version>
+                      <type>war</type>
+                    </artifactItem>
+                  </artifactItems>
+                  <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory>
+                  <overWriteSnapshots>true</overWriteSnapshots>
+                </configuration>
+              </execution>
+              <execution>
+                <id>prepare-provided-dependencies</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>copy-dependencies</goal>
+                </goals>
+                <configuration>
+                  <!-- TODO: this sometimes copies everything, causing problems with the server start up -->
+                  <includeGroupIds>org.apache.derby,javax.mail,javax.activation</includeGroupIds>
+                  <overWriteReleases>false</overWriteReleases>
+                  <overWriteSnapshots>true</overWriteSnapshots>
+                  <excludeTransitive>false</excludeTransitive>
+                  <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <copy todir="${project.build.directory}/appserver-base">
+                      <fileset dir="src/test/resources/appserver-base"/>
+                    </copy>
+                    <copy todir="${project.build.directory}/repository">
+                      <fileset dir="src/test/resources/repository"/>
+                    </copy>
+                    <copy todir="${project.build.directory}/index">
+                      <fileset dir="src/test/resources/index"/>
+                    </copy>
+                    <copy todir="${project.build.directory}/snapshots">
+                      <fileset dir="src/test/resources/snapshots"/>
+                    </copy>
+                    <copy todir="${project.build.directory}/projects">
+                      <fileset dir="src/test/resources/projects"/>
+                    </copy>
+                    <copy todir="${project.build.directory}/local-repo">
+                      <fileset dir="src/test/resources/local-repo"/>
+                    </copy>
+                  </tasks>
+                </configuration>
+              </execution>
+              <execution>
+                <id>copy-container-conf</id>
+                <phase>package</phase>
+                <configuration>
+                  <tasks>
+                    <copy todir="${project.build.directory}/${container.name}conf">
+                      <fileset dir="src/test/${container.name}"/>
+                    </copy>
+                    <copy
+                        todir="${cargo.install.dir}/apache-tomcat-${tomcat.version}/apache-tomcat-${tomcat.version}/common/lib">
+                      <fileset dir="${project.build.directory}/providedDependencies">
+                        <include name="**/*.jar"/>
+                      </fileset>
+                    </copy>
+                    <!-- for tomcat 6 -->
+                    <copy
+                        todir="${cargo.install.dir}/apache-tomcat-${tomcat.version}/apache-tomcat-${tomcat.version}/lib">
+                      <fileset dir="${project.build.directory}/providedDependencies">
+                        <include name="**/*.jar"/>
+                      </fileset>
+                    </copy>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>check-archiva-loaded</id>
+                <phase>integration-test</phase>
+                <configuration>
+                  <tasks>
+                    <get src="http://localhost:${container.test.port}/archiva/" dest="${project.build.directory}/index.html"/>
+                    <delete file="${project.build.directory}/index.html"/>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.cargo</groupId>
+            <artifactId>cargo-maven2-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>start-container</id>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>start</goal>
+                </goals>
+              </execution>
+              <execution>
+                <id>stop-container</id>
+                <phase>post-integration-test</phase>
+                <goals>
+                  <goal>stop</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <wait>${cargo.wait}</wait>
+              <container>
+                <containerId>${container.name}</containerId>
+                <zipUrlInstaller>
+                  <url>${container.url}</url>
+                  <downloadDir>${user.home}/.cargo</downloadDir>
+                </zipUrlInstaller>
+                <log>${project.build.directory}/logs/${container.name}.log</log>
+                <output>${project.build.directory}/logs/${container.name}.out</output>
+                <timeout>${cargo.timeout}</timeout>
+                <systemProperties>
+                  <appserver.base>${project.build.directory}/appserver-base</appserver.base>
+                  <appserver.home>${project.build.directory}/appserver-base</appserver.home>
+                  <derby.system.home>${project.build.directory}</derby.system.home>
+                </systemProperties>
+              </container>
+              <configuration>
+                <home>${project.build.directory}/${container.name}conf</home>
+                <type>existing</type>
+                <properties>
+                  <cargo.servlet.port>${container.test.port}</cargo.servlet.port>
+                  <cargo.jvmargs>${cargo.jvm.args}</cargo.jvmargs>
+                </properties>
+              </configuration>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>existing-container</id>
+      <activation>
+        <property>
+          <name>!baseUrl</name>
+        </property>
+      </activation>
+      <properties>
+        <baseUrl>http://localhost:${container.test.port}/archiva/index.html</baseUrl>
+      </properties>
+    </profile>
+    <profile>
+      <id>start-selenium</id>
+      <activation>
+        <property>
+          <name>!seleniumHost</name>
+        </property>
+      </activation>
+      <properties>
+        <seleniumHost>localhost</seleniumHost>
+        <seleniumPort>4444</seleniumPort>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>selenium-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>pre-integration-test</phase>
+                <goals>
+                  <goal>start-server</goal>
+                </goals>
+                <configuration>
+                  <background>true</background>
+                  <port>${seleniumPort}</port>
+                  <logOutput>true</logOutput>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>tomcat6x</id>
+      <activation>
+        <property>
+          <name>!container</name>
+        </property>
+      </activation>
+      <properties>
+        <container.name>tomcat6x</container.name>
+        <tomcat.version>${tomcat6x.version}</tomcat.version>
+        <container.url>
+          ${apache.mirror.url}/tomcat/tomcat-6/v${tomcat6x.version}/bin/apache-tomcat-${tomcat6x.version}.zip
+        </container.url>
+      </properties>
+    </profile>
+    <profile>
+      <id>firefox</id>
+      <activation>
+        <property>
+          <name>!browser</name>
+        </property>
+      </activation>
+      <properties>
+        <selenium.browser>*firefox</selenium.browser>
+        <excluded.groups/>
+      </properties>
+    </profile>
+    <profile>
+      <id>chrome</id>
+      <activation>
+        <property>
+          <name>browser</name>
+          <value>chrome</value>
+        </property>
+      </activation>
+      <properties>
+        <selenium.browser>*googlechrome</selenium.browser>
+        <excluded.groups>requiresUpload</excluded.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>iexplore</id>
+      <activation>
+        <property>
+          <name>browser</name>
+          <value>iexplore</value>
+        </property>
+      </activation>
+      <properties>
+        <selenium.browser>*iexplore</selenium.browser>
+        <excluded.groups>requiresUpload</excluded.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>safari</id>
+      <activation>
+        <property>
+          <name>browser</name>
+          <value>safari</value>
+        </property>
+      </activation>
+      <properties>
+        <selenium.browser>*safari</selenium.browser>
+        <excluded.groups>requiresUpload</excluded.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>otherbrowser</id>
+      <activation>
+        <property>
+          <name>browser</name>
+          <value>other</value>
+        </property>
+      </activation>
+      <properties>
+        <selenium.browser>*custom ${browserPath}</selenium.browser>
+        <excluded.groups>requiresUpload</excluded.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>headless</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>selenium-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>xvfb</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>xvfb</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>debug</id>
+      <properties>
+        <!-- TODO: review how appropriate the memory settings are - should work with less -->
+        <cargo.jvm.args>
+          -Xdebug -Xnoagent -Djava.compiler=NONE
+          -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${cargo.debug.port}
+          -Xmx512m -XX:MaxPermSize=256m
+        </cargo.jvm.args>
+        <cargo.debug.port>8000</cargo.debug.port>
+        <!-- wait an unusual amount of time (1hr) to allow debugging to occur -->
+        <maxWaitTimeInMs>3600000</maxWaitTimeInMs>
+      </properties>
+    </profile>
+    <profile>
+      <id>ci-server</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>cleanup-files</id>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <delete file="${user.home}/.m2/archiva.xml" quiet="true"/>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>codehaus.snapshots</id>
+      <url>https://nexus.codehaus.org/content/repositories/snapshots/</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+
+</project>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/archiva.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/archiva.xml
new file mode 100644 (file)
index 0000000..a95ad86
--- /dev/null
@@ -0,0 +1,8 @@
+<configuration>
+  <localRepository></localRepository>
+  <webapp>
+    <ui>
+      <appletFindEnabled>false</appletFindEnabled>
+    </ui>
+  </webapp>
+</configuration>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/repository.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/repository.xml
new file mode 100644 (file)
index 0000000..0be86eb
--- /dev/null
@@ -0,0 +1,49 @@
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
+    "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
+
+<Repository>
+  <FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/>
+  <!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+    <param name="path" value="${rep.home}/repository"/>
+</FileSystem>  -->
+  <Security appName="Jackrabbit">
+    <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security"/>
+    <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"/>
+    <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"/>
+  </Security>
+  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
+  <Workspace name="${wsp.name}">
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+      <param name="path" value="${wsp.home}"/>
+    </FileSystem>
+    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager"/>
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+      <param name="path" value="${wsp.home}/index"/>
+    </SearchIndex>
+  </Workspace>
+  <Versioning rootPath="${rep.home}/version">
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+      <param name="path" value="${rep.home}/version"/>
+    </FileSystem>
+    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager"/>
+  </Versioning>
+</Repository>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/conf/shared.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar
new file mode 100644 (file)
index 0000000..d98bcfb
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5
new file mode 100644 (file)
index 0000000..7359be6
--- /dev/null
@@ -0,0 +1 @@
+ea7dea9244b2a0975cfa117dc34fe18e
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1
new file mode 100644 (file)
index 0000000..45ec678
--- /dev/null
@@ -0,0 +1 @@
+1039566ff5361d07eccd1243c45929b96441c7d6
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom
new file mode 100644 (file)
index 0000000..606e1b1
--- /dev/null
@@ -0,0 +1,54 @@
+<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>test</groupId>
+  <artifactId>test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+  <name>test</name>
+  <url>http://maven.apache.org</url>
+  
+  <licenses>
+    <license>
+      <name>Test License</name>
+      <url>http://www.test.org/test.html</url>
+    </license>
+  </licenses>
+  
+  <mailingLists>
+    <mailingList>
+      <name>test user list</name>
+      <subscribe>http://test.net/lists/listinfo/test-user</subscribe>
+      <unsubscribe>http://test.net/lists/listinfo/test-user</unsubscribe>
+      <archive>http://www.test-archive.com/test-user%40lists.test.net/</archive>
+    </mailingList>
+    <mailingList>
+      <name>test developer list</name>
+      <subscribe>http://test.net/lists/listinfo/test-dev</subscribe>
+      <unsubscribe>http://test.net/lists/listinfo/test-dev</unsubscribe>
+      <archive>http://www.test-archive.com/test-dev%40lists.test.net/</archive>
+    </mailingList>
+  </mailingLists>
+  
+  <dependencies>
+    <dependency>
+      <groupId>test.group.id</groupId>
+      <artifactId>testArtifactId</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  
+<distributionManagement>
+<repository>
+  <id>test</id>
+<url>file://localhost/Users/brett/scm/archiva/archiva/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal</url>
+</repository>
+</distributionManagement>
+</project>
+
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5
new file mode 100644 (file)
index 0000000..3b20276
--- /dev/null
@@ -0,0 +1 @@
+f80c7c493716de649a99db00cd2ff34c
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1
new file mode 100644 (file)
index 0000000..d7c0922
--- /dev/null
@@ -0,0 +1 @@
+4b95c6fa09d1e02efdb69129f53f025e33bc8958
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml
new file mode 100644 (file)
index 0000000..68287fd
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>test</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+  <versioning>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20100114015837</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5
new file mode 100644 (file)
index 0000000..4bb9667
--- /dev/null
@@ -0,0 +1 @@
+dab1b8c2475fe839f387ceaef0d82b30
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1
new file mode 100644 (file)
index 0000000..f002683
--- /dev/null
@@ -0,0 +1 @@
+4e5b414d5419121ef75131cb52235a9abbf2095a
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/_7.cfs b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/_7.cfs
new file mode 100644 (file)
index 0000000..e95ea7e
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/_7.cfs differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/deletable b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/deletable
new file mode 100644 (file)
index 0000000..593f470
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/deletable differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/segments b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/segments
new file mode 100644 (file)
index 0000000..d9d4f01
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/index/segments differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/local-repo/settings.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/local-repo/settings.xml
new file mode 100644 (file)
index 0000000..23b66a9
--- /dev/null
@@ -0,0 +1,44 @@
+<settings>
+  <localRepository></localRepository>
+  <servers>
+    <server>
+      <id>snapshots</id>
+      <username>admin</username>
+      <password>admin1</password>
+    </server>
+  </servers>
+  <profiles>
+    <profile>
+      <id>repositories</id>
+      <repositories>
+        <repository>
+          <id>snapshots</id>
+          <name>snapshots-repository</name>
+          <url>http://localhost:9696/archiva/repository/snapshots/</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>snapshots</id>
+          <name>snapshots-repository</name>
+          <url>http://localhost:9696/archiva/repository/snapshot/</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>repositories</activeProfile>
+  </activeProfiles>
+</settings>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency.log b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency.log
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency2.log b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/bad-dependency2.log
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/bad-dependency/pom.xml
new file mode 100644 (file)
index 0000000..24fc2aa
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.archiva</groupId>
+  <artifactId>bad-dependency</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <name>Bad Dependency</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.archiva.web.test</groupId>
+      <artifactId>bad-dependency</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.archiva.web.test</groupId>
+      <artifactId>foo-bar</artifactId>
+      <version>1.2-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/dependency-in-proxied.log
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/projects/dependency-in-proxied/pom.xml
new file mode 100644 (file)
index 0000000..8260683
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.archiva</groupId>
+  <artifactId>dependency-in-proxied</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <name>Dependency In Proxied</name>
+  <dependencies>
+    <!--dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-jxr</artifactId>
+      <version>2.1</version>
+    </dependency-->
+    <dependency>
+      <groupId>com.lowagie</groupId>
+      <artifactId>itext</artifactId>
+      <version>1.3</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/.datarefresh b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/1.0/artifact-a-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-a/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/2.0/artifact-b-2.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-b/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/3.0/artifact-c-3.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-c/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/0.1/artifact-s-0.1.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/repository/org/apache/maven/archiva/web/test/artifact-s/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/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
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.datarefresh b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/.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-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar
new file mode 100644 (file)
index 0000000..033956d
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.md5
new file mode 100644 (file)
index 0000000..0a3eeb6
--- /dev/null
@@ -0,0 +1 @@
+306d556e6e5e4d604dc854d09ddcdefd
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar.sha1
new file mode 100644 (file)
index 0000000..39c5c30
--- /dev/null
@@ -0,0 +1 @@
+afb6586f5eb4c63dd5735a0bed11c99c7fac6755
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom
new file mode 100644 (file)
index 0000000..d580176
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <distributionManagement>
+    <status>deployed</status>
+  </distributionManagement>
+</project>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.md5
new file mode 100644 (file)
index 0000000..6caf8be
--- /dev/null
@@ -0,0 +1 @@
+8e896baea663a45d7bd2737f8e464481
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.pom.sha1
new file mode 100644 (file)
index 0000000..a3bbc7e
--- /dev/null
@@ -0,0 +1 @@
+e37897c617d78dedd978766a2db318d301e80105
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml
new file mode 100644 (file)
index 0000000..ab1eb42
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <buildNumber>1</buildNumber>
+    </snapshot>
+    <lastUpdated>20070425105840</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.md5
new file mode 100644 (file)
index 0000000..76ef1e4
--- /dev/null
@@ -0,0 +1 @@
+add4f71a005137e9a296c5b192e900c2
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/maven-metadata.xml.sha1
new file mode 100644 (file)
index 0000000..ebe7cf3
--- /dev/null
@@ -0,0 +1 @@
+b505e302169e04fc821bf571da7435b1e42ef8d7
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml
new file mode 100644 (file)
index 0000000..8f00ece
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.archiva.web.test</groupId>
+  <artifactId>foo-bar</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <versions>
+      <version>1.0-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20070425105840</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.md5
new file mode 100644 (file)
index 0000000..f6270d9
--- /dev/null
@@ -0,0 +1 @@
+f3b657fb48d2e82fee5fada169756938
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/maven-metadata.xml.sha1
new file mode 100644 (file)
index 0000000..7f4812f
--- /dev/null
@@ -0,0 +1 @@
+f4629e609deb95cefdcdddc6dd8c2942d1c3e47f
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/resources/testng.properties
new file mode 100644 (file)
index 0000000..2863603
--- /dev/null
@@ -0,0 +1,143 @@
+#
+# 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.
+#
+
+# properties for integration tests
+
+ADMIN_USERNAME=admin
+ADMIN_FULLNAME=Administrator
+ADMIN_EMAIL=admin@localhost.fr
+ADMIN_PASSWORD=admin1
+
+SELENIUM_HOST=localhost
+SELENIUM_PORT=4444
+SELENIUM_BROWSER=*firefox
+
+# Search, Artifact Management
+SEARCH_BAD_ARTIFACT=asdf
+# Existing Artifact
+ARTIFACT_GROUPID=test
+ARTIFACT_ARTIFACTID=test
+ARTIFACT_VERSION=1.0
+ARTIFACT_PACKAGING=jar
+ARTIFACT_CLASSNAME=test.App
+
+# Artifact for testing add artifact with valid values
+VALIDARTIFACT_GROUPID=addArtifactValidValues
+VALIDARTIFACT_ARTIFACTID=addArtifactValidValues-artifact
+
+# Artifact for upload action in audit log report - MRM-1304
+AUDITLOGARTIFACT_GROUPID=group.auditLogUpload
+AUDITLOGARTIFACT_ARTIFACTID=auditLogUpload-artifact
+AUDITLOG_EXPECTED_ARTIFACT=group/auditLogUpload/auditLogUpload-artifact/1.0/auditLogUpload-artifact-1.0.jar
+
+# Reports
+REPOSITORY_NAME=internal
+START_DATE=05/01/2009
+END_DATE=05/30/2009
+
+# User Management
+# For password and new password
+USERROLE_EMAIL=admin@localhost
+USERROLE_PASSWORD=password1
+NEW_USERROLE_PASSWORD=password123
+
+# Guest Role
+GUEST_USERNAME=guest_user
+GUEST_FULLNAME=Guest
+# Registered User Role
+REGISTERED_USERNAME=reg_user
+REGISTERED_FULLNAME=Registered User
+# System Administrator
+SYSAD_USERNAME=sys_admin
+SYSAD_FULLNAME=System Administrator
+# User Administrator
+USERADMIN_USERNAME=user_admin
+USERADMIN_FULLNAME=User Administrator
+# Global Repository Manager
+GLOBALREPOMANAGER_USERNAME=globalrepo_manager
+GLOBALREPOMANAGER_FULLNAME=Global Repository Manager
+# Global Repository Observer
+GLOBALREPOOBSERVER_USERNAME=globalrepo_observer
+GLOBALREPOOBSERVER_FULLNAME=Global Repository Observer
+# Repository Manager - internal
+REPOMANAGER_INTERNAL_USERNAME=repomanager_internal
+REPOMANAGER_INTERNAL_FULLNAME=Repository Manager - internal
+# Repository Manager - snapshots
+REPOMANAGER_SNAPSHOTS_USERNAME=repomanager_snapshots
+REPOMANAGER_SNAPSHOTS_FULLNAME=Repository Manager - snapshots
+# Repository Observer - internal
+REPOOBSERVER_INTERNAL_USERNAME=repoobserver_internal
+REPOOBSERVER_INTERNAL_FULLNAME=Repository Observer - internal
+# Repository Observer - snapshots
+REPOOBSERVER_SNAPSHOTS_USERNAME=repoobserver_snapshots
+REPOOBSERVER_SNAPSHOTS_FULLNAME=Repository Observer - snapshots
+
+# Add Artifact
+GROUPID=test
+ARTIFACTID=test
+VERSION=1.0
+PACKAGING=jar
+ARTIFACTFILEPATH=test
+REPOSITORYID=internal
+
+GROUPID1=delete
+ARTIFACTID1=delete
+VERSION1=1.0
+PACKAGING1=jar
+ARTIFACTFILEPATH1=test
+REPOSITORYID1=internal
+
+GROUPID_DOTNETARTIFACT=dotNetTypes
+ARTIFACTID_DOTNETARTIFACT=dotNetTypes
+PACKAGING_DOTNETARTIFACT=library
+
+SNAPSHOT_GROUPID=org.apache.archiva
+SNAPSHOT_ARTIFACTID=archiva-test
+SNAPSHOT_VERSION=1.0-SNAPSHOT
+SNAPSHOT_PACKAGING=jar
+SNAPSHOT_ARTIFACTFILEPATH=src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar
+SNAPSHOT_REPOSITORYID=snapshots
+
+ADD_REMOVE_GROUPID=artifact.dummy
+ADD_REMOVE_ARTIFACTID=artifact-dummy
+
+# REPOSITORIES
+# Manage Repositories
+MANAGED_IDENTIFIER=testing1
+MANAGED_NAME=Testing Managed Repository
+MANAGED_DIRECTORY=
+MANAGED_INDEX_DIRECTORY=
+MANAGED_TYPE=
+MANAGED_CRON=
+MANAGED_REPOPURGE_DAYSOLDERTHAN=
+MANAGED_REPOPURGE_RETENTIONCOUNT=
+
+# Network Proxies
+NETWORKPROXY_IDENTIFIER=networkproxytest
+NETWORKPROXY_PROTOCOL=http
+NETWORKPROXY_HOSTNAME=
+NETWORKPROXY_PORT=8080
+NETWORKPROXY_USERNAME=admin
+NETWORKPROXY_PASSWORD=admin123
+
+# Browse - MRM-1278 test
+SNAPSHOTS_REPOSITORY=snapshots
+RELEASES_REPOSITORY=releases
+
+
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java
new file mode 100644 (file)
index 0000000..96de18c
--- /dev/null
@@ -0,0 +1,89 @@
+package org.apache.archiva.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class ArchivaAdminTest
+    extends AbstractArchivaTest
+{
+
+    @Override
+    @AfterTest
+    public void close()
+        throws Exception
+    {
+        super.close();
+    }
+
+    @Override
+    @BeforeSuite
+    public void open()
+        throws Exception
+    {
+        super.open();
+    }
+
+    @BeforeTest
+    @Parameters( { "baseUrl", "browser", "maxWaitTimeInMs", "seleniumHost", "seleniumPort" } )
+    public void initializeArchiva( String baseUrl, String browser, int maxWaitTimeInMs,
+                                   @Optional( "localhost" ) String seleniumHost, @Optional( "4444" ) int seleniumPort )
+        throws Exception
+    {
+
+        super.open( baseUrl, browser, seleniumHost, seleniumPort, Integer.toString( maxWaitTimeInMs ) );
+
+        getSelenium().open( baseUrl );
+
+        getSelenium().refresh();
+
+        // if not admin user created create one
+        if ( isElementVisible( "create-admin-link" ) )
+        {
+            clickLinkWithLocator( "create-admin-link-a", false );
+            assertCreateAdmin();
+            String fullname = getProperty( "ADMIN_FULLNAME" );
+            String username = getProperty( "ADMIN_USERNAME" );
+            String mail = getProperty( "ADMIN_EMAIL" );
+            String password = getProperty( "ADMIN_PASSWORD" );
+            submitAdminData( fullname, mail, password );
+            assertUserLoggedIn( username );
+            clickLinkWithLocator( "logout-link-a" );
+        }
+        else
+        {
+            login( getAdminUsername(), getAdminPassword() );
+        }
+
+    }
+
+    @Test( groups = { "about" }, alwaysRun = true )
+    public void testHome()
+    {
+        getSelenium().open( baseUrl );
+        assertPage( "Apache Archiva" );
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/LoginTest.java
new file mode 100644 (file)
index 0000000..a1ba732
--- /dev/null
@@ -0,0 +1,122 @@
+package org.apache.archiva.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+
+/*
+ * Bug in TestNG. TESTNG-285: @Test(sequential=true) works incorrectly for classes with inheritance
+ * http://code.google.com/p/testng/source/browse/trunk/CHANGES.txt
+ * Waiting 5.9 release. It's comming soon.
+ */
+/**
+ * Based on LoginTest of Emmanuel Venisse test.
+ * 
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+
+@Test( groups = { "login" }, dependsOnGroups = {"about"})
+public class LoginTest
+    extends AbstractArchivaTest
+{
+    @Test(alwaysRun = true)
+    public void testWithBadUsername()
+    {
+        goToLoginPage();
+        setFieldValue( "user-login-form-username", "badUsername" );
+
+        waitPage();
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+    }
+
+    @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
+    public void testWithBadPassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        setFieldValue( "loginForm_password", "badPassword" );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+        //<ul class="errorMessage"><li><span>
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+    }
+
+    @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
+    public void testWithEmptyUsername()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_password", "password" );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "User Name is required" );
+        assertElementPresent( "//tr[@errorFor=\'loginForm_username\']");
+    }
+
+    @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
+    public void testWithEmptyPassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "You have entered an incorrect username and/or password" );
+        assertElementPresent( "//ul[@class=\'errorMessage\']" );
+    }
+
+    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
+    public void testWithCorrectUsernamePassword()
+    {
+        goToLoginPage();
+        setFieldValue( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        setFieldValue( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginSubmit" );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        waitPage();
+        //assertTextPresent( "Logout" );
+        assertElementPresent( "logoutLink" );
+        //assertTextPresent( "Edit Details" );
+        assertElementPresent( "editUserLink" );
+        assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
+    }
+
+    @BeforeTest
+    public void open()
+        throws Exception
+    {
+        super.open();
+    }
+
+    @Override
+    @AfterTest
+    public void close()
+        throws Exception
+    {
+        super.close();
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java
new file mode 100644 (file)
index 0000000..5dd77ca
--- /dev/null
@@ -0,0 +1,242 @@
+package org.apache.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.
+ */
+
+/**
+ * Utility class for creating xpath expressions
+ */
+public class XPathExpressionUtil
+{
+    public static final String CONTAINS = "contains";
+
+    public static final String AND = " and ";
+
+    public static final String CURRENT_NODE = "./";
+
+    public static final String PARENT_NODE = "../";
+
+    public static final String GRANDPARENT_NODE = "../../";
+
+    public static final String ELEMENT_ANY_LEVEL = "//";
+
+    public static final String TABLE_COLUMN = "td";
+
+    public static final String TABLE_ROW = "tr";
+
+    public static final String START_NODE_TEST = "[";
+
+    public static final String END_NODE_TEST = "]";
+
+    public static final String ANCHOR = "a";
+
+    public static final String IMG = "img";
+
+    public static final String LIST = "ul";
+
+    public static final String LINE = "li";
+
+    public static String getList( String[] values )
+    {
+        String xpathExpression = "";
+
+        if ( values.length > 0 )
+        {
+            xpathExpression += ELEMENT_ANY_LEVEL;
+            xpathExpression += LIST;
+            xpathExpression += START_NODE_TEST;
+
+            for ( int nIndex = 0; nIndex < values.length; nIndex++ )
+            {
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( LINE + position( nIndex + 1 ), values[nIndex] );
+            }
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, null, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param elementValue the matched element value
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String elementValue, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, elementValue, "TEXT", columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getImgColumnElement( String element, int elementIndex, String imageName, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, imageName, IMG, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     * 
+     * @param element the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    private static String getColumnElement( String element, int elementIndex, String elementValue,
+                                            String elementValueType, String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = ELEMENT_ANY_LEVEL + element;
+            xpathExpression += START_NODE_TEST;
+
+            if ( elementValue != null )
+            {
+                if ( "TEXT".equals( elementValueType ) )
+                {
+                    xpathExpression += contains( elementValue );
+                    xpathExpression += ( columnValues.length > 0 ) ? AND : "";
+                }
+            }
+
+            // we are two levels below the table row element ( tr/td/<element> )
+            xpathExpression += matchColumns( GRANDPARENT_NODE, columnValues, elementIndex );
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        if ( IMG.equals( elementValueType ) )
+        {
+            xpathExpression += "/img[contains(@src, '" + elementValue + "')]";
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring the table row that matches all column values with the same order as the list
+     * 
+     * @param columnValues the matched list of columnValues
+     * @return
+     */
+    public static String getTableRow( String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = new String( ELEMENT_ANY_LEVEL + TABLE_ROW + START_NODE_TEST );
+            xpathExpression += matchColumns( columnValues );
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    private static String matchColumns( String[] columnValues )
+    {
+        return matchColumns( columnValues, -1 );
+    }
+
+    private static String matchColumns( String[] columnValues, int skipIndex )
+    {
+        return matchColumns( null, columnValues, skipIndex );
+    }
+
+    private static String matchColumns( String parent, String[] columnValues, int skipIndex )
+    {
+        String xpathExpression = "";
+
+        for ( int nIndex = 0; nIndex < columnValues.length; nIndex++ )
+        {
+            if ( ( skipIndex != nIndex ) || ( skipIndex == -1 ) )
+            {
+                // prepend "and" if index > 0
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( parent, TABLE_COLUMN + position( nIndex + 1 ), columnValues[nIndex] );
+            }
+        }
+
+        return xpathExpression;
+    }
+
+    private static String position( int nIndex )
+    {
+        return new String( "[" + nIndex + "]" );
+    }
+
+    private static String contains( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return contains( finalElement, matchedString );
+    }
+
+    private static String contains( String matchedString )
+    {
+        return contains( ".", matchedString );
+    }
+
+    private static String contains( String axis, String matchedString )
+    {
+        return new String( CONTAINS + "(" + axis + "," + "'" + matchedString + "')" );
+    }
+
+    private static String equals( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return equals( finalElement, matchedString );
+    }
+
+    private static String equals( String axis, String matchedString )
+    {
+        return new String( axis + "==" + "'" + matchedString + "'" );
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
new file mode 100644 (file)
index 0000000..1cc89ed
--- /dev/null
@@ -0,0 +1,109 @@
+package org.apache.archiva.web.test.listener;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.thoughtworks.selenium.Selenium;
+import org.apache.archiva.web.test.parent.AbstractSeleniumTest;
+import org.apache.commons.io.FileUtils;
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.regex.Pattern;
+
+public class CaptureScreenShotsListener
+    extends TestListenerAdapter
+{
+    @Override
+    public void onTestSkipped( ITestResult tr )
+    {
+        System.out.println( "Test " + tr.getName() + " -> Skipped" );
+        super.onTestSkipped( tr );
+    }
+
+    @Override
+    public void onTestFailure( ITestResult tr )
+    {
+        captureError( tr );
+        System.out.println( "Test " + tr.getName() + " -> Failed" );
+        super.onTestFailure( tr );
+    }
+
+    @Override
+    public void onTestSuccess( ITestResult tr )
+    {
+        System.out.println( "Test " + tr.getName() + " -> Success" );
+        super.onTestFailure( tr );
+    }
+
+    private void captureError( ITestResult tr )
+    {
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
+        String time = sdf.format( new Date() );
+        File targetPath = new File( "target", "screenshots" );
+        StackTraceElement stackTrace[] = tr.getThrowable().getStackTrace();
+        String cName = tr.getTestClass().getName();
+        int index = getStackTraceIndexOfCallingClass( cName, stackTrace );
+        String methodName = stackTrace[index].getMethodName();
+        int lNumber = stackTrace[index].getLineNumber();
+        String lineNumber = Integer.toString( lNumber );
+        String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
+        targetPath.mkdirs();
+        Selenium selenium = AbstractSeleniumTest.getSelenium();
+        String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-" + time;
+        try
+        {
+            selenium.windowMaximize();
+            File fileName = new File( targetPath, fileBaseName + ".png" );
+            selenium.captureEntirePageScreenshot( fileName.getAbsolutePath(), "background=#FFFFFF" );
+        }
+        catch ( RuntimeException e )
+        {
+            System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() );
+        }
+        try
+        {
+            File fileName = new File( targetPath, fileBaseName + ".html" );
+            FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() );
+        }
+        catch ( IOException ioe )
+        {
+            System.out.println( ioe.getMessage() );
+        }
+    }
+
+    private int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
+    {
+        boolean match = false;
+        int i = 0;
+        do
+        {
+            String className = stackTrace[i].getClassName();
+            match = Pattern.matches( nameOfClass, className );
+            i++;
+        }
+        while ( match == false );
+        i--;
+        return i;
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
new file mode 100644 (file)
index 0000000..72a49b6
--- /dev/null
@@ -0,0 +1,726 @@
+package org.apache.archiva.web.test.parent;
+
+import org.apache.archiva.web.test.XPathExpressionUtil;
+import org.testng.Assert;
+
+import java.io.File;
+import java.io.IOException;
+
+/*
+ * 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 abstract class AbstractArchivaTest
+    extends AbstractSeleniumTest
+{
+    protected String username;
+
+    protected String fullname;
+
+    protected static String getErrorMessageText()
+    {
+        return getSelenium().getText( "//ul[@class='errorMessage']/li/span" );
+    }
+
+    public String getUserEmail()
+    {
+        String email = getProperty( "USERROLE_EMAIL" );
+        return email;
+    }
+
+    public String getUserRolePassword()
+    {
+        String password = getProperty( "USERROLE_PASSWORD" );
+        return password;
+    }
+
+    public String getUserRoleNewPassword()
+    {
+        String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
+        return password_new;
+    }
+
+    public String getBasedir()
+    {
+        String basedir = System.getProperty( "basedir" );
+
+        if ( basedir == null )
+        {
+            basedir = new File( "" ).getAbsolutePath();
+        }
+
+        return basedir;
+    }
+
+    public String getAdminUsername()
+    {
+        String adminUsername = getProperty( "ADMIN_USERNAME" );
+        return adminUsername;
+    }
+
+    public String getAdminPassword()
+    {
+        String adminPassword = getProperty( "ADMIN_PASSWORD" );
+        return adminPassword;
+    }
+
+    public void assertCreateAdmin()
+    {
+        assertElementPresent( "user-create" );
+        assertFieldValue( "admin", "username" );
+        assertElementPresent( "fullname" );
+        assertElementPresent( "password" );
+        assertElementPresent( "confirmPassword" );
+        assertElementPresent( "email" );
+    }
+
+    public void submitAdminData( String fullname, String email, String password )
+    {
+        setFieldValue( "fullname", fullname );
+        setFieldValue( "email", email );
+        setFieldValue( "password", password );
+        setFieldValue( "confirmPassword", password );
+        clickButtonWithLocator( "user-create-form-register-button" );
+        //submit();
+    }
+
+    // Go to Login Page
+    public void goToLoginPage()
+    {
+        getSelenium().open( baseUrl );
+        // are we already logged in ?
+        if ( isElementVisible( "logout-link" ) ) //isElementPresent( "logoutLink" ) )
+        {
+            // so logout
+            clickLinkWithLocator( "logout-link-a", false );
+            clickLinkWithLocator( "login-link-a" );
+        }
+        else if ( isElementVisible( "login-link-a" ) )
+        {
+            clickLinkWithLocator( "login-link-a" );
+        }
+        assertLoginModal();
+    }
+
+    public void submitUserData( String username, String password, boolean rememberme, boolean success )
+    {
+
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberme )
+        {
+            checkField( "rememberMe" );
+        }
+
+        submit();
+        if ( success )
+        {
+            assertUserLoggedIn( username );
+        }
+        else
+        {
+            assertLoginModal();
+        }
+    }
+
+    public void assertLoginModal()
+    {
+        assertElementPresent( "user-login-form" );
+        Assert.assertTrue( isElementVisible( "register-link" ) );
+        assertElementPresent( "user-login-form-username" );
+        assertElementPresent( "user-login-form-password" );
+        assertButtonWithIdPresent( "modal-login-ok" );
+    }
+
+    // User Management
+    public void goToUserManagementPage()
+    {
+        getSelenium().open( "/archiva/security/userlist.action" );
+        assertUserManagementPage();
+    }
+
+    public void assertUserManagementPage()
+    {
+        assertPage( "Apache Archiva \\ [Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertTextPresent( "Navigation" );
+        assertImgWithAlt( "First" );
+        assertImgWithAlt( "Prev" );
+        assertImgWithAlt( "Next" );
+        assertImgWithAlt( "Last" );
+        assertTextPresent( "Display Rows" );
+        assertTextPresent( "Username" );
+        assertTextPresent( "Full Name" );
+        assertTextPresent( "Email" );
+        assertTextPresent( "Permanent" );
+        assertTextPresent( "Validated" );
+        assertTextPresent( "Locked" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "Tools" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "The following tools are available for administrators to manipulate the user list." );
+        assertButtonWithValuePresent( "Create New User" );
+        assertButtonWithValuePresent( "Show Users In Role" );
+        assertElementPresent( "roleName" );
+        assertTextPresent( "Reports" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Types" );
+        assertTextPresent( "User List" );
+        assertTextPresent( "Roles Matrix" );
+    }
+
+    /*
+     * //User Role public void goToUserRolesPage() { clickLinkWithText( "User Roles" ); assertUserRolesPage(); }
+     */
+
+    public void assertUserRolesPage()
+    {
+        //assertPage( "Apache Archiva \\ [Admin] User Edit" );
+        //[Admin] Rôles de l'utilisateur
+
+        assertTextPresent( "[Admin] User Roles", "[Admin] R\u00F4les de l'utilisateur" );
+        assertTextPresent( "Username", "Nom d'utilisateur" );
+        assertTextPresent( "Full Name", "Nom complet" );
+        String userRoles =
+            "Guest,Registered User,System Administrator,User Administrator,Global Repository Observer,Global Repository Manager,Repository Observer,Repository Manager,internal";
+        String[] arrayRole = userRoles.split( "," );
+        for ( String userroles : arrayRole )
+        {
+            assertTextPresent( userroles );
+        }
+    }
+
+    public void assertDeleteUserPage( String username )
+    {
+        assertTextPresent( "[Admin] User Delete", "[Admin] Suppression de l'utilisateur",
+                           "L'utilisateur suivant va \u00EAtre supprim\u00E9:" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username, "Nom d'utilisateur:" + username );
+        assertButtonWithIdPresent( "userDeleteSubmit" );
+    }
+
+    public void createUser( String userName, String fullName, String email, String password, boolean valid )
+    {
+        createUser( userName, fullName, email, password, password, valid );
+    }
+
+    private void createUser( String userName, String fullName, String emailAd, String password, String confirmPassword,
+                             boolean valid )
+    {
+        // login( getAdminUsername() , getAdminPassword() );
+        getSelenium().open( "/archiva/security/userlist.action" );
+        clickButtonWithLocator( "userCreateButton", true );
+        //clickButtonWithValue( "Create New User" );
+        assertCreateUserPage();
+        setFieldValue( "user.username", userName );
+        setFieldValue( "user.fullName", fullName );
+        setFieldValue( "user.email", emailAd );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", confirmPassword );
+        submit();
+
+        assertUserRolesPage();
+
+        //clickButtonWithValue( "Submit" );
+        clickButtonWithName( "submitRolesButton", true );
+
+        if ( valid )
+        {
+            String[] columnValues = { userName, fullName, emailAd };
+            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+        }
+        else
+        {
+            assertCreateUserPage();
+        }
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAdd )
+    {
+        deleteUser( userName, fullName, emailAdd, false, false );
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAd, boolean validated, boolean locked )
+    {
+        String[] columnValues = { userName, fullName, emailAd };
+        // clickLinkWithText( "userlist" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        assertDeleteUserPage( userName );
+        submit();
+        assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+    }
+
+    public void login( String username, String password )
+    {
+        login( username, password, true, "Login Page" );
+    }
+
+    public void login( String username, String password, boolean valid, String assertReturnPage )
+    {
+        if ( isElementVisible( "login-link-a" ) )//isElementPresent( "loginLink" ) )
+        {
+            goToLoginPage();
+
+            submitLoginPage( username, password, false, valid, assertReturnPage );
+        }
+        if ( valid )
+        {
+            assertUserLoggedIn( username );
+        }
+    }
+
+    public void submitLoginPage( String username, String password )
+    {
+        submitLoginPage( username, password, false, true, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean validUsernamePassword )
+    {
+        submitLoginPage( username, password, false, validUsernamePassword, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean rememberMe, boolean validUsernamePassword,
+                                 String assertReturnPage )
+    {
+        clickLinkWithLocator( "login-link-a", false );
+        setFieldValue( "user-login-form-username", username );
+        setFieldValue( "user-login-form-password", password );
+        /*
+        if ( rememberMe )
+        {
+            checkField( "rememberMe" );
+        }*/
+
+        clickButtonWithLocator( "modal-login-ok" );
+        if ( validUsernamePassword )
+        {
+            assertUserLoggedIn( username );
+        }
+        /*
+        else
+        {
+            if ( "Login Page".equals( assertReturnPage ) )
+            {
+                assertLoginPage();
+            }
+            else
+            {
+                assertPage( assertReturnPage );
+            }
+        }*/
+    }
+
+    protected void assertUserLoggedIn( String username )
+    {
+        Assert.assertFalse( isElementVisible( "login-link" ) );
+        Assert.assertTrue( isElementVisible( "logout-link" ) );
+        Assert.assertFalse( isElementVisible( "register-link" ) );
+        Assert.assertFalse( isElementVisible( "create-admin-link" ) );
+    }
+
+    // User Roles
+    public void assertUserRoleCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent(
+            "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + value
+                + "']" );
+    }
+
+    public void assertResourceRolesCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void checkUserRoleWithValue( String value )
+    {
+        assertUserRoleCheckBoxPresent( value );
+        getSelenium().click(
+            "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + value
+                + "']" );
+    }
+
+    public void checkResourceRoleWithValue( String value )
+    {
+        assertResourceRolesCheckBoxPresent( value );
+        getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void changePassword( String oldPassword, String newPassword )
+    {
+        assertPage( "Apache Archiva \\ Change Password" );
+        setFieldValue( "existingPassword", oldPassword );
+        setFieldValue( "newPassword", newPassword );
+        setFieldValue( "newPasswordConfirm", newPassword );
+        clickButtonWithValue( "Change Password" );
+    }
+
+    public void assertCreateUserPage()
+    {
+        //assertPage( "Apache Archiva \\ [Admin] User Create" );
+        //assertTextPresent( "[Admin] User Create" );
+        assertTextPresent( "Username*:", "Nom d'utilisateur*:" );
+        assertElementPresent( "user.username" );
+        assertTextPresent( "Full Name*:", "Nom complet*:" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*:", "Adresse email*:" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*:", "Mot de passe*:" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*:", "Confirmer le mot de passe*" );
+        assertElementPresent( "user.confirmPassword" );
+        //assertButtonWithValuePresent( "Create User" );
+        assertButtonWithIdPresent( "userCreateSubmit" );
+//        assertElementNotPresent( "userCreateSubmit" );
+    }
+
+    public void assertLeftNavMenuWithRole( String role )
+    {
+        if ( role.equals( "Guest" ) || role.equals( "Registered User" ) || role.equals( "Global Repository Observer" )
+            || role.equals( "Repository Observer - internal" ) || role.equals( "Repository Observer - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "User Administrator" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "User Management" );
+            assertLinkPresent( "User Roles" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "Global Repository Manager" ) || role.equals( "Repository Manager - internal" )
+            || role.equals( "Repository Manager - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "Upload Artifact" );
+            assertLinkPresent( "Delete Artifact" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else
+        {
+            assertTextPresent( "Search" );
+            String navMenu =
+                "Find Artifact,Browse,Reports,User Management,User Roles,Appearance,Upload Artifact,Delete Artifact,Repository Groups,Repositories,Proxy Connectors,Legacy Support,Network Proxies,Repository Scanning";
+            String[] arrayMenu = navMenu.split( "," );
+            for ( String navmenu : arrayMenu )
+            {
+                assertLinkPresent( navmenu );
+            }
+        }
+    }
+
+    // Find Artifact
+    public void goToFindArtifactPage()
+    {
+        getSelenium().open( "/archiva/findArtifact.action" );
+        assertFindArtifactPage();
+    }
+
+    public void assertFindArtifactPage()
+    {
+        //assertPage( "Apache Archiva \\ Find Artifact" );
+        assertElementPresent( "searchBox" );
+        //assertTextPresent( "Find Artifact" );
+        //assertTextPresent( "Search for:" );
+        //assertTextPresent( "Checksum:" );
+        assertElementPresent( "quickSearchBox" );
+        assertElementPresent( "checksumSearch" );
+        //assertButtonWithValuePresent( "Search" );
+        assertElementPresent( "checksumSearch_0" );
+    }
+
+    // Appearance
+    public void goToAppearancePage()
+    {
+        getSelenium().open( "/archiva/admin/configureAppearance.action" );
+        assertAppearancePage();
+    }
+
+    public void assertAppearancePage()
+    {
+        assertPage( "Apache Archiva \\ Configure Appearance" );
+        String appearance =
+            "Appearance,Organization Details,The logo in the top right of the screen is controlled by the following settings.,Organization Information,Name,URL,Logo URL";
+        String[] arrayAppearance = appearance.split( "," );
+        for ( String appear : arrayAppearance )
+        {
+            assertTextPresent( appear );
+        }
+        assertLinkPresent( "Edit" );
+        assertLinkPresent( "Change your appearance" );
+    }
+
+    public void addEditAppearance( String name, String url, String logoUrl, boolean wait )
+    {
+        setFieldValue( "organisationName", name );
+        setFieldValue( "organisationUrl", url );
+        setFieldValue( "organisationLogo", logoUrl );
+        clickButtonWithValue( "Save", wait );
+    }
+
+    public void goToHomePage()
+    {
+        getSelenium().open( "" );
+    }
+
+    // Upload Artifact
+    public void goToAddArtifactPage()
+    {
+        // must be logged as admin
+        getSelenium().open( "/archiva/upload.action" );
+        assertAddArtifactPage();
+    }
+
+    public void assertAddArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Upload Artifact" );
+        assertTextPresent( "Upload Artifact" );
+
+        String artifact =
+            "Upload Artifact,Group Id*:,Artifact Id*:,Version*:,Packaging*:,Classifier:,Generate Maven 2 POM,Artifact File*:,POM File:,Repository Id:";
+        String[] arrayArtifact = artifact.split( "," );
+        for ( String arrayartifact : arrayArtifact )
+        {
+            assertTextPresent( arrayartifact );
+        }
+
+        String artifactElements =
+            "upload_groupId,upload_artifactId,upload_version,upload_packaging,upload_classifier,upload_generatePom,upload_artifact,upload_pom,upload_repositoryId,uploadSubmit";
+        String[] arrayArtifactElements = artifactElements.split( "," );
+        for ( String artifactelements : arrayArtifactElements )
+        {
+            assertElementPresent( artifactelements );
+        }
+    }
+
+    public void addArtifact( String groupId, String artifactId, String version, String packaging,
+                             String artifactFilePath, String repositoryId, boolean wait )
+    {
+        addArtifact( groupId, artifactId, version, packaging, true, artifactFilePath, repositoryId, wait );
+    }
+
+    public void addArtifact( String groupId, String artifactId, String version, String packaging, boolean generatePom,
+                             String artifactFilePath, String repositoryId, boolean wait )
+    {
+        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+        goToAddArtifactPage();
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        setFieldValue( "packaging", packaging );
+
+        if ( generatePom )
+        {
+            checkField( "generatePom" );
+        }
+
+        String path;
+        if ( artifactFilePath != null && artifactFilePath.trim().length() > 0 )
+        {
+            File f = new File( artifactFilePath );
+            try
+            {
+                path = f.getCanonicalPath();
+            }
+            catch ( IOException e )
+            {
+                path = f.getAbsolutePath();
+            }
+        }
+        else
+        {
+            path = artifactFilePath;
+        }
+
+        setFieldValue( "artifact", path );
+        selectValue( "upload_repositoryId", repositoryId );
+
+        //clickButtonWithValue( "Submit" );
+        clickButtonWithLocator( "uploadSubmit", wait );
+    }
+
+    public void goToRepositoriesPage()
+    {
+        if ( !getTitle().equals( "Apache Archiva \\ Administration - Repositories" ) )
+        {
+            getSelenium().open( "/archiva/admin/repositories.action" );
+        }
+        assertRepositoriesPage();
+    }
+
+    public void assertRepositoriesPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Repositories" );
+        assertTextPresent( "Administration - Repositories" );
+        assertTextPresent( "Managed Repositories" );
+        assertTextPresent( "Remote Repositories" );
+    }
+
+    public void addManagedRepository( String identifier, String name, String directory, String indexDirectory,
+                                      String type, String cron, String daysOlder, String retentionCount, boolean wait )
+    {
+        // goToRepositoriesPage();
+        // clickLinkWithText( "Add" );
+        setFieldValue( "repository.id", identifier );
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", directory );
+        setFieldValue( "repository.indexDirectory", indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.cronExpression", cron );
+        setFieldValue( "repository.daysOlder", daysOlder );
+        setFieldValue( "repository.retentionCount", retentionCount );
+        // TODO
+        clickButtonWithValue( "Add Repository", wait );
+    }
+
+    // artifact management
+    public void assertDeleteArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Delete Artifact" );
+        assertTextPresent( "Delete Artifact" );
+        assertTextPresent( "Group Id*:" );
+        assertTextPresent( "Artifact Id*:" );
+        assertTextPresent( "Version*:" );
+        assertTextPresent( "Repository Id:" );
+        assertElementPresent( "groupId" );
+        assertElementPresent( "artifactId" );
+        assertElementPresent( "version" );
+        assertElementPresent( "repositoryId" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    // network proxies
+    public void goToNetworkProxiesPage()
+    {
+        clickLinkWithText( "Network Proxies" );
+        assertNetworkProxiesPage();
+    }
+
+    public void assertNetworkProxiesPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Network Proxies" );
+        assertTextPresent( "Administration - Network Proxies" );
+        assertTextPresent( "Network Proxies" );
+        assertLinkPresent( "Add Network Proxy" );
+    }
+
+    public void addNetworkProxy( String identifier, String protocol, String hostname, String port, String username,
+                                 String password )
+    {
+        //goToNetworkProxiesPage();
+        clickLinkWithText( "Add Network Proxy" );
+        assertAddNetworkProxy();
+        setFieldValue( "proxy.id", identifier );
+        setFieldValue( "proxy.protocol", protocol );
+        setFieldValue( "proxy.host", hostname );
+        setFieldValue( "proxy.port", port );
+        setFieldValue( "proxy.username", username );
+        setFieldValue( "proxy.password", password );
+        clickButtonWithValue( "Save Network Proxy" );
+    }
+
+    public void assertAddNetworkProxy()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Network Proxy" );
+        assertTextPresent( "Admin: Add Network Proxy" );
+        assertTextPresent( "Add network proxy:" );
+        assertTextPresent( "Identifier*:" );
+        assertTextPresent( "Protocol*:" );
+        assertTextPresent( "Hostname*:" );
+        assertTextPresent( "Port*:" );
+        assertTextPresent( "Username:" );
+        assertTextPresent( "Password:" );
+        assertButtonWithValuePresent( "Save Network Proxy" );
+    }
+
+    // Legacy Support
+    public void goToLegacySupportPage()
+    {
+        getSelenium().open( "/archiva/admin/legacyArtifactPath.action" );
+        assertLegacySupportPage();
+    }
+
+    public void assertLegacySupportPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Legacy Support" );
+        assertTextPresent( "Administration - Legacy Artifact Path Resolution" );
+        assertTextPresent( "Path Mappings" );
+        assertLinkPresent( "Add" );
+    }
+
+    public void addLegacyArtifactPath( String path, String groupId, String artifactId, String version,
+                                       String classifier, String type, boolean wait )
+    {
+        assertAddLegacyArtifactPathPage();
+        setFieldValue( "legacyArtifactPath.path", path );
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        setFieldValue( "classifier", classifier );
+        setFieldValue( "type", type );
+        clickButtonWithValue( "Add Legacy Artifact Path", wait );
+    }
+
+    public void assertAddLegacyArtifactPathPage()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Legacy Artifact Path" );
+        assertTextPresent( "Admin: Add Legacy Artifact Path" );
+        assertTextPresent(
+            "Enter the legacy path to map to a particular artifact reference, then adjust the fields as necessary." );
+        String element =
+            "addLegacyArtifactPath_legacyArtifactPath_path,addLegacyArtifactPath_groupId,addLegacyArtifactPath_artifactId,addLegacyArtifactPath_version,addLegacyArtifactPath_classifier,addLegacyArtifactPath_type";
+        String[] arrayElement = element.split( "," );
+        for ( String arrayelement : arrayElement )
+        {
+            assertElementPresent( arrayelement );
+        }
+        assertButtonWithValuePresent( "Add Legacy Artifact Path" );
+    }
+
+    // add managed repository and its staging repository
+    public void addStagingRepository( String identifier, String name, String directory, String indexDirectory,
+                                      String type, String cron, String daysOlder, String retentionCount )
+    {
+        setFieldValue( "repository.id", identifier );
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", directory );
+        setFieldValue( "repository.indexDirectory", indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.cronExpression", cron );
+        setFieldValue( "repository.daysOlder", daysOlder );
+        setFieldValue( "repository.retentionCount", retentionCount );
+        checkField( "stageNeeded" );
+
+        clickButtonWithValue( "Add Repository" );
+    }
+
+    protected void logout()
+    {
+        clickLinkWithText( "Logout" );
+        assertTextNotPresent( "Current User:" );
+        assertLinkNotPresent( "Edit Details" );
+        assertLinkNotPresent( "Logout" );
+        assertLinkPresent( "Login" );
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
new file mode 100644 (file)
index 0000000..5869a06
--- /dev/null
@@ -0,0 +1,82 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * 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 abstract class AbstractArtifactManagementTest
+    extends AbstractArchivaTest
+{
+
+    public String getGroupId()
+    {
+        String groupId = getProperty( "GROUPID" );
+        return groupId;
+    }
+
+    public String getArtifactId()
+    {
+        String artifactId = getProperty( "ARTIFACTID" );
+        return artifactId;
+    }
+
+    public String getVersion()
+    {
+        String version = getProperty( "VERSION" );
+        return version;
+    }
+
+    public String getPackaging()
+    {
+        String packaging = getProperty( "PACKAGING" );
+        return packaging;
+    }
+
+    public String getArtifactFilePath()
+    {
+        return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
+    }
+
+    public String getRepositoryId()
+    {
+        String repositoryId = getProperty( "REPOSITORYID" );
+        return repositoryId;
+    }
+
+    public void goToDeleteArtifactPage()
+    {
+        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().open( "/archiva/deleteArtifact.action" );
+        assertDeleteArtifactPage();
+    }
+
+    public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
+    {
+        deleteArtifact( groupId, artifactId, version, repositoryId, false );
+    }
+
+    public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId, boolean wait )
+    {
+        goToDeleteArtifactPage();
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        selectValue( "repositoryId", repositoryId );
+        clickButtonWithValue( "Submit", wait );
+    }
+}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java
new file mode 100644 (file)
index 0000000..e026f78
--- /dev/null
@@ -0,0 +1,80 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * 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 abstract class AbstractArtifactReportsTest
+    extends AbstractArchivaTest
+{
+
+    // Reports
+    public void goToReportsPage()
+    {
+        getSelenium().open( "/archiva/report/pickReport.action" );
+        assertReportsPage();
+    }
+
+    public void assertReportsPage()
+    {
+        assertPage( "Apache Archiva \\ Reports" );
+        assertTextPresent( "Reports" );
+        assertTextPresent( "Repository Statistics" );
+        assertTextPresent( "Repositories To Be Compared" );
+        assertElementPresent( "availableRepositories" );
+        assertButtonWithValuePresent( "v" );
+        assertButtonWithValuePresent( "^" );
+        assertButtonWithValuePresent( "<-" );
+        assertButtonWithValuePresent( "->" );
+        assertButtonWithValuePresent( "<<--" );
+        assertButtonWithValuePresent( "-->>" );
+        assertButtonWithValuePresent( "<*>" );
+        assertElementPresent( "selectedRepositories" );
+        assertButtonWithValuePresent( "v" );
+        assertButtonWithValuePresent( "^" );
+        assertTextPresent( "Row Count" );
+        assertElementPresent( "rowCount" );
+        assertTextPresent( "Start Date" );
+        assertElementPresent( "startDate" );
+        assertTextPresent( "End Date" );
+        assertElementPresent( "endDate" );
+        assertButtonWithValuePresent( "View Statistics" );
+        assertTextPresent( "Repository Health" );
+        assertTextPresent( "Row Count" );
+        assertElementPresent( "rowCount" );
+        assertTextPresent( "Group ID" );
+        assertElementPresent( "groupId" );
+        assertTextPresent( "Repository ID" );
+        assertElementPresent( "repositoryId" );
+        assertButtonWithValuePresent( "Show Report" );
+    }
+
+    public void compareRepositories( String labelSelected, String startDate, String endDate )
+    {
+        goToReportsPage();
+        getSelenium().removeSelection( "generateStatisticsReport_availableRepositories", labelSelected );
+        clickButtonWithValue( "->", false );
+        getSelenium().type( "startDate", startDate );
+        // clickLinkWithLocator( "1" , false );
+        // getSelenium().click( "endDate" );
+        getSelenium().type( "endDate", endDate );
+        // clickLinkWithLocator( "30" , false );
+        clickButtonWithValue( "View Statistics" );
+    }
+
+}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java
new file mode 100644 (file)
index 0000000..2b4fc11
--- /dev/null
@@ -0,0 +1,40 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * 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 abstract class AbstractBrowseTest
+    extends AbstractArchivaTest
+{
+
+    // Browse
+    public void goToBrowsePage()
+    {
+        getSelenium().open( "/archiva/browse" );
+        assertBrowsePage();
+    }
+
+    public void assertBrowsePage()
+    {
+        assertPage( "Apache Archiva \\ Browse Repository" );
+        assertTextPresent( "Browse Repository" );
+        assertTextPresent( "Groups" );
+    }
+
+}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractMergingRepositoriesTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractMergingRepositoriesTest.java
new file mode 100644 (file)
index 0000000..91af2cf
--- /dev/null
@@ -0,0 +1,74 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+public class AbstractMergingRepositoriesTest
+    extends AbstractArchivaTest
+{
+
+    public void goToAuditLogReports()
+    {
+        getSelenium().open( "/archiva/report/queryAuditLogReport.action" );
+    }
+
+    public String getRepositoryDir()
+    {
+        File f = new File( "" );
+        String artifactFilePath = f.getAbsolutePath();
+        return artifactFilePath + "/target/";
+    }
+
+    public void editManagedRepository()
+    {
+        goToRepositoriesPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[1]/img" );
+        assertPage( "Apache Archiva \\ Admin: Edit Managed Repository" );
+        checkField( "repository.blockRedeployments" );
+        clickButtonWithValue( "Update Repository" );
+    }
+
+    public String getGroupId()
+    {
+        return getProperty( "VALIDARTIFACT_GROUPID" );
+    }
+
+    public String getArtifactId()
+    {
+        return getProperty( "VALIDARTIFACT_ARTIFACTID" );
+    }
+
+    public String getVersion()
+    {
+        return getProperty( "VERSION" );
+    }
+
+    public String getPackaging()
+    {
+        return getProperty( "PACKAGING" );
+    }
+
+    public String getValidArtifactFilePath()
+    {
+        return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
+    }
+
+}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java
new file mode 100644 (file)
index 0000000..a1214ac
--- /dev/null
@@ -0,0 +1,358 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import org.testng.Assert;
+
+public abstract class AbstractRepositoryTest
+    extends AbstractArchivaTest
+{
+    // Repository Groups
+    public void goToRepositoryGroupsPage()
+    {
+        if ( !getTitle().equals( "Apache Archiva \\ Administration - Repository Groups" ) )
+        {
+            getSelenium().open( "/archiva/admin/repositoryGroups.action" );
+        }
+        assertRepositoryGroupsPage();
+    }
+
+    public void assertRepositoryGroupsPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Repository Groups" );
+        assertTextPresent( "Administration - Repository Groups" );
+        assertTextPresent( "Identifier*:" );
+        assertElementPresent( "repositoryGroup.id" );
+        assertButtonWithValuePresent( "Add Group" );
+        assertTextPresent( "Repository Groups" );
+    }
+
+    public void assertAddedRepositoryLink( String repositoryGroupName )
+    {
+        assertPage( "Apache Archiva \\ Administration - Repository Groups" );
+        String repositoryGroupUrlValue = "repository/" + repositoryGroupName + "/";
+        String baseUrlValue = "archiva";
+        String repositoryGroupLink = baseUrl.replaceFirst( baseUrlValue, repositoryGroupUrlValue );
+        assertTextPresent( repositoryGroupLink );
+    }
+
+    public void assertAddedRepositoryToRepositoryGroups( String repositoryName )
+    {
+        assertPage( "Apache Archiva \\ Administration - Repository Groups" );
+        assertTextPresent( repositoryName );
+        assertTextPresent( "Archiva Managed Internal Repository" );
+        assertAddedRepositoryLink( repositoryName );
+    }
+
+    public void assertDeleteRepositoryGroupPage( String repositoryName )
+    {
+        assertPage( "Apache Archiva \\ Admin: Delete Repository Group" );
+        assertTextPresent( "WARNING: This operation can not be undone." );
+        assertTextPresent( "Are you sure you want to delete the following repository group?" );
+        assertTextPresent( "ID:" );
+        assertTextPresent( repositoryName );
+        assertButtonWithValuePresent( "Confirm" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addRepositoryGroup( String repoGroupName, boolean wait )
+    {
+        goToRepositoryGroupsPage();
+        setFieldValue( "repositoryGroup.id", repoGroupName );
+        clickButtonWithValue( "Add Group", wait );
+    }
+
+    public void addRepositoryToRepositoryGroup( String repositoryGroupName, String repositoryName )
+    {
+        goToRepositoryGroupsPage();
+        String s = getSelenium().getBodyText();
+        if ( s.contains( "No Repository Groups Defined." ) )
+        {
+            setFieldValue( "repositoryGroup.id", repositoryGroupName );
+            clickButtonWithValue( "Add Group" );
+            // assertAddedRepositoryLink( repositoryGroupName );
+
+            selectValue( "addRepositoryToGroup_repoId", repositoryName );
+            clickButtonWithValue( "Add Repository" );
+            assertAddedRepositoryToRepositoryGroups( repositoryName );
+        }
+        else
+        {
+            // assertAddedRepositoryLink( repositoryGroupName );
+            selectValue( "addRepositoryToGroup_repoId", repositoryName );
+            clickButtonWithValue( "Add Repository" );
+        }
+    }
+
+    public void deleteRepositoryInRepositoryGroups()
+    {
+        goToRepositoryGroupsPage();
+        getSelenium().click( "xpath=//div[@id='contentArea']/div[2]/div/div[3]/div[1]/a/img" );
+        waitPage();
+    }
+
+    public void deleteRepositoryGroup( String repositoryName )
+    {
+        getSelenium().click( "xpath=//div[@id='contentArea']/div[2]/div/div[1]/div/a/img" );
+        waitPage();
+        assertDeleteRepositoryGroupPage( repositoryName );
+        clickButtonWithValue( "Confirm" );
+    }
+
+    // /////////////////////////////
+    // proxy connectors
+    // /////////////////////////////
+    public void goToProxyConnectorsPage()
+    {
+        clickLinkWithText( "Proxy Connectors" );
+        assertProxyConnectorsPage();
+    }
+
+    public void assertProxyConnectorsPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Proxy Connectors" );
+        assertTextPresent( "Administration - Proxy Connectors" );
+        assertTextPresent( "Repository Proxy Connectors" );
+        assertTextPresent( "internal" );
+        assertTextPresent( "Archiva Managed Internal Repository" );
+        assertTextPresent( "Proxy Connector" );
+        assertTextPresent( "Central Repository" );
+    }
+
+    public void assertAddProxyConnectorPage()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Proxy Connector" );
+        assertTextPresent( "Admin: Add Proxy Connector" );
+        String proxy =
+            "Network Proxy*:,Managed Repository*:,Remote Repository*:,Policies:,Return error when:,On remote error:,Releases:,Snapshots:,Checksum:,Cache failures:,Properties:,No properties have been set.,Black List:,No black list patterns have been set.,White List:,No white list patterns have been set.";
+        String[] arrayProxy = proxy.split( "," );
+        for ( String arrayproxy : arrayProxy )
+            assertTextPresent( arrayproxy );
+        /*
+         * String proxyElements =
+         * "addProxyConnector_connector_proxyId,addProxyConnector_connector_sourceRepoId,addProxyConnector_connector_targetRepoId,policy_propagate-errors-on-update,policy_propagate-errors,policy_releases,policy_snapshots,policy_checksum,policy_cache-failures,propertiesEntry,propertiesValue,blackListEntry,whiteListEntry"
+         * ; String[] arrayProxyElements = proxyElements.split( "," ); for ( String arrayproxyelements :
+         * arrayProxyElements ) assertTextPresent( arrayproxyelements );
+         */
+        assertButtonWithValuePresent( "Add Property" );
+        assertButtonWithValuePresent( "Add Pattern" );
+        assertButtonWithValuePresent( "Add Proxy Connector" );
+    }
+
+    // this only fills in the values of required fields in adding Proxy Connectors
+    public void addProxyConnector( String networkProxy, String managedRepo, String remoteRepo )
+    {
+        goToProxyConnectorsPage();
+        clickLinkWithText( "Add" );
+        assertAddProxyConnectorPage();
+        selectValue( "connector.proxyId", networkProxy );
+        selectValue( "connector.sourceRepoId", managedRepo );
+        selectValue( "connector.targetRepoId", remoteRepo );
+        clickButtonWithValue( "Add Proxy Connector" );
+    }
+
+    public void deleteProxyConnector()
+    {
+        goToProxyConnectorsPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div[2]/div[1]/div[2]/div[1]/a[3]/img" );
+        assertPage( "Apache Archiva \\ Admin: Delete Proxy Connectors" );
+        clickButtonWithValue( "Delete" );
+        assertPage( "Apache Archiva \\ Administration - Proxy Connectors" );
+    }
+
+    // /////////////////////////////
+    // network proxies
+    // /////////////////////////////
+
+    public void editNetworkProxies( String fieldName, String value )
+    {
+        // goToNetworkProxiesPage();
+        clickLinkWithText( "Edit Network Proxy" );
+        setFieldValue( fieldName, value );
+        clickButtonWithValue( "Save Network Proxy" );
+    }
+
+    public void deleteNetworkProxy()
+    {
+        // goToNetworkProxiesPage();
+        clickLinkWithText( "Delete Network Proxy" );
+        assertPage( "Apache Archiva \\ Admin: Delete Network Proxy" );
+        assertTextPresent( "WARNING: This operation can not be undone." );
+        clickButtonWithValue( "Delete" );
+    }
+
+    // remote repositories
+    public void assertAddRemoteRepository()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Remote Repository" );
+        String remote = "Identifier*:,Name*:,URL*:,Username:,Password:,Timeout in seconds:,Type:";
+        String[] arrayRemote = remote.split( "," );
+        for ( String arrayremote : arrayRemote )
+            assertTextPresent( arrayremote );
+        String remoteElements =
+            "addRemoteRepository_repository_id,addRemoteRepository_repository_name,addRemoteRepository_repository_url,addRemoteRepository_repository_userName,addRemoteRepository_repository_password,addRemoteRepository_repository_timeout,addRemoteRepository_repository_layout";
+        String[] arrayRemoteElements = remoteElements.split( "," );
+        for ( String arrayremotelement : arrayRemoteElements )
+            assertElementPresent( arrayremotelement );
+    }
+
+    public void assertDeleteRemoteRepositoryPage()
+    {
+        assertPage( "Apache Archiva \\ Admin: Delete Remote Repository" );
+        assertTextPresent( "Admin: Delete Remote Repository" );
+        assertTextPresent( "WARNING: This operation can not be undone." );
+        assertTextPresent( "Are you sure you want to delete the following remote repository?" );
+        assertButtonWithValuePresent( "Confirm" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addRemoteRepository( String identifier, String name, String url, String username, String password,
+                                     String timeout, String type, boolean wait )
+    {
+        assertAddRemoteRepository();
+        setFieldValue( "addRemoteRepository_repository_id", identifier );
+        setFieldValue( "addRemoteRepository_repository_name", name );
+        setFieldValue( "addRemoteRepository_repository_url", url );
+        setFieldValue( "addRemoteRepository_repository_userName", username );
+        setFieldValue( "addRemoteRepository_repository_password", password );
+        setFieldValue( "addRemoteRepository_repository_timeout", timeout );
+        selectValue( "addRemoteRepository_repository_layout", type );
+        clickButtonWithValue( "Add Repository", wait );
+    }
+
+    public void deleteRemoteRepository()
+    {
+        goToRepositoriesPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[8]/div[1]/a[2]" );
+        assertDeleteRemoteRepositoryPage();
+        clickButtonWithValue( "Confirm" );
+    }
+
+    public void editRemoteRepository( String fieldName, String value )
+    {
+        goToRepositoriesPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[8]/div[1]/a[1]" );
+        setFieldValue( fieldName, value );
+        clickButtonWithValue( "Update Repository" );
+    }
+
+    public void editManagedRepository( String fieldName, String value )
+    {
+        goToRepositoriesPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[1]/img" );
+        assertPage( "Apache Archiva \\ Admin: Edit Managed Repository" );
+        setFieldValue( fieldName, value );
+        // TODO
+        clickButtonWithValue( "Update Repository" );
+    }
+
+    public void editManagedRepository(String name, String directory, String indexDirectory, String type, String cron, String daysOlder, String retentionCount)
+    {
+        goToRepositoriesPage();
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[1]/img" );
+        assertPage( "Apache Archiva \\ Admin: Edit Managed Repository" );
+        setFieldValue( "repository.name" , name );
+        setFieldValue( "repository.location" , directory );
+        setFieldValue( "repository.indexDirectory" , indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.cronExpression" , cron );
+        setFieldValue( "repository.daysOlder" , daysOlder );
+        setFieldValue( "repository.retentionCount" , retentionCount );
+        clickButtonWithValue( "Update Repository" );
+    }
+
+    public void deleteManagedRepository()
+    {
+        clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[2]" );
+        assertPage( "Apache Archiva \\ Admin: Delete Managed Repository" );
+        clickButtonWithValue( "Delete Configuration Only" );
+    }
+
+    public String getRepositoryDir()
+    {
+        File f = new File( "" );
+        String artifactFilePath = f.getAbsolutePath();
+        return artifactFilePath + "/target/";
+    }
+
+    // ///////////////////////////////////////////
+    // Repository Scanning
+    // ///////////////////////////////////////////
+    public void goToRepositoryScanningPage()
+    {
+        getSelenium().open( "/archiva/admin/repositoryScanning.action" );
+        assertRepositoryScanningPage();
+    }
+
+    public void assertRepositoryScanningPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Repository Scanning" );
+        assertTextPresent( "Administration - Repository Scanning" );
+        assertTextPresent( "Repository Scanning - File Types" );
+        String artifactsTypes =
+            "**/*.pom,**/*.jar,**/*.ear,**/*.war,**/*.car,**/*.sar,**/*.mar,**/*.rar,**/*.dtd,**/*.tld,**/*.tar.gz,**/*.tar.bz2,**/*.zip";
+        String[] arrayArtifactTypes = artifactsTypes.split( "," );
+        for ( int i = 0; i < arrayArtifactTypes.length; i++ )
+            Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[1]/table." + i + ".0" ),
+                                 arrayArtifactTypes[i] );
+
+        String autoremove = "**/*.bak,**/*~,**/*-";
+        String[] arrayAutoremove = autoremove.split( "," );
+        for ( int i = 0; i < arrayAutoremove.length; i++ )
+            Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[2]/table." + i + ".0" ),
+                                 arrayAutoremove[i] );
+
+        String ignored = "**/.htaccess,**/KEYS,**/*.rb,**/*.sh,**/.svn/**,**/.DAV/**";
+        String[] arrayIgnored = ignored.split( "," );
+        for ( int i = 0; i < arrayIgnored.length; i++ )
+            Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[3]/table." + i + ".0" ),
+                                 arrayIgnored[i] );
+
+        String indexableContent =
+            "**/*.txt,**/*.TXT,**/*.block,**/*.config,**/*.pom,**/*.xml,**/*.xsd,**/*.dtd,**/*.tld";
+        String[] arrayIndexableContent = indexableContent.split( "," );
+        for ( int i = 0; i < arrayIndexableContent.length; i++ )
+            Assert.assertEquals( getSelenium().getTable( "//div[@id='contentArea']/div/div[4]/table." + i + ".0" ),
+                                 arrayIndexableContent[i] );
+    }
+
+    // ///////////////////////////////////////////
+    // Database
+    // ///////////////////////////////////////////
+    public void goToDatabasePage()
+    {
+        clickLinkWithText( "Database" );
+        assertDatabasePage();
+    }
+
+    public void assertDatabasePage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Database" );
+        assertTextPresent( "Administration - Database" );
+        assertTextPresent( "Database - Unprocessed Artifacts Scanning" );
+        assertTextPresent( "Cron:" );
+        assertElementPresent( "database_cron" );
+        assertButtonWithValuePresent( "Update Cron" );
+        assertButtonWithValuePresent( "Update Database Now" );
+        assertTextPresent( "Database - Unprocessed Artifacts Scanning" );
+        assertTextPresent( "Database - Artifact Cleanup Scanning" );
+    }
+}
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java
new file mode 100644 (file)
index 0000000..33b12be
--- /dev/null
@@ -0,0 +1,117 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * 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 abstract class AbstractSearchTest
+    extends AbstractArchivaTest
+{
+    // Search
+    public void goToSearchPage()
+    {
+        goToHomePage();
+        if (!isElementPresent( "quickSearchBox" ) )
+        {
+            getSelenium().open( "/index.action");
+            //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+            waitPage();
+            assertElementPresent( "quickSearchSubmit" );
+        }
+    }
+
+    public void assertSearchPage()
+    {
+        assertPage( "Apache Archiva \\ Quick Search" );
+        assertTextPresent( "Search for" );
+        assertElementPresent( "quickSearchSubmit" );
+        assertButtonWithValuePresent( "Search" );
+        // assertLinkPresent( "Advanced Search" );
+        assertTextPresent( "Enter your search terms. A variety of data will be searched for your keywords." );
+        // assertButtonWithDivIdPresent( "searchHint" );
+    }
+
+    public void searchForArtifact( String artifactId )
+    {
+        goToSearchPage();
+
+        setFieldValue( "quickSearchValue", artifactId );
+        clickButtonWithLocator( "quickSearchSubmit" );
+    }
+
+    public void searchForArtifactAdvancedSearch( String groupId, String artifactId, String version, String repositoryId,
+                                                 String className, String rowCount )
+    {
+        goToSearchPage();
+
+        clickLinkWithXPath( "//div[@id='contentArea']/div[1]/a[1]/strong", false );
+        assertElementPresent( "filteredSearch_searchField" );
+        assertElementPresent( "filteredSearch_repositoryId" );
+
+        if ( groupId != null )
+        {
+            selectValue( "filteredSearch_searchField", "Group ID" );
+            clickLinkWithLocator( "//a[@id='filteredSearch_']/img", false );
+
+            assertElementPresent( "groupId" );
+            setFieldValue( "groupId", groupId );
+        }
+
+        if ( artifactId != null )
+        {
+            selectValue( "filteredSearch_searchField", "Artifact ID" );
+            clickLinkWithLocator( "//a[@id='filteredSearch_']/img", false );
+
+            assertElementPresent( "artifactId" );
+            setFieldValue( "artifactId", artifactId );
+        }
+
+        if ( version != null )
+        {
+            selectValue( "filteredSearch_searchField", "Version" );
+            clickLinkWithLocator( "//a[@id='filteredSearch_']/img", false );
+
+            assertElementPresent( "version" );
+            setFieldValue( "version", version );
+        }
+
+        if ( className != null )
+        {
+            selectValue( "filteredSearch_searchField", "Class/Package Name" );
+            clickLinkWithLocator( "//a[@id='filteredSearch_']/img", false );
+
+            assertElementPresent( "className" );
+            setFieldValue( "className", className );
+        }
+
+        if ( rowCount != null )
+        {
+            selectValue( "filteredSearch_searchField", "Row Count" );
+            clickLinkWithLocator( "//a[@id='filteredSearch_']/img", false );
+
+            assertElementPresent( "rowCount" );
+            setFieldValue( "rowCount", rowCount );
+        }
+
+        if ( repositoryId != null )
+        {
+            selectValue( "filteredSearch_repositoryId", repositoryId );
+        }
+        clickSubmitWithLocator( "filteredSearch_0" );
+    }
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
new file mode 100644 (file)
index 0000000..1619d33
--- /dev/null
@@ -0,0 +1,488 @@
+package org.apache.archiva.web.test.parent;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.Selenium;
+import org.apache.commons.io.IOUtils;
+import org.testng.Assert;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id: AbstractSeleniumTestCase.java 761154 2009-04-02 03:31:19Z wsmoak $
+ */
+
+public abstract class AbstractSeleniumTest
+{
+
+    public static String baseUrl;
+
+    public static String maxWaitTimeInMs;
+
+    private static ThreadLocal<Selenium> selenium = new ThreadLocal<Selenium>();
+
+    public static Properties p;
+
+    private final static String PROPERTIES_SEPARATOR = "=";
+
+    public void open()
+        throws Exception
+    {
+        p = new Properties();
+        p.load( this.getClass().getClassLoader().getResourceAsStream( "testng.properties" ) );
+    }
+
+    /**
+     * Initialize selenium
+     */
+    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort, String maxWaitTimeInMs )
+        throws Exception
+    {
+        try
+        {
+            AbstractSeleniumTest.baseUrl = baseUrl;
+            AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs;
+
+            if ( getSelenium() == null )
+            {
+                DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl );
+                s.start();
+                s.setTimeout( maxWaitTimeInMs );
+                selenium.set( s );
+            }
+        }
+        catch ( Exception e )
+        {
+            // yes
+            System.out.print( e.getMessage() );
+            e.printStackTrace();
+        }
+    }
+
+    public static Selenium getSelenium()
+    {
+        return selenium == null ? null : selenium.get();
+    }
+
+    protected String getProperty( String key )
+    {
+        return p.getProperty( key );
+    }
+
+    protected String getEscapeProperty( String key )
+    {
+        InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties" );
+        String value = null;
+        List<String> lines;
+        try
+        {
+            lines = IOUtils.readLines( input );
+        }
+        catch ( IOException e )
+        {
+            lines = new ArrayList<String>();
+        }
+        for ( String l : lines )
+        {
+            if ( l != null && l.startsWith( key ) )
+            {
+                int indexSeparator = l.indexOf( PROPERTIES_SEPARATOR );
+                value = l.substring( indexSeparator + 1 ).trim();
+                break;
+            }
+        }
+        return value;
+    }
+
+    /**
+     * Close selenium session. Called from AfterSuite method of sub-class
+     */
+    public void close()
+        throws Exception
+    {
+        if ( getSelenium() != null )
+        {
+            getSelenium().stop();
+            selenium.set( null );
+        }
+    }
+
+    // *******************************************************
+    // Auxiliar methods. This method help us and simplify test.
+    // *******************************************************
+
+    public void assertFieldValue( String fieldValue, String fieldName )
+    {
+        assertElementPresent( fieldName );
+        Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
+    }
+
+    public void assertPage( String title )
+    {
+        Assert.assertEquals( getTitle(), title );
+    }
+
+    public String getTitle()
+    {
+        // Collapse spaces
+        return getSelenium().getTitle().replaceAll( "[ \n\r]+", " " );
+    }
+
+    public String getHtmlContent()
+    {
+        return getSelenium().getHtmlSource();
+    }
+
+    public String getText( String locator )
+    {
+        return getSelenium().getText( locator );
+    }
+
+    public void assertTextPresent( String text )
+    {
+        Assert.assertTrue( getSelenium().isTextPresent( text ), "'" + text + "' isn't present." );
+    }
+
+    /**
+     * one of text args must be in the page so use en and fr text (olamy use en locale :-) )
+     *
+     * @param texts
+     */
+    public void assertTextPresent( String... texts )
+    {
+        boolean present = false;
+        StringBuilder sb = new StringBuilder();
+        for ( String text : texts )
+        {
+            present = present || getSelenium().isTextPresent( text );
+            sb.append( " " + text + " " );
+        }
+        Assert.assertTrue( present, "'one of the following test " + sb.toString() + "' isn't present." );
+    }
+
+    public void assertTextNotPresent( String text )
+    {
+        Assert.assertFalse( getSelenium().isTextPresent( text ), "'" + text + "' is present." );
+    }
+
+    public void assertElementPresent( String elementLocator )
+    {
+        Assert.assertTrue( isElementPresent( elementLocator ), "'" + elementLocator + "' isn't present." );
+    }
+
+    public void assertElementNotPresent( String elementLocator )
+    {
+        Assert.assertFalse( isElementPresent( elementLocator ), "'" + elementLocator + "' is present." );
+    }
+
+    public void assertLinkPresent( String text )
+    {
+        Assert.assertTrue( isElementPresent( "link=" + text ), "The link '" + text + "' isn't present." );
+    }
+
+    public void assertLinkNotPresent( String text )
+    {
+        Assert.assertFalse( isElementPresent( "link=" + text ), "The link('" + text + "' is present." );
+    }
+
+    public void assertImgWithAlt( String alt )
+    {
+        assertElementPresent( "/¯img[@alt='" + alt + "']" );
+    }
+
+    public void assertImgWithAltAtRowCol( boolean isALink, String alt, int row, int column )
+    {
+        String locator = "//tr[" + row + "]/td[" + column + "]/";
+        locator += isALink ? "a/" : "";
+        locator += "img[@alt='" + alt + "']";
+
+        assertElementPresent( locator );
+    }
+
+    public void assertImgWithAltNotPresent( String alt )
+    {
+        assertElementNotPresent( "/¯img[@alt='" + alt + "']" );
+    }
+
+    public void assertCellValueFromTable( String expected, String tableElement, int row, int column )
+    {
+        Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
+    }
+
+    public boolean isTextPresent( String text )
+    {
+        return getSelenium().isTextPresent( text );
+    }
+
+    public boolean isLinkPresent( String text )
+    {
+        return isElementPresent( "link=" + text );
+    }
+
+    public boolean isElementPresent( String locator )
+    {
+        return getSelenium().isElementPresent( locator );
+    }
+
+    public boolean isElementVisible( String locator )
+    {
+        return getSelenium().isVisible( locator );
+    }
+
+
+    public void waitPage()
+    {
+        // TODO define a smaller maxWaitTimeJsInMs for wait javascript response for browser side validation
+        //getSelenium().w .wait( Long.parseLong( maxWaitTimeInMs ) );
+        //getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        // http://jira.openqa.org/browse/SRC-302
+        // those hack looks to break some tests :-(
+        // getSelenium().waitForCondition( "selenium.isElementPresent('document.body');", maxWaitTimeInMs );
+        //getSelenium().waitForCondition( "selenium.isElementPresent('footer');", maxWaitTimeInMs );
+        //getSelenium().waitForCondition( "selenium.browserbot.getCurrentWindow().document.getElementById('footer')",
+        //                                maxWaitTimeInMs );
+        // so the only hack is to not use a too small wait time
+
+        try
+        {
+            Thread.sleep( Long.parseLong( maxWaitTimeInMs ) );
+        }
+        catch ( InterruptedException e )
+        {
+            throw new RuntimeException( "issue on Thread.sleep : " + e.getMessage(), e );
+        }
+    }
+
+    public String getFieldValue( String fieldName )
+    {
+        return getSelenium().getValue( fieldName );
+    }
+
+    public String getCellValueFromTable( String tableElement, int row, int column )
+    {
+        return getSelenium().getTable( tableElement + "." + row + "." + column );
+    }
+
+    public void selectValue( String locator, String value )
+    {
+        getSelenium().select( locator, "label=" + value );
+    }
+
+
+    public void assertOptionPresent( String selectField, String[] options )
+    {
+        assertElementPresent( selectField );
+        String[] optionsPresent = getSelenium().getSelectOptions( selectField );
+        List<String> expected = Arrays.asList( options );
+        List<String> present = Arrays.asList( optionsPresent );
+        Assert.assertTrue( present.containsAll( expected ), "Options expected are not included in present options" );
+    }
+
+    public void assertSelectedValue( String value, String fieldName )
+    {
+        assertElementPresent( fieldName );
+        String optionsPresent = getSelenium().getSelectedLabel( value );
+        Assert.assertEquals( optionsPresent, value );
+    }
+
+    public void submit()
+    {
+        clickLinkWithXPath( "//input[@type='submit']" );
+    }
+
+    public void assertButtonWithValuePresent( String text )
+    {
+        Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
+    }
+
+    public void assertButtonWithIdPresent( String id )
+    {
+        Assert.assertTrue( isButtonWithIdPresent( id ), "'Button with id =" + id + "' isn't present" );
+    }
+
+    public void assertButtonWithValueNotPresent( String text )
+    {
+        Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
+    }
+
+    public boolean isButtonWithValuePresent( String text )
+    {
+        return isElementPresent( "//button[@value='" + text + "']" ) || isElementPresent(
+            "//input[@value='" + text + "']" );
+    }
+
+    public boolean isButtonWithIdPresent( String text )
+    {
+        return isElementPresent( "//button[@id='" + text + "']" ) || isElementPresent( "//input[@id='" + text + "']" );
+    }
+
+    public void clickButtonWithName( String text, boolean wait )
+    {
+        clickLinkWithXPath( "//input[@name='" + text + "']", wait );
+    }
+
+    public void clickButtonWithValue( String text )
+    {
+        clickButtonWithValue( text, true );
+    }
+
+    public void clickButtonWithValue( String text, boolean wait )
+    {
+        assertButtonWithValuePresent( text );
+
+        if ( isElementPresent( "//button[@value='" + text + "']" ) )
+        {
+            clickLinkWithXPath( "//button[@value='" + text + "']", wait );
+        }
+        else
+        {
+            clickLinkWithXPath( "//input[@value='" + text + "']", wait );
+        }
+    }
+
+    public void clickSubmitWithLocator( String locator )
+    {
+        clickLinkWithLocator( locator );
+    }
+
+    public void clickSubmitWithLocator( String locator, boolean wait )
+    {
+        clickLinkWithLocator( locator, wait );
+    }
+
+    public void clickImgWithAlt( String alt )
+    {
+        clickLinkWithLocator( "//img[@alt='" + alt + "']" );
+    }
+
+    public void clickLinkWithText( String text )
+    {
+        clickLinkWithText( text, true );
+    }
+
+    public void clickLinkWithText( String text, boolean wait )
+    {
+        clickLinkWithLocator( "link=" + text, wait );
+    }
+
+    public void clickLinkWithXPath( String xpath )
+    {
+        clickLinkWithXPath( xpath, true );
+    }
+
+    public void clickLinkWithXPath( String xpath, boolean wait )
+    {
+        clickLinkWithLocator( "xpath=" + xpath, wait );
+    }
+
+    public void clickLinkWithLocator( String locator )
+    {
+        clickLinkWithLocator( locator, true );
+    }
+
+    public void clickLinkWithLocator( String locator, boolean wait )
+    {
+        assertElementPresent( locator );
+        getSelenium().click( locator );
+        if ( wait )
+        {
+            waitPage();
+        }
+    }
+
+    public void clickButtonWithLocator( String locator )
+    {
+        clickButtonWithLocator( locator, true );
+    }
+
+    public void clickButtonWithLocator( String locator, boolean wait )
+    {
+        assertElementPresent( locator );
+        getSelenium().click( locator );
+        if ( wait )
+        {
+            waitPage();
+        }
+    }
+
+    public void setFieldValues( Map<String, String> fieldMap )
+    {
+        Map.Entry<String, String> entry;
+
+        for ( Iterator<Entry<String, String>> entries = fieldMap.entrySet().iterator(); entries.hasNext(); )
+        {
+            entry = entries.next();
+
+            getSelenium().type( entry.getKey(), entry.getValue() );
+        }
+    }
+
+    public void setFieldValue( String fieldName, String value )
+    {
+        getSelenium().type( fieldName, value );
+    }
+
+    public void checkField( String locator )
+    {
+        getSelenium().check( locator );
+    }
+
+    public void uncheckField( String locator )
+    {
+        getSelenium().uncheck( locator );
+    }
+
+    public boolean isChecked( String locator )
+    {
+        return getSelenium().isChecked( locator );
+    }
+
+    public void assertIsChecked( String locator )
+    {
+        Assert.assertTrue( getSelenium().isChecked( locator ) );
+    }
+
+    public void assertIsNotChecked( String locator )
+    {
+        Assert.assertFalse( getSelenium().isChecked( locator ) );
+    }
+
+    public void assertXpathCount( String locator, int expectedCount )
+    {
+        int count = getSelenium().getXpathCount( locator ).intValue();
+        Assert.assertEquals( count, expectedCount );
+    }
+
+    public void assertElementValue( String locator, String expectedValue )
+    {
+        Assert.assertEquals( getSelenium().getValue( locator ), expectedValue );
+    }
+
+}
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/archiva.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/archiva.xml
new file mode 100644 (file)
index 0000000..af06920
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<Context path="/archiva"
+         docBase="${catalina.base}/webapps/archiva">
+
+  <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
+            username="sa"
+            password=""
+            driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+            url="jdbc:derby:target/database/users;create=true"
+      />
+</Context>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml
new file mode 100644 (file)
index 0000000..1e31ca5
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+    <!--
+
+        Context configuration file for the Tomcat Host Manager Web App
+
+        $Id$
+
+    -->
+
+
+<Context docBase="${catalina.home}/webapps/host-manager"/>
+  <!--
+         privileged="true" antiResourceLocking="false" antiJARLocking="false">
+
+</Context>
+-->
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml
new file mode 100644 (file)
index 0000000..7229a88
--- /dev/null
@@ -0,0 +1,38 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+    <!--
+
+        Context configuration file for the Tomcat Manager Web App
+
+        $Id$
+
+    -->
+
+
+<Context docBase="${catalina.home}/webapps/manager"/>
+ <!--
+         privileged="true" antiResourceLocking="false" antiJARLocking="false">
+
+
+  <ResourceLink name="users" global="UserDatabase"
+                type="org.apache.catalina.UserDatabase"/>
+
+</Context>
+     -->
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.policy b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.policy
new file mode 100644 (file)
index 0000000..167e10f
--- /dev/null
@@ -0,0 +1,7 @@
+    grant {\r
+                 permission java.security.AllPermission;\r
+              };\r
+\r
+grant codeBase "file:${catalina.home}/lib/tomcat-juli.jar" {\r
+ permission java.lang.RuntimePermission "setContextClassLoader";\r
+};
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.properties b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/catalina.properties
new file mode 100644 (file)
index 0000000..4cb90ce
--- /dev/null
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more\r
+# contributor license agreements.  See the NOTICE file distributed with\r
+# this work for additional information regarding copyright ownership.\r
+# The ASF licenses this file to You under the Apache License, Version 2.0\r
+# (the "License"); you may not use this file except in compliance with\r
+# the License.  You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+#\r
+# List of comma-separated packages that start with or equal this string\r
+# will cause a security exception to be thrown when\r
+# passed to checkPackageAccess unless the\r
+# corresponding RuntimePermission ("accessClassInPackage."+package) has\r
+# been granted.\r
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.\r
+#\r
+# List of comma-separated packages that start with or equal this string\r
+# will cause a security exception to be thrown when\r
+# passed to checkPackageDefinition unless the\r
+# corresponding RuntimePermission ("defineClassInPackage."+package) has\r
+# been granted.\r
+#\r
+# by default, no packages are restricted for definition, and none of\r
+# the class loaders supplied with the JDK call checkPackageDefinition.\r
+#\r
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.\r
+\r
+#\r
+#\r
+# List of comma-separated paths defining the contents of the "common" \r
+# classloader. Prefixes should be used to define what is the repository type.\r
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.\r
+# If left as blank,the JVM system loader will be used as Catalina's "common" \r
+# loader.\r
+# Examples:\r
+#     "foo": Add this folder as a class repository\r
+#     "foo/*.jar": Add all the JARs of the specified folder as class \r
+#                  repositories\r
+#     "foo/bar.jar": Add bar.jar as a class repository\r
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar\r
+\r
+#\r
+# List of comma-separated paths defining the contents of the "server" \r
+# classloader. Prefixes should be used to define what is the repository type.\r
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.\r
+# If left as blank, the "common" loader will be used as Catalina's "server" \r
+# loader.\r
+# Examples:\r
+#     "foo": Add this folder as a class repository\r
+#     "foo/*.jar": Add all the JARs of the specified folder as class \r
+#                  repositories\r
+#     "foo/bar.jar": Add bar.jar as a class repository\r
+server.loader=\r
+\r
+#\r
+# List of comma-separated paths defining the contents of the "shared" \r
+# classloader. Prefixes should be used to define what is the repository type.\r
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,\r
+# the "common" loader will be used as Catalina's "shared" loader.\r
+# Examples:\r
+#     "foo": Add this folder as a class repository\r
+#     "foo/*.jar": Add all the JARs of the specified folder as class \r
+#                  repositories\r
+#     "foo/bar.jar": Add bar.jar as a class repository \r
+# Please note that for single jars, e.g. bar.jar, you need the URL form\r
+# starting with file:.\r
+shared.loader=\r
+\r
+#\r
+# String cache configuration.\r
+tomcat.util.buf.StringCache.byte.enabled=true\r
+#tomcat.util.buf.StringCache.char.enabled=true\r
+#tomcat.util.buf.StringCache.trainThreshold=500000\r
+#tomcat.util.buf.StringCache.cacheSize=5000\r
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/context.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/context.xml
new file mode 100644 (file)
index 0000000..876067a
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- The contents of this file will be loaded for each web application -->
+<Context>
+
+    <!-- Default set of monitored resources -->
+    <WatchedResource>WEB-INF/web.xml</WatchedResource>
+
+    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
+    <!--
+    <Manager pathname="" />
+    -->
+
+    <!-- Uncomment this to enable Comet connection tacking (provides events
+         on session expiration as well as webapp lifecycle) -->
+    <!--
+    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
+    -->
+
+</Context>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/logging.properties b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/logging.properties
new file mode 100644 (file)
index 0000000..9808c73
--- /dev/null
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more\r
+# contributor license agreements.  See the NOTICE file distributed with\r
+# this work for additional information regarding copyright ownership.\r
+# The ASF licenses this file to You under the Apache License, Version 2.0\r
+# (the "License"); you may not use this file except in compliance with\r
+# the License.  You may obtain a copy of the License at\r
+#\r
+#     http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+handlers = java.util.logging.ConsoleHandler\r
+\r
+############################################################\r
+# Handler specific properties.\r
+# Describes specific configuration info for Handlers.\r
+############################################################\r
+\r
+java.util.logging.ConsoleHandler.level = FINE\r
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter\r
+\r
+############################################################\r
+# Facility specific properties.\r
+# Provides extra control for each logger.\r
+############################################################\r
+\r
+org.apache.catalina.level = @catalina.logging.level@\r
+org.apache.catalina.startup.HostConfig.level = INFO\r
+org.apache.catalina.session.ManagerBase.level = INFO\r
+\r
+\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler\r
+\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler\r
+\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].level = INFO\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin].handlers = java.util.logging.ConsoleHandler\r
+\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO\r
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = java.util.logging.ConsoleHandler
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/server.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/server.xml
new file mode 100644 (file)
index 0000000..cc59237
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one or more\r
+  contributor license agreements.  See the NOTICE file distributed with\r
+  this work for additional information regarding copyright ownership.\r
+  The ASF licenses this file to You under the Apache License, Version 2.0\r
+  (the "License"); you may not use this file except in compliance with\r
+  the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<!-- Note:  A "Server" is not itself a "Container", so you may not\r
+     define subcomponents such as "Valves" at this level.\r
+     Documentation at /docs/config/server.html\r
+ -->\r
+<Server port="9695" shutdown="SHUTDOWN">\r
+\r
+  <!--APR library loader. Documentation at /docs/apr.html -->\r
+  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />\r
+  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->\r
+  <Listener className="org.apache.catalina.core.JasperListener" />\r
+  <!-- Prevent memory leaks due to use of particular java/javax APIs-->\r
+  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />\r
+  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->\r
+  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />\r
+  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />\r
+\r
+  <!-- Global JNDI resources\r
+       Documentation at /docs/jndi-resources-howto.html\r
+  -->\r
+  <GlobalNamingResources>\r
+    <!-- Editable user database that can also be used by\r
+         UserDatabaseRealm to authenticate users\r
+    -->\r
+    <Resource name="UserDatabase" auth="Container"\r
+              type="org.apache.catalina.UserDatabase"\r
+              description="User database that can be updated and saved"\r
+              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"\r
+              pathname="conf/tomcat-users.xml" />\r
+  </GlobalNamingResources>\r
+\r
+  <Service name="Catalina">\r
+\r
+    <Connector port="9696" protocol="HTTP/1.1"\r
+               connectionTimeout="20000" \r
+               redirectPort="8443" />\r
+\r
+    <Engine name="Catalina" defaultHost="localhost">\r
+\r
+      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"\r
+             resourceName="UserDatabase"/>\r
+      <Valve className="org.apache.catalina.valves.AccessLogValve"\r
+             resolveHosts="false" pattern="%t-m:%m-url:%U-%q-%Dms"/>\r
+\r
+      <Host name="localhost"  appBase="webapps"\r
+            unpackWARs="true" autoDeploy="true"\r
+            xmlValidation="false" xmlNamespaceAware="false">\r
+\r
+      </Host>\r
+    </Engine>\r
+  </Service>\r
+</Server>\r
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml
new file mode 100644 (file)
index 0000000..34e268d
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='utf-8'?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one or more\r
+  contributor license agreements.  See the NOTICE file distributed with\r
+  this work for additional information regarding copyright ownership.\r
+  The ASF licenses this file to You under the Apache License, Version 2.0\r
+  (the "License"); you may not use this file except in compliance with\r
+  the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<tomcat-users>\r
+<!--\r
+  NOTE:  By default, no user is included in the "manager-gui" role required\r
+  to operate the "/manager/html" web application.  If you wish to use this app,\r
+  you must define such a user - the username and password are arbitrary.\r
+-->\r
+<!--\r
+  NOTE:  The sample user and role entries below are wrapped in a comment\r
+  and thus are ignored when reading this file. Do not forget to remove\r
+  <!.. ..> that surrounds them.\r
+-->\r
+<!--\r
+  <role rolename="tomcat"/>\r
+  <role rolename="role1"/>\r
+  <user username="tomcat" password="tomcat" roles="tomcat"/>\r
+  <user username="both" password="tomcat" roles="tomcat,role1"/>\r
+  <user username="role1" password="tomcat" roles="role1"/>\r
+-->\r
+</tomcat-users>\r
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/web.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/web.xml
new file mode 100644 (file)
index 0000000..05f7c77
--- /dev/null
@@ -0,0 +1,1205 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>\r
+<!--\r
+  Licensed to the Apache Software Foundation (ASF) under one or more\r
+  contributor license agreements.  See the NOTICE file distributed with\r
+  this work for additional information regarding copyright ownership.\r
+  The ASF licenses this file to You under the Apache License, Version 2.0\r
+  (the "License"); you may not use this file except in compliance with\r
+  the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"\r
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"\r
+    version="2.5">\r
+\r
+  <!-- ======================== Introduction ============================== -->\r
+  <!-- This document defines default values for *all* web applications      -->\r
+  <!-- loaded into this instance of Tomcat.  As each application is         -->\r
+  <!-- deployed, this file is processed, followed by the                    -->\r
+  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->\r
+  <!-- applications.                                                        -->\r
+  <!--                                                                      -->\r
+  <!-- WARNING:  Do not configure application-specific resources here!      -->\r
+  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->\r
+\r
+\r
+  <!-- ================== Built In Servlet Definitions ==================== -->\r
+\r
+\r
+  <!-- The default servlet for all web applications, that serves static     -->\r
+  <!-- resources.  It processes all requests that are not mapped to other   -->\r
+  <!-- servlets with servlet mappings (defined either here or in your own   -->\r
+  <!-- web.xml file.  This servlet supports the following initialization    -->\r
+  <!-- parameters (default values are in square brackets):                  -->\r
+  <!--                                                                      -->\r
+  <!--   debug               Debugging detail level for messages logged     -->\r
+  <!--                       by this servlet.  [0]                          -->\r
+  <!--                                                                      -->\r
+  <!--   fileEncoding        Encoding to be used to read static resources   -->\r
+  <!--                       [platform default]                             -->\r
+  <!--                                                                      -->\r
+  <!--   input               Input buffer size (in bytes) when reading      -->\r
+  <!--                       resources to be served.  [2048]                -->\r
+  <!--                                                                      -->\r
+  <!--   listings            Should directory listings be produced if there -->\r
+  <!--                       is no welcome file in this directory?  [false] -->\r
+  <!--                       WARNING: Listings for directories with many    -->\r
+  <!--                       entries can be slow and may consume            -->\r
+  <!--                       significant proportions of server resources.   -->\r
+  <!--                                                                      -->\r
+  <!--   output              Output buffer size (in bytes) when writing     -->\r
+  <!--                       resources to be served.  [2048]                -->\r
+  <!--                                                                      -->\r
+  <!--   readonly            Is this context "read only", so HTTP           -->\r
+  <!--                       commands like PUT and DELETE are               -->\r
+  <!--                       rejected?  [true]                              -->\r
+  <!--                                                                      -->\r
+  <!--   readmeFile          File name to display with the directory        -->\r
+  <!--                       contents. [null]                               -->\r
+  <!--                                                                      -->\r
+  <!--   sendfileSize        If the connector used supports sendfile, this  -->\r
+  <!--                       represents the minimal file size in KB for     -->\r
+  <!--                       which sendfile will be used. Use a negative    -->\r
+  <!--                       value to always disable sendfile.  [48]        -->\r
+  <!--                                                                      -->\r
+  <!--   useAcceptRanges     Should the Accept-Ranges header be included    -->\r
+  <!--                       in responses where appropriate? [true]         -->\r
+  <!--                                                                      -->\r
+  <!--  For directory listing customization. Checks localXsltFile, then     -->\r
+  <!--  globalXsltFile, then defaults to original behavior.                 -->\r
+  <!--                                                                      -->\r
+  <!--   localXsltFile       Make directory listings an XML doc and         -->\r
+  <!--                       pass the result to this style sheet residing   -->\r
+  <!--                       in that directory. This overrides              -->\r
+  <!--                       contextXsltFile and globalXsltFile[null]       -->\r
+  <!--                                                                      -->\r
+  <!--   contextXsltFile     Make directory listings an XML doc and         -->\r
+  <!--                       pass the result to this style sheet which is   -->\r
+  <!--                       relative to the context root. This overrides   -->\r
+  <!--                       globalXsltFile[null]                           -->\r
+  <!--                                                                      -->\r
+  <!--   globalXsltFile      Site wide configuration version of             -->\r
+  <!--                       localXsltFile This argument is expected        -->\r
+  <!--                       to be a physical file. [null]                  -->\r
+  <!--                                                                      -->\r
+  <!--                                                                      -->\r
+\r
+    <servlet>\r
+        <servlet-name>default</servlet-name>\r
+        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>\r
+        <init-param>\r
+            <param-name>debug</param-name>\r
+            <param-value>0</param-value>\r
+        </init-param>\r
+        <init-param>\r
+            <param-name>listings</param-name>\r
+            <param-value>false</param-value>\r
+        </init-param>\r
+        <load-on-startup>1</load-on-startup>\r
+    </servlet>\r
+\r
+\r
+  <!-- This servlet has been deprecated due to security concerns. Servlets  -->\r
+  <!-- should be explicitly mapped in web.xml                               -->\r
+  <!--                                                                      -->\r
+  <!-- The "invoker" servlet, which executes anonymous servlet classes      -->\r
+  <!-- that have not been defined in a web.xml file.  Traditionally, this   -->\r
+  <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map   -->\r
+  <!-- it to other patterns as well.  The extra path info portion of such a -->\r
+  <!-- request must be the fully qualified class name of a Java class that  -->\r
+  <!-- implements Servlet (or extends HttpServlet), or the servlet name     -->\r
+  <!-- of an existing servlet definition.     This servlet supports the     -->\r
+  <!-- following initialization parameters (default values are in square    -->\r
+  <!-- brackets):                                                           -->\r
+  <!--                                                                      -->\r
+  <!--   debug               Debugging detail level for messages logged     -->\r
+  <!--                       by this servlet.  [0]                          -->\r
+\r
+<!--\r
+    <servlet>\r
+        <servlet-name>invoker</servlet-name>\r
+        <servlet-class>\r
+          org.apache.catalina.servlets.InvokerServlet\r
+        </servlet-class>\r
+        <init-param>\r
+            <param-name>debug</param-name>\r
+            <param-value>0</param-value>\r
+        </init-param>\r
+        <load-on-startup>2</load-on-startup>\r
+    </servlet>\r
+-->\r
+\r
+\r
+  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->\r
+  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->\r
+  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->\r
+  <!-- following initialization parameters (default values are in square    -->\r
+  <!-- brackets):                                                           -->\r
+  <!--                                                                      -->\r
+  <!--   checkInterval       If development is false and checkInterval is   -->\r
+  <!--                       greater than zero, background compilations are -->\r
+  <!--                       enabled. checkInterval is the time in seconds  -->\r
+  <!--                       between checks to see if a JSP page (and its   -->\r
+  <!--                       dependent files) needs to  be recompiled. [0]  -->\r
+  <!--                                                                      -->\r
+  <!--   classdebuginfo      Should the class file be compiled with         -->\r
+  <!--                       debugging information?  [true]                 -->\r
+  <!--                                                                      -->\r
+  <!--   classpath           What class path should I use while compiling   -->\r
+  <!--                       generated servlets?  [Created dynamically      -->\r
+  <!--                       based on the current web application]          -->\r
+  <!--                                                                      -->\r
+  <!--   compiler            Which compiler Ant should use to compile JSP   -->\r
+  <!--                       pages.  See the jasper documentation for more  -->\r
+  <!--                       information.                                   -->\r
+  <!--                                                                      -->\r
+  <!--   compilerSourceVM    Compiler source VM. [1.5]                      -->\r
+  <!--                                                                      -->\r
+  <!--   compilerTargetVM    Compiler target VM. [1.5]                      -->  \r
+  <!--                                                                      -->\r
+  <!--   development         Is Jasper used in development mode? If true,   -->\r
+  <!--                       the frequency at which JSPs are checked for    -->\r
+  <!--                       modification may be specified via the          -->\r
+  <!--                       modificationTestInterval parameter. [true]     -->\r
+  <!--                                                                      -->\r
+  <!--   displaySourceFragment                                              -->\r
+  <!--                       Should a source fragment be included in        -->\r
+  <!--                       exception messages? [true]                     -->\r
+  <!--                                                                      -->\r
+  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->\r
+  <!--                       dumped to a file? [false]                      -->\r
+  <!--                       False if suppressSmap is true                  -->\r
+  <!--                                                                      -->\r
+  <!--   enablePooling       Determines whether tag handler pooling is      -->\r
+  <!--                       enabled. This is a compilation option. It will -->\r
+  <!--                       not alter the behaviour of JSPs that have      -->\r
+  <!--                       already been compiled. [true]                  -->\r
+  <!--                                                                      -->\r
+  <!--   engineOptionsClass  Allows specifying the Options class used to    -->\r
+  <!--                       configure Jasper. If not present, the default  -->\r
+  <!--                       EmbeddedServletOptions will be used.           -->\r
+  <!--                                                                      -->\r
+  <!--   errorOnUseBeanInvalidClassAttribute                                -->\r
+  <!--                       Should Jasper issue an error when the value of -->\r
+  <!--                       the class attribute in an useBean action is    -->\r
+  <!--                       not a valid bean class?  [true]                -->\r
+  <!--                                                                      -->\r
+  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->\r
+  <!--                       a separate JVM is used for JSP page compiles   -->\r
+  <!--                       from the one Tomcat is running in. [true]      -->\r
+  <!--                                                                      -->\r
+  <!--   genStrAsCharArray   Should text strings be generated as char       -->\r
+  <!--                       arrays, to improve performance in some cases?  -->\r
+  <!--                       [false]                                        -->\r
+  <!--                                                                      -->\r
+  <!--   ieClassId           The class-id value to be sent to Internet      -->\r
+  <!--                       Explorer when using <jsp:plugin> tags.         -->\r
+  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->\r
+  <!--                                                                      -->\r
+  <!--   javaEncoding        Java file encoding to use for generating java  -->\r
+  <!--                       source files. [UTF8]                           -->\r
+  <!--                                                                      -->\r
+  <!--   keepgenerated       Should we keep the generated Java source code  -->\r
+  <!--                       for each page instead of deleting it? [true]   -->\r
+  <!--                                                                      -->\r
+  <!--   mappedfile          Should we generate static content with one     -->\r
+  <!--                       print statement per input line, to ease        -->\r
+  <!--                       debugging?  [true]                             -->\r
+  <!--                                                                      -->\r
+  <!--   modificationTestInterval                                           -->\r
+  <!--                       Causes a JSP (and its dependent files) to not  -->\r
+  <!--                       be checked for modification during the         -->\r
+  <!--                       specified time interval (in seconds) from the  -->\r
+  <!--                       last time the JSP was checked for              -->\r
+  <!--                       modification. A value of 0 will cause the JSP  -->\r
+  <!--                       to be checked on every access.                 -->\r
+  <!--                       Used in development mode only. [4]             -->\r
+  <!--                                                                      -->\r
+  <!--   recompileOnFail     If a JSP compilation fails should the          -->\r
+  <!--                       modificationTestInterval be ignored and the    -->\r
+  <!--                       next access trigger a re-compilation attempt?  -->\r
+  <!--                       Used in development mode only and is disabled  -->\r
+  <!--                       by default as compilation may be expensive and -->\r
+  <!--                       could lead to excessive resource usage.        -->\r
+  <!--                       [false]                                        -->\r
+  <!--                                                                      -->\r
+  <!--   scratchdir          What scratch directory should we use when      -->\r
+  <!--                       compiling JSP pages?  [default work directory  -->\r
+  <!--                       for the current web application]               -->\r
+  <!--                                                                      -->\r
+  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->\r
+  <!--                       debugging be suppressed?  [false]              -->\r
+  <!--                                                                      -->\r
+  <!--   trimSpaces          Should white spaces in template text between   -->\r
+  <!--                       actions or directives be trimmed?  [false]     -->\r
+  <!--                                                                      -->\r
+  <!--   xpoweredBy          Determines whether X-Powered-By response       -->\r
+  <!--                       header is added by generated servlet  [false]  -->\r
+  <!--                                                                      -->\r
+  <!-- If you wish to use Jikes to compile JSP pages:                       -->\r
+  <!--   Please see the "Using Jikes" section of the Jasper-HowTo           -->\r
+  <!--   page in the Tomcat documentation.                                  -->\r
+\r
+    <servlet>\r
+        <servlet-name>jsp</servlet-name>\r
+        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>\r
+        <init-param>\r
+            <param-name>fork</param-name>\r
+            <param-value>false</param-value>\r
+        </init-param>\r
+        <init-param>\r
+            <param-name>xpoweredBy</param-name>\r
+            <param-value>false</param-value>\r
+        </init-param>\r
+        <load-on-startup>3</load-on-startup>\r
+    </servlet>\r
+\r
+\r
+  <!-- NOTE: An SSI Filter is also available as an alternative SSI          -->\r
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->\r
+  <!--                                                                      -->\r
+  <!-- Server Side Includes processing servlet, which processes SSI         -->\r
+  <!-- directives in HTML pages consistent with similar support in web      -->\r
+  <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->\r
+  <!-- URL pattern "*.shtml".  This servlet supports the following          -->\r
+  <!-- initialization parameters (default values are in square brackets):   -->\r
+  <!--                                                                      -->\r
+  <!--   buffered            Should output from this servlet be buffered?   -->\r
+  <!--                       (0=false, 1=true)  [0]                         -->\r
+  <!--                                                                      -->\r
+  <!--   debug               Debugging detail level for messages logged     -->\r
+  <!--                       by this servlet.  [0]                          -->\r
+  <!--                                                                      -->\r
+  <!--   expires             The number of seconds before a page with SSI   -->\r
+  <!--                       directives will expire.  [No default]          -->\r
+  <!--                                                                      -->\r
+  <!--   isVirtualWebappRelative                                            -->\r
+  <!--                       Should "virtual" paths be interpreted as       -->\r
+  <!--                       relative to the context root, instead of       -->\r
+  <!--                       the server root?  (0=false, 1=true) [0]        -->\r
+  <!--                                                                      -->\r
+  <!--   inputEncoding       The encoding to assume for SSI resources if    -->\r
+  <!--                       one is not available from the resource.        -->\r
+  <!--                       [Platform default]                             -->\r
+  <!--                                                                      -->\r
+  <!--   outputEncoding      The encoding to use for the page that results  -->\r
+  <!--                       from the SSI processing. [UTF-8]               -->\r
+  <!--                                                                      -->\r
+  <!--   allowExec           Is use of the exec command enabled? [false]    -->\r
+\r
+<!--\r
+    <servlet>\r
+        <servlet-name>ssi</servlet-name>\r
+        <servlet-class>\r
+          org.apache.catalina.ssi.SSIServlet\r
+        </servlet-class>\r
+        <init-param>\r
+          <param-name>buffered</param-name>\r
+          <param-value>1</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>debug</param-name>\r
+          <param-value>0</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>expires</param-name>\r
+          <param-value>666</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>isVirtualWebappRelative</param-name>\r
+          <param-value>0</param-value>\r
+        </init-param>\r
+        <load-on-startup>4</load-on-startup>\r
+    </servlet>\r
+-->\r
+\r
+\r
+  <!-- Common Gateway Includes (CGI) processing servlet, which supports     -->\r
+  <!-- execution of external applications that conform to the CGI spec      -->\r
+  <!-- requirements.  Typically, this servlet is mapped to the URL pattern  -->\r
+  <!-- "/cgi-bin/*", which means that any CGI applications that are         -->\r
+  <!-- executed must be present within the web application.  This servlet   -->\r
+  <!-- supports the following initialization parameters (default values     -->\r
+  <!-- are in square brackets):                                             -->\r
+  <!--                                                                      -->\r
+  <!--   cgiPathPrefix        The CGI search path will start at             -->\r
+  <!--                        webAppRootDir + File.separator + this prefix. -->\r
+  <!--                        [WEB-INF/cgi]                                 -->\r
+  <!--                                                                      -->\r
+  <!--   debug                Debugging detail level for messages logged    -->\r
+  <!--                        by this servlet.  [0]                         -->\r
+  <!--                                                                      -->\r
+  <!--   executable           Name of the executable used to run the        -->\r
+  <!--                        script. [perl]                                -->\r
+  <!--                                                                      -->\r
+  <!--   parameterEncoding    Name of parameter encoding to be used with    -->\r
+  <!--                        CGI servlet.                                  -->\r
+  <!--                        [System.getProperty("file.encoding","UTF-8")] -->\r
+  <!--                                                                      -->\r
+  <!--   passShellEnvironment Should the shell environment variables (if    -->\r
+  <!--                        any) be passed to the CGI script? [false]     -->\r
+  <!--                                                                      -->\r
+  <!--   stderrTimeout        The time (in milliseconds) to wait for the    -->\r
+  <!--                        reading of stderr to complete before          -->\r
+  <!--                        terminating the CGI process. [2000]           -->\r
+\r
+<!--\r
+    <servlet>\r
+        <servlet-name>cgi</servlet-name>\r
+        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>\r
+        <init-param>\r
+          <param-name>debug</param-name>\r
+          <param-value>0</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>cgiPathPrefix</param-name>\r
+          <param-value>WEB-INF/cgi</param-value>\r
+        </init-param>\r
+         <load-on-startup>5</load-on-startup>\r
+    </servlet>\r
+-->\r
+\r
+\r
+  <!-- ================ Built In Servlet Mappings ========================= -->\r
+\r
+\r
+  <!-- The servlet mappings for the built in servlets defined above.  Note  -->\r
+  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You    -->\r
+  <!-- must uncomment these mappings (or add them to your application's own -->\r
+  <!-- web.xml deployment descriptor) to enable these services              -->\r
+\r
+    <!-- The mapping for the default servlet -->\r
+    <servlet-mapping>\r
+        <servlet-name>default</servlet-name>\r
+        <url-pattern>/</url-pattern>\r
+    </servlet-mapping>\r
+\r
+    <!-- The mapping for the deprecated invoker servlet -->\r
+<!--\r
+    <servlet-mapping>\r
+        <servlet-name>invoker</servlet-name>\r
+        <url-pattern>/servlet/*</url-pattern>\r
+    </servlet-mapping>\r
+-->\r
+\r
+    <!-- The mapping for the JSP servlet -->\r
+    <servlet-mapping>\r
+        <servlet-name>jsp</servlet-name>\r
+        <url-pattern>*.jsp</url-pattern>\r
+    </servlet-mapping>\r
+\r
+    <servlet-mapping>\r
+        <servlet-name>jsp</servlet-name>\r
+        <url-pattern>*.jspx</url-pattern>\r
+    </servlet-mapping>\r
+\r
+    <!-- The mapping for the SSI servlet -->\r
+<!--\r
+    <servlet-mapping>\r
+        <servlet-name>ssi</servlet-name>\r
+        <url-pattern>*.shtml</url-pattern>\r
+    </servlet-mapping>\r
+-->\r
+\r
+    <!-- The mapping for the CGI Gateway servlet -->\r
+\r
+<!--\r
+    <servlet-mapping>\r
+        <servlet-name>cgi</servlet-name>\r
+        <url-pattern>/cgi-bin/*</url-pattern>\r
+    </servlet-mapping>\r
+-->\r
+\r
+\r
+  <!-- ================== Built In Filter Definitions ===================== -->\r
+\r
+  <!-- NOTE: An SSI Servlet is also available as an alternative SSI         -->\r
+  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->\r
+  <!--                                                                      -->\r
+  <!-- Server Side Includes processing filter, which processes SSI          -->\r
+  <!-- directives in HTML pages consistent with similar support in web      -->\r
+  <!-- servers like Apache.  Traditionally, this filter is mapped to the    -->\r
+  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will     -->\r
+  <!-- selectively enable/disable SSI processing based on mime types. For   -->\r
+  <!-- this to work you will need to uncomment the .shtml mime type         -->\r
+  <!-- definition towards the bottom of this file.                          -->\r
+  <!-- The contentType init param allows you to apply SSI processing to JSP -->\r
+  <!-- pages, javascript, or any other content you wish.  This filter       -->\r
+  <!-- supports the following initialization parameters (default values are -->\r
+  <!-- in square brackets):                                                 -->\r
+  <!--                                                                      -->\r
+  <!--   contentType         A regex pattern that must be matched before    -->\r
+  <!--                       SSI processing is applied.                     -->\r
+  <!--                       [text/x-server-parsed-html(;.*)?]              -->\r
+  <!--                                                                      -->\r
+  <!--   debug               Debugging detail level for messages logged     -->\r
+  <!--                       by this servlet.  [0]                          -->\r
+  <!--                                                                      -->\r
+  <!--   expires             The number of seconds before a page with SSI   -->\r
+  <!--                       directives will expire.  [No default]          -->\r
+  <!--                                                                      -->\r
+  <!--   isVirtualWebappRelative                                            -->\r
+  <!--                       Should "virtual" paths be interpreted as       -->\r
+  <!--                       relative to the context root, instead of       -->\r
+  <!--                       the server root?  (0=false, 1=true) [0]        -->\r
+  <!--                                                                      -->\r
+  <!--   allowExec           Is use of the exec command enabled? [false]    -->\r
+\r
+<!--\r
+    <filter>\r
+        <filter-name>ssi</filter-name>\r
+        <filter-class>\r
+          org.apache.catalina.ssi.SSIFilter\r
+        </filter-class>\r
+        <init-param>\r
+          <param-name>contentType</param-name>\r
+          <param-value>text/x-server-parsed-html(;.*)?</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>debug</param-name>\r
+          <param-value>0</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>expires</param-name>\r
+          <param-value>666</param-value>\r
+        </init-param>\r
+        <init-param>\r
+          <param-name>isVirtualWebappRelative</param-name>\r
+          <param-value>0</param-value>\r
+        </init-param>\r
+    </filter>\r
+-->\r
+\r
+\r
+  <!-- ==================== Built In Filter Mappings ====================== -->\r
+\r
+  <!-- The mapping for the SSI Filter -->\r
+<!--\r
+    <filter-mapping>\r
+        <filter-name>ssi</filter-name>\r
+        <url-pattern>*.shtml</url-pattern>\r
+    </filter-mapping>\r
+-->\r
+\r
+\r
+  <!-- ==================== Default Session Configuration ================= -->\r
+  <!-- You can set the default session timeout (in minutes) for all newly   -->\r
+  <!-- created sessions by modifying the value below.                       -->\r
+\r
+    <session-config>\r
+        <session-timeout>30</session-timeout>\r
+    </session-config>\r
+\r
+\r
+  <!-- ===================== Default MIME Type Mappings =================== -->\r
+  <!-- When serving static resources, Tomcat will automatically generate    -->\r
+  <!-- a "Content-Type" header based on the resource's filename extension,  -->\r
+  <!-- based on these mappings.  Additional mappings can be added here (to  -->\r
+  <!-- apply to all web applications), or in your own application's web.xml -->\r
+  <!-- deployment descriptor.                                               -->\r
+\r
+    <mime-mapping>\r
+        <extension>abs</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ai</extension>\r
+        <mime-type>application/postscript</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>aif</extension>\r
+        <mime-type>audio/x-aiff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>aifc</extension>\r
+        <mime-type>audio/x-aiff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>aiff</extension>\r
+        <mime-type>audio/x-aiff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>aim</extension>\r
+        <mime-type>application/x-aim</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>art</extension>\r
+        <mime-type>image/x-jg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>asf</extension>\r
+        <mime-type>video/x-ms-asf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>asx</extension>\r
+        <mime-type>video/x-ms-asf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>au</extension>\r
+        <mime-type>audio/basic</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>avi</extension>\r
+        <mime-type>video/x-msvideo</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>avx</extension>\r
+        <mime-type>video/x-rad-screenplay</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>bcpio</extension>\r
+        <mime-type>application/x-bcpio</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>bin</extension>\r
+        <mime-type>application/octet-stream</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>bmp</extension>\r
+        <mime-type>image/bmp</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>body</extension>\r
+        <mime-type>text/html</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>cdf</extension>\r
+        <mime-type>application/x-cdf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>cer</extension>\r
+        <mime-type>application/x-x509-ca-cert</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>class</extension>\r
+        <mime-type>application/java</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>cpio</extension>\r
+        <mime-type>application/x-cpio</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>csh</extension>\r
+        <mime-type>application/x-csh</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>css</extension>\r
+        <mime-type>text/css</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>dib</extension>\r
+        <mime-type>image/bmp</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>doc</extension>\r
+        <mime-type>application/msword</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>dtd</extension>\r
+        <mime-type>application/xml-dtd</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>dv</extension>\r
+        <mime-type>video/x-dv</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>dvi</extension>\r
+        <mime-type>application/x-dvi</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>eps</extension>\r
+        <mime-type>application/postscript</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>etx</extension>\r
+        <mime-type>text/x-setext</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>exe</extension>\r
+        <mime-type>application/octet-stream</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>gif</extension>\r
+        <mime-type>image/gif</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>gtar</extension>\r
+        <mime-type>application/x-gtar</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>gz</extension>\r
+        <mime-type>application/x-gzip</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>hdf</extension>\r
+        <mime-type>application/x-hdf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>hqx</extension>\r
+        <mime-type>application/mac-binhex40</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>htc</extension>\r
+        <mime-type>text/x-component</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>htm</extension>\r
+        <mime-type>text/html</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>html</extension>\r
+        <mime-type>text/html</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>hqx</extension>\r
+        <mime-type>application/mac-binhex40</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ief</extension>\r
+        <mime-type>image/ief</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jad</extension>\r
+        <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jar</extension>\r
+        <mime-type>application/java-archive</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>java</extension>\r
+        <mime-type>text/plain</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jnlp</extension>\r
+        <mime-type>application/x-java-jnlp-file</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jpe</extension>\r
+        <mime-type>image/jpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jpeg</extension>\r
+        <mime-type>image/jpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jpg</extension>\r
+        <mime-type>image/jpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>js</extension>\r
+        <mime-type>text/javascript</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jsf</extension>\r
+        <mime-type>text/plain</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>jspf</extension>\r
+        <mime-type>text/plain</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>kar</extension>\r
+        <mime-type>audio/x-midi</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>latex</extension>\r
+        <mime-type>application/x-latex</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>m3u</extension>\r
+        <mime-type>audio/x-mpegurl</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mac</extension>\r
+        <mime-type>image/x-macpaint</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>man</extension>\r
+        <mime-type>application/x-troff-man</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mathml</extension>\r
+        <mime-type>application/mathml+xml</mime-type> \r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>me</extension>\r
+        <mime-type>application/x-troff-me</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mid</extension>\r
+        <mime-type>audio/x-midi</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>midi</extension>\r
+        <mime-type>audio/x-midi</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mif</extension>\r
+        <mime-type>application/x-mif</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mov</extension>\r
+        <mime-type>video/quicktime</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>movie</extension>\r
+        <mime-type>video/x-sgi-movie</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mp1</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mp2</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mp3</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mp4</extension>\r
+        <mime-type>video/mp4</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpa</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpe</extension>\r
+        <mime-type>video/mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpeg</extension>\r
+        <mime-type>video/mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpega</extension>\r
+        <mime-type>audio/x-mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpg</extension>\r
+        <mime-type>video/mpeg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>mpv2</extension>\r
+        <mime-type>video/mpeg2</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ms</extension>\r
+        <mime-type>application/x-wais-source</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>nc</extension>\r
+        <mime-type>application/x-netcdf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>oda</extension>\r
+        <mime-type>application/oda</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Database -->\r
+        <extension>odb</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.database</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Chart -->\r
+        <extension>odc</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.chart</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Formula -->\r
+        <extension>odf</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.formula</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Drawing -->\r
+        <extension>odg</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Image -->\r
+        <extension>odi</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.image</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Master Document -->\r
+        <extension>odm</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.text-master</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Presentation -->\r
+        <extension>odp</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.presentation</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Spreadsheet -->\r
+        <extension>ods</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Text -->\r
+        <extension>odt</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.text</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ogg</extension>\r
+        <mime-type>application/ogg</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Drawing Template -->\r
+        <extension>otg </extension>\r
+        <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- HTML Document Template -->\r
+        <extension>oth</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Presentation Template -->\r
+        <extension>otp</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Spreadsheet Template -->\r
+        <extension>ots</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.spreadsheet-template </mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- OpenDocument Text Template -->\r
+        <extension>ott</extension>\r
+        <mime-type>application/vnd.oasis.opendocument.text-template</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pbm</extension>\r
+        <mime-type>image/x-portable-bitmap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pct</extension>\r
+        <mime-type>image/pict</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pdf</extension>\r
+        <mime-type>application/pdf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pgm</extension>\r
+        <mime-type>image/x-portable-graymap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pic</extension>\r
+        <mime-type>image/pict</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pict</extension>\r
+        <mime-type>image/pict</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pls</extension>\r
+        <mime-type>audio/x-scpls</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>png</extension>\r
+        <mime-type>image/png</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pnm</extension>\r
+        <mime-type>image/x-portable-anymap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pnt</extension>\r
+        <mime-type>image/x-macpaint</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ppm</extension>\r
+        <mime-type>image/x-portable-pixmap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ppt</extension>\r
+        <mime-type>application/vnd.ms-powerpoint</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>pps</extension>\r
+        <mime-type>application/vnd.ms-powerpoint</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ps</extension>\r
+        <mime-type>application/postscript</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>psd</extension>\r
+        <mime-type>image/x-photoshop</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>qt</extension>\r
+        <mime-type>video/quicktime</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>qti</extension>\r
+        <mime-type>image/x-quicktime</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>qtif</extension>\r
+        <mime-type>image/x-quicktime</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ras</extension>\r
+        <mime-type>image/x-cmu-raster</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>rdf</extension>\r
+        <mime-type>application/rdf+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>rgb</extension>\r
+        <mime-type>image/x-rgb</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>rm</extension>\r
+        <mime-type>application/vnd.rn-realmedia</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>roff</extension>\r
+        <mime-type>application/x-troff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>rtf</extension>\r
+        <mime-type>application/rtf</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>rtx</extension>\r
+        <mime-type>text/richtext</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>sh</extension>\r
+        <mime-type>application/x-sh</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>shar</extension>\r
+        <mime-type>application/x-shar</mime-type>\r
+    </mime-mapping>\r
+<!--\r
+    <mime-mapping>\r
+        <extension>shtml</extension>\r
+        <mime-type>text/x-server-parsed-html</mime-type>\r
+    </mime-mapping>\r
+-->\r
+    <mime-mapping>\r
+        <extension>smf</extension>\r
+        <mime-type>audio/x-midi</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>sit</extension>\r
+        <mime-type>application/x-stuffit</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>snd</extension>\r
+        <mime-type>audio/basic</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>src</extension>\r
+        <mime-type>application/x-wais-source</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>sv4cpio</extension>\r
+        <mime-type>application/x-sv4cpio</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>sv4crc</extension>\r
+        <mime-type>application/x-sv4crc</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>svg</extension>\r
+        <mime-type>image/svg+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>svgz</extension>\r
+        <mime-type>image/svg+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>swf</extension>\r
+        <mime-type>application/x-shockwave-flash</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>t</extension>\r
+        <mime-type>application/x-troff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tar</extension>\r
+        <mime-type>application/x-tar</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tcl</extension>\r
+        <mime-type>application/x-tcl</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tex</extension>\r
+        <mime-type>application/x-tex</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>texi</extension>\r
+        <mime-type>application/x-texinfo</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>texinfo</extension>\r
+        <mime-type>application/x-texinfo</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tif</extension>\r
+        <mime-type>image/tiff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tiff</extension>\r
+        <mime-type>image/tiff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tr</extension>\r
+        <mime-type>application/x-troff</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>tsv</extension>\r
+        <mime-type>text/tab-separated-values</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>txt</extension>\r
+        <mime-type>text/plain</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ulw</extension>\r
+        <mime-type>audio/basic</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>ustar</extension>\r
+        <mime-type>application/x-ustar</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>vxml</extension>\r
+        <mime-type>application/voicexml+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xbm</extension>\r
+        <mime-type>image/x-xbitmap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xht</extension>\r
+        <mime-type>application/xhtml+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xhtml</extension>\r
+        <mime-type>application/xhtml+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xls</extension>\r
+        <mime-type>application/vnd.ms-excel</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xml</extension>\r
+        <mime-type>application/xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xpm</extension>\r
+        <mime-type>image/x-xpixmap</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xsl</extension>\r
+        <mime-type>application/xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xslt</extension>\r
+        <mime-type>application/xslt+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xul</extension>\r
+        <mime-type>application/vnd.mozilla.xul+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>xwd</extension>\r
+        <mime-type>image/x-xwindowdump</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>vsd</extension>\r
+        <mime-type>application/x-visio</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>wav</extension>\r
+        <mime-type>audio/x-wav</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- Wireless Bitmap -->\r
+        <extension>wbmp</extension>\r
+        <mime-type>image/vnd.wap.wbmp</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- WML Source -->\r
+        <extension>wml</extension>\r
+        <mime-type>text/vnd.wap.wml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- Compiled WML -->\r
+        <extension>wmlc</extension>\r
+        <mime-type>application/vnd.wap.wmlc</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- WML Script Source -->\r
+        <extension>wmls</extension>\r
+        <mime-type>text/vnd.wap.wmlscript</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <!-- Compiled WML Script -->\r
+        <extension>wmlscriptc</extension>\r
+        <mime-type>application/vnd.wap.wmlscriptc</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>wmv</extension>\r
+        <mime-type>video/x-ms-wmv</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>wrl</extension>\r
+        <mime-type>x-world/x-vrml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>wspolicy</extension>\r
+        <mime-type>application/wspolicy+xml</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>Z</extension>\r
+        <mime-type>application/x-compress</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>z</extension>\r
+        <mime-type>application/x-compress</mime-type>\r
+    </mime-mapping>\r
+    <mime-mapping>\r
+        <extension>zip</extension>\r
+        <mime-type>application/zip</mime-type>\r
+    </mime-mapping>\r
+\r
+  <!-- ==================== Default Welcome File List ===================== -->\r
+  <!-- When a request URI refers to a directory, the default servlet looks  -->\r
+  <!-- for a "welcome file" within that directory and, if present,          -->\r
+  <!-- to the corresponding resource URI for display.  If no welcome file   -->\r
+  <!-- is present, the default servlet either serves a directory listing,   -->\r
+  <!-- or returns a 404 status, depending on how it is configured.          -->\r
+  <!--                                                                      -->\r
+  <!-- If you define welcome files in your own application's web.xml        -->\r
+  <!-- deployment descriptor, that list *replaces* the list configured      -->\r
+  <!-- here, so be sure that you include any of the default values that     -->\r
+  <!-- you wish to include.                                                 -->\r
+\r
+    <welcome-file-list>\r
+        <welcome-file>index.html</welcome-file>\r
+        <welcome-file>index.htm</welcome-file>\r
+        <welcome-file>index.jsp</welcome-file>\r
+    </welcome-file-list>\r
+\r
+</web-app>\r
index be951deec6db4d4d646b373b302ce88aa3f1a7dd..321d3ae84d87f280804301f4deb8a039d8c82612 100644 (file)
   <packaging>pom</packaging>
   <name>Archiva Web :: Application Tests</name>
 
-  <properties>
-    <container.test.port>9696</container.test.port>
-    <tomcat5x.version>5.5.34</tomcat5x.version>
-    <tomcat6x.version>6.0.33</tomcat6x.version>
-    <cargo.wait>false</cargo.wait>
-    <cargo.timeout>600000</cargo.timeout>
-    <cargo.install.dir>${project.build.directory}/cargo/installs</cargo.install.dir>
-    <maxWaitTimeInMs>10000</maxWaitTimeInMs>
-    <!-- TODO: review how appropriate the memory settings are - should work with less -->
-    <cargo.jvm.args>-Xmx512m -XX:MaxPermSize=256m</cargo.jvm.args>
-    <seleniumPluginVersion>2.1</seleniumPluginVersion>
-    <selenium-server.version>2.12.0</selenium-server.version>
-    <apache.mirror.url>http://archive.apache.org/dist</apache.mirror.url>
-    <apache.archive.url>http://archive.apache.org/dist</apache.archive.url>
-  </properties>
-
   <dependencies>
     <dependency>
       <groupId>org.testng</groupId>
       <artifactId>testng</artifactId>
-      <version>6.2.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>1.4</version>
     </dependency>
 
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-command-line</artifactId>
-      <version>1.0-alpha-2</version>
       <exclusions>
         <exclusion>
           <artifactId>plexus-container-default</artifactId>
@@ -95,7 +76,6 @@
     <dependency>
       <groupId>org.seleniumhq.selenium.client-drivers</groupId>
       <artifactId>selenium-java-client-driver</artifactId>
-      <version>1.0.2</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>
           <plugin>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-maven2-plugin</artifactId>
-            <version>1.1.1</version>
             <executions>
               <execution>
                 <id>start-container</id>
                 <systemProperties>
                   <appserver.base>${project.build.directory}/appserver-base</appserver.base>
                   <appserver.home>${project.build.directory}/appserver-base</appserver.home>
+                  <derby.system.home>${project.build.directory}</derby.system.home>
                 </systemProperties>
               </container>
               <configuration>
index 143b956d44fbdb7c4284157601918fc00360aa72..33e2a15e9c9eaeac23578544eec9cffd88b0247c 100644 (file)
   <name>Archiva Web</name>
   <packaging>pom</packaging>
 
+  <properties>
+    <container.test.port>9696</container.test.port>
+    <tomcat5x.version>5.5.34</tomcat5x.version>
+    <tomcat6x.version>6.0.35</tomcat6x.version>
+    <cargo.wait>false</cargo.wait>
+    <cargo.timeout>600000</cargo.timeout>
+    <cargo.install.dir>${project.build.directory}/cargo/installs</cargo.install.dir>
+    <maxWaitTimeInMs>10000</maxWaitTimeInMs>
+    <!-- TODO: review how appropriate the memory settings are - should work with less -->
+    <cargo.jvm.args>-Xmx512m -XX:MaxPermSize=256m</cargo.jvm.args>
+    <seleniumPluginVersion>2.2-SNAPSHOT</seleniumPluginVersion>
+    <selenium-server.version>2.15.0</selenium-server.version>
+    <apache.mirror.url>http://archive.apache.org/dist</apache.mirror.url>
+    <apache.archive.url>http://archive.apache.org/dist</apache.archive.url>
+  </properties>
+
   <modules>
     <module>archiva-applet</module>
     <module>archiva-security</module>
     <module>archiva-webapp</module>
   </modules>
 
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.testng</groupId>
+        <artifactId>testng</artifactId>
+        <version>6.2.1</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-command-line</artifactId>
+        <version>1.0-alpha-2</version>
+        <exclusions>
+          <exclusion>
+            <artifactId>plexus-container-default</artifactId>
+            <groupId>org.codehaus.plexus</groupId>
+          </exclusion>
+          <exclusion>
+            <artifactId>plexus-component-api</artifactId>
+            <groupId>org.codehaus.plexus</groupId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+        <artifactId>selenium-java-client-driver</artifactId>
+        <version>1.0.2</version>
+        <scope>test</scope>
+        <exclusions>
+          <exclusion>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
   <build>
     <pluginManagement>
       <plugins>
         <module>archiva-webapp-js</module>
       </modules>
     </profile>
+    <profile>
+      <id>it-js</id>
+      <modules>
+        <module>archiva-webapp-js</module>
+        <module>archiva-webapp-test-js</module>
+      </modules>
+    </profile>
   </profiles>
-</project>
\ No newline at end of file
+</project>
diff --git a/pom.xml b/pom.xml
index 8d4f7b6c2e00985a048eb224dfe4a9854f2168f4..c0179c4278fd1ee61296c58e4f16f3d9f4e4880c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <version>${project.version}</version>
         <type>war</type>
       </dependency>
+      <dependency>
+        <groupId>org.apache.archiva</groupId>
+        <artifactId>archiva-webapp-js</artifactId>
+        <version>${project.version}</version>
+        <type>war</type>
+      </dependency>
       <dependency>
         <groupId>org.apache.archiva</groupId>
         <artifactId>archiva-xml-tools</artifactId>
             </dependency>
           </dependencies>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.cargo</groupId>
+          <artifactId>cargo-maven2-plugin</artifactId>
+          <version>1.1.4</version>
+        </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-antrun-plugin</artifactId>