]> source.dussan.org Git - archiva.git/commitdiff
Tests now pass. Ill checkover everything then merge it back into head...
authorJames William Dumay <jdumay@apache.org>
Wed, 28 May 2008 07:51:28 +0000 (07:51 +0000)
committerJames William Dumay <jdumay@apache.org>
Wed, 28 May 2008 07:51:28 +0000 (07:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches@660847 13f79535-47bb-0310-9956-ffa450edef68

moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/pom.xml
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/AbstractRepositoryServletTestCase.java
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/META-INF/plexus/components.xml [new file with mode: 0644]
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/web.xml [new file with mode: 0644]
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/artifact.jar [new file with mode: 0644]
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml
moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-archiva.xml [new file with mode: 0644]

index 3483c85baf56e3334493503a9054e3320a1a0cdb..425b2fce638472e75e1c2c93a916dec1dc801864 100644 (file)
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-slf4j-logging</artifactId>
+      <scope>runtime</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.4.3</version>
+    </dependency>
     <dependency>
       <groupId>xmlunit</groupId>
       <artifactId>xmlunit</artifactId>
index 6900bc13dbf91bf59afd9c321d31c6c2311f1312..9910d4363c713a4ed06a2c0044f5c6cf9833abfe 100644 (file)
@@ -168,7 +168,7 @@ public abstract class AbstractRepositoryServletTestCase
 
         HttpUnitOptions.setExceptionsThrownOnErrorStatus( false );                
 
-        sr = new ServletRunner( getTestFile( "src/test/webapp/WEB-INF/web.xml" ) );
+        sr = new ServletRunner( getTestFile( "src/test/resources/WEB-INF/web.xml" ) );
         sr.registerServlet( "/repository/*", UnauthenticatedRepositoryServlet.class.getName() );
         sc = sr.newClient();
     }
diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/META-INF/plexus/components.xml b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/META-INF/plexus/components.xml
new file mode 100644 (file)
index 0000000..921c1cc
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<component-set>
+  <components>
+    <!-- Components that are common for all test cases -->
+    <component>
+      <role>org.apache.maven.archiva.webdav.util.MimeTypes</role>
+      <implementation>org.apache.maven.archiva.webdav.util.MimeTypes</implementation>
+      <description>MimeTypes</description>
+      <configuration>
+        <resource>archiva-mime-types.txt</resource>
+      </configuration>
+    </component>
+  </components>
+</component-set>
\ No newline at end of file
diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/web.xml b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..cfe7c5f
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+  <display-name>Apache Archiva</display-name>
+
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+
+  <context-param>
+    <param-name>contextClass</param-name>
+    <param-value>org.codehaus.plexus.spring.PlexusWebApplicationContext</param-value>
+  </context-param>
+
+   <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+        classpath*:/META-INF/plexus/components.xml
+        classpath*:/META-INF/spring-context.xml
+        target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletTest.xml
+    </param-value>
+  </context-param>
+
+</web-app>
diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/artifact.jar b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/artifact.jar
new file mode 100644 (file)
index 0000000..e6f67ee
--- /dev/null
@@ -0,0 +1 @@
+artifact.jar
index 43e6ed727a7b1a70e203ffd514c04cb8f4cf9ee9..da3b1d143066d599528497701b0583d7a7a5c176 100644 (file)
     <component>
       <role>org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers</role>
       <role-hint>default</role-hint>
-      <implementation>org.apache.maven.archiva.web.repository.StubRepositoryContentConsumers</implementation>
+      <implementation>org.apache.maven.archiva.webdav.StubRepositoryContentConsumers</implementation>
     </component>
     
     <component>
       <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
       <role-hint>default</role-hint>
-      <implementation>org.apache.maven.archiva.web.repository.BypassSecuritySystem</implementation>
+      <implementation>org.apache.maven.archiva.webdav.BypassSecuritySystem</implementation>
     </component>
        
        <component>
       <role>org.apache.maven.archiva.webdav.ArchivaDavResourceFactory</role>
