From fd1e5e3cdb899ccd80ff9ab79a358ffc93591c47 Mon Sep 17 00:00:00 2001 From: James William Dumay Date: Wed, 28 May 2008 07:51:28 +0000 Subject: [PATCH] Tests now pass. Ill checkover everything then merge it back into head... git-svn-id: https://svn.apache.org/repos/asf/archiva/branches@660847 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-web/archiva-webdav/pom.xml | 16 +++ .../AbstractRepositoryServletTestCase.java | 2 +- .../resources/META-INF/plexus/components.xml | 33 ++++++ .../src/test/resources/WEB-INF/web.xml | 45 +++++++ .../src/test/resources/artifact.jar | 1 + .../archiva/webdav/RepositoryServletTest.xml | 6 +- .../src/test/resources/repository-archiva.xml | 111 ++++++++++++++++++ 7 files changed, 210 insertions(+), 4 deletions(-) create mode 100644 moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/META-INF/plexus/components.xml create mode 100644 moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/web.xml create mode 100644 moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/artifact.jar create mode 100644 moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-archiva.xml diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/pom.xml b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/pom.xml index 3483c85ba..425b2fce6 100644 --- a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -111,6 +111,22 @@ + + org.codehaus.plexus + plexus-slf4j-logging + runtime + + + org.codehaus.plexus + plexus-container-default + + + + + org.slf4j + slf4j-log4j12 + 1.4.3 + xmlunit xmlunit diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/AbstractRepositoryServletTestCase.java b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/AbstractRepositoryServletTestCase.java index 6900bc13d..9910d4363 100644 --- a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/AbstractRepositoryServletTestCase.java +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/AbstractRepositoryServletTestCase.java @@ -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 index 000000000..921c1cca1 --- /dev/null +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/META-INF/plexus/components.xml @@ -0,0 +1,33 @@ + + + + + + + + org.apache.maven.archiva.webdav.util.MimeTypes + org.apache.maven.archiva.webdav.util.MimeTypes + MimeTypes + + archiva-mime-types.txt + + + + \ 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 index 000000000..cfe7c5fbe --- /dev/null +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/WEB-INF/web.xml @@ -0,0 +1,45 @@ + + + + + + Apache Archiva + + + org.springframework.web.context.ContextLoaderListener + + + + contextClass + org.codehaus.plexus.spring.PlexusWebApplicationContext + + + + contextConfigLocation + + classpath*:/META-INF/plexus/components.xml + classpath*:/META-INF/spring-context.xml + target/test-classes/org/apache/maven/archiva/webdav/RepositoryServletTest.xml + + + + 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 index 000000000..e6f67ee94 --- /dev/null +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/artifact.jar @@ -0,0 +1 @@ +artifact.jar diff --git a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml index 43e6ed727..da3b1d143 100644 --- a/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml @@ -102,18 +102,18 @@ org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers default - org.apache.maven.archiva.web.repository.StubRepositoryContentConsumers + org.apache.maven.archiva.webdav.StubRepositoryContentConsumers org.codehaus.plexus.redback.system.SecuritySystem default - org.apache.maven.archiva.web.repository.BypassSecuritySystem + org.apache.maven.archiva.webdav.BypassSecuritySystem org.apache.maven.archiva.webdav.ArchivaDavResourceFactory - org.apache.maven.archiva.web.repository.UnauthenticatedDavResourceFactory + org.apache.maven.archiva.webdav.UnauthenticatedDavResourceFactory org.apache.maven.archiva.configuration.ArchivaConfiguration 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 index 000000000..997d62b00 --- /dev/null +++ b/moved-repo-servlet/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-archiva.xml @@ -0,0 +1,111 @@ + + + + + + 2 + + + + + artifacts + + **/*.pom + **/*.jar + **/*.ear + **/*.war + **/*.car + **/*.sar + **/*.mar + **/*.rar + **/*.dtd + **/*.tld + **/*.tar.gz + **/*.tar.bz2 + **/*.zip + + + + indexable-content + + **/*.txt + **/*.TXT + **/*.block + **/*.config + **/*.pom + **/*.xml + **/*.xsd + **/*.dtd + **/*.tld + + + + auto-remove + + **/*.bak + **/*~ + **/*- + + + + ignored + + **/.htaccess + **/KEYS + **/*.rb + **/*.sh + **/.svn/** + **/.DAV/** + + + + + update-db-artifact + create-missing-checksums + update-db-repository-metadata + validate-checksum + validate-signature + index-content + auto-remove + auto-rename + + + update-db-bad-content + + + + + 0 0 * * * ? + + index-artifact + update-db-project + validate-repository-metadata + index-archive-toc + update-db-bytecode-stats + index-public-methods + + + not-present-remove-db-artifact + not-present-remove-db-project + not-present-remove-indexed + + + + -- 2.39.5