-      <implementation>org.apache.maven.archiva.web.repository.UnauthenticatedDavResourceFactory</implementation>
+      <implementation>org.apache.maven.archiva.webdav.UnauthenticatedDavResourceFactory</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.archiva.configuration.ArchivaConfiguration</role>
diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-archiva.xml b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-archiva.xml
new file mode 100644 (file)
index 0000000..997d62b
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<configuration>
+
+  <version>2</version>
+  
+  <repositoryScanning>
+    <fileTypes>
+      <fileType>
+        <id>artifacts</id>
+        <patterns>
+          <pattern>**/*.pom</pattern>
+          <pattern>**/*.jar</pattern>
+          <pattern>**/*.ear</pattern>
+          <pattern>**/*.war</pattern>
+          <pattern>**/*.car</pattern>
+          <pattern>**/*.sar</pattern>
+          <pattern>**/*.mar</pattern>
+          <pattern>**/*.rar</pattern>
+          <pattern>**/*.dtd</pattern>
+          <pattern>**/*.tld</pattern>
+          <pattern>**/*.tar.gz</pattern>
+          <pattern>**/*.tar.bz2</pattern>
+          <pattern>**/*.zip</pattern>
+        </patterns>
+      </fileType>
+      <fileType>
+        <id>indexable-content</id>
+        <patterns>
+          <pattern>**/*.txt</pattern>
+          <pattern>**/*.TXT</pattern>
+          <pattern>**/*.block</pattern>
+          <pattern>**/*.config</pattern>
+          <pattern>**/*.pom</pattern>
+          <pattern>**/*.xml</pattern>
+          <pattern>**/*.xsd</pattern>
+          <pattern>**/*.dtd</pattern>
+          <pattern>**/*.tld</pattern>
+        </patterns>
+      </fileType>
+      <fileType>
+        <id>auto-remove</id>
+        <patterns>
+          <pattern>**/*.bak</pattern>
+          <pattern>**/*~</pattern>
+          <pattern>**/*-</pattern>
+        </patterns>
+      </fileType>
+      <fileType>
+        <id>ignored</id>
+        <patterns>
+          <pattern>**/.htaccess</pattern>
+          <pattern>**/KEYS</pattern>
+          <pattern>**/*.rb</pattern>
+          <pattern>**/*.sh</pattern>
+          <pattern>**/.svn/**</pattern>
+          <pattern>**/.DAV/**</pattern>
+        </patterns>
+      </fileType>
+    </fileTypes>
+    <knownContentConsumers>
+      <knownContentConsumer>update-db-artifact</knownContentConsumer>
+      <knownContentConsumer>create-missing-checksums</knownContentConsumer>
+      <knownContentConsumer>update-db-repository-metadata</knownContentConsumer>
+      <knownContentConsumer>validate-checksum</knownContentConsumer>
+      <knownContentConsumer>validate-signature</knownContentConsumer>
+      <knownContentConsumer>index-content</knownContentConsumer>
+      <knownContentConsumer>auto-remove</knownContentConsumer>
+      <knownContentConsumer>auto-rename</knownContentConsumer>
+    </knownContentConsumers>
+    <invalidContentConsumers>
+      <invalidContentConsumer>update-db-bad-content</invalidContentConsumer>
+    </invalidContentConsumers>
+  </repositoryScanning>
+
+  <databaseScanning>
+    <cronExpression>0 0 * * * ?</cronExpression>
+    <unprocessedConsumers>
+      <unprocessedConsumer>index-artifact</unprocessedConsumer>
+      <unprocessedConsumer>update-db-project</unprocessedConsumer>
+      <unprocessedConsumer>validate-repository-metadata</unprocessedConsumer>
+      <unprocessedConsumer>index-archive-toc</unprocessedConsumer>
+      <unprocessedConsumer>update-db-bytecode-stats</unprocessedConsumer>
+      <unprocessedConsumer>index-public-methods</unprocessedConsumer>
+    </unprocessedConsumers>
+    <cleanupConsumers>
+      <cleanupConsumer>not-present-remove-db-artifact</cleanupConsumer>
+      <cleanupConsumer>not-present-remove-db-project</cleanupConsumer>
+      <cleanupConsumer>not-present-remove-indexed</cleanupConsumer>
+    </cleanupConsumers>
+  </databaseScanning>
+
+</configuration>