You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2008/03/13 19:28:50 UTC

svn commit: r636822 [9/9] - in /maven/archiva/branches/springy: ./ archiva-base/archiva-common/ archiva-base/archiva-consumers/archiva-database-consumers/src/test/java/org/apache/maven/archiva/consumers/database/ archiva-base/archiva-consumers/archiva-...

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/util/WrappedRepositoryRequestTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/util/WrappedRepositoryRequestTest.java?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/util/WrappedRepositoryRequestTest.java (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/util/WrappedRepositoryRequestTest.java Thu Mar 13 11:28:26 2008
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+package org.apache.maven.archiva.webdav.util;
+
+import org.apache.maven.archiva.webdav.TestableHttpServletRequest;
+import org.codehaus.plexus.PlexusTestCase;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.MalformedURLException;
+
+/**
+ * WrappedRepositoryRequestTest 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id: WrappedRepositoryRequestTest.java 6940 2007-10-16 01:02:02Z joakime $
+ */
+public class WrappedRepositoryRequestTest
+    extends PlexusTestCase
+{
+    private HttpServletRequest createHttpServletGetRequest( String url )
+        throws MalformedURLException
+    {
+        TestableHttpServletRequest testrequest = new TestableHttpServletRequest();
+        testrequest.setMethod( "GET" );
+        testrequest.setServletPath( "/repository" );
+        testrequest.setUrl( url );
+
+        return testrequest;
+    }
+
+    public void testShort()
+        throws Exception
+    {
+        HttpServletRequest request = createHttpServletGetRequest( "http://machine.com/repository/org" );
+        WrappedRepositoryRequest wrapreq = new WrappedRepositoryRequest( request );
+        assertNotNull( wrapreq );
+
+        assertEquals( "/repository", wrapreq.getServletPath() );
+        assertEquals( "/org", wrapreq.getPathInfo() );
+        assertEquals( "/org", wrapreq.getRequestURI() );
+    }
+
+    public void testLonger()
+        throws Exception
+    {
+        HttpServletRequest request = createHttpServletGetRequest( "http://machine.com/repository/"
+            + "org/codehaus/plexus/webdav/plexus-webdav-simple/1.0-alpha-3/plexus-webdav-simple-1.0-alpha-3.jar" );
+
+        WrappedRepositoryRequest wrapreq = new WrappedRepositoryRequest( request );
+        assertNotNull( wrapreq );
+
+        assertEquals( "/repository", wrapreq.getServletPath() );
+
+        String expected = "/org/codehaus/plexus/webdav/plexus-webdav-simple/1.0-alpha-3/plexus-webdav-simple-1.0-alpha-3.jar";
+        assertEquals( expected, wrapreq.getPathInfo() );
+        assertEquals( expected, wrapreq.getRequestURI() );
+    }
+}

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/util/WrappedRepositoryRequestTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentBasicTest.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentBasicTest.xml?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentBasicTest.xml (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentBasicTest.xml Thu Mar 13 11:28:26 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<!--
+  ~ 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.
+  -->
+
+<plexus>
+  <components>
+  
+    <component>
+      <role>org.apache.maven.archiva.webdav.DavServerManager</role>
+      <role-hint>simple</role-hint>
+      <implementation>org.apache.maven.archiva.webdav.DefaultDavServerManager</implementation>
+      <description>DefaultDavServerManager</description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.archiva.webdav.DavServerComponent</role>
+          <role-hint>simple</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    
+  </components>
+</plexus>

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentBasicTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentIndexHtmlTest.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentIndexHtmlTest.xml?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentIndexHtmlTest.xml (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentIndexHtmlTest.xml Thu Mar 13 11:28:26 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<!--
+  ~ 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.
+  -->
+
+<plexus>
+  <components>
+  
+    <component>
+      <role>org.apache.maven.archiva.webdav.DavServerManager</role>
+      <role-hint>simple</role-hint>
+      <implementation>org.apache.maven.archiva.webdav.DefaultDavServerManager</implementation>
+      <description>DefaultDavServerManager</description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.archiva.webdav.DavServerComponent</role>
+          <role-hint>simple</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    
+  </components>
+</plexus>

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentIndexHtmlTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentMultiTest.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentMultiTest.xml?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentMultiTest.xml (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentMultiTest.xml Thu Mar 13 11:28:26 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<!--
+  ~ 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.
+  -->
+
+<plexus>
+  <components>
+  
+    <component>
+      <role>org.apache.maven.archiva.webdav.DavServerManager</role>
+      <role-hint>simple</role-hint>
+      <implementation>org.apache.maven.archiva.webdav.DefaultDavServerManager</implementation>
+      <description>DefaultDavServerManager</description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.archiva.webdav.DavServerComponent</role>
+          <role-hint>simple</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    
+  </components>
+</plexus>

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleDavServerComponentMultiTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleWebdavServer.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleWebdavServer.xml?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleWebdavServer.xml (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleWebdavServer.xml Thu Mar 13 11:28:26 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0" ?>
+<!--
+  ~ 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.
+  -->
+
+<plexus>
+  <components>
+  
+    <component>
+      <role>org.apache.maven.archiva.webdav.DavServerManager</role>
+      <role-hint>simple</role-hint>
+      <implementation>org.apache.maven.archiva.webdav.DefaultDavServerManager</implementation>
+      <description>DefaultDavServerManager</description>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.archiva.webdav.DavServerComponent</role>
+          <role-hint>simple</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    
+  </components>
+</plexus>

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/simple/SimpleWebdavServer.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/webapp/WEB-INF/web.xml?rev=636822&view=auto
==============================================================================
--- maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/webapp/WEB-INF/web.xml (added)
+++ maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/webapp/WEB-INF/web.xml Thu Mar 13 11:28:26 2008
@@ -0,0 +1,43 @@
+<?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
+    </param-value>
+  </context-param>
+
+</web-app>

Propchange: maven/archiva/branches/springy/archiva-web/archiva-webdav/src/test/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/archiva/branches/springy/archiva-web/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/archiva-web/pom.xml?rev=636822&r1=636821&r2=636822&view=diff
==============================================================================
--- maven/archiva/branches/springy/archiva-web/pom.xml (original)
+++ maven/archiva/branches/springy/archiva-web/pom.xml Thu Mar 13 11:28:26 2008
@@ -33,6 +33,7 @@
     <module>archiva-applet</module>
     <module>archiva-security</module>
     <module>archiva-webapp</module>
+    <module>archiva-webdav</module>
     <module>archiva-standalone</module>
   </modules>
 

Modified: maven/archiva/branches/springy/pom.xml
URL: http://svn.apache.org/viewvc/maven/archiva/branches/springy/pom.xml?rev=636822&r1=636821&r2=636822&view=diff
==============================================================================
--- maven/archiva/branches/springy/pom.xml (original)
+++ maven/archiva/branches/springy/pom.xml Thu Mar 13 11:28:26 2008
@@ -157,6 +157,11 @@
       <version>1.2_Java1.3</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <dependencyManagement>
     <dependencies>
@@ -305,6 +310,11 @@
         <version>1.1-SNAPSHOT</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.maven.archiva</groupId>
+        <artifactId>archiva-webdav</artifactId>
+        <version>1.1-SNAPSHOT</version>
+      </dependency>
+      <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>
         <version>3.2</version>
@@ -390,7 +400,7 @@
       <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
-        <version>1.2.8</version>
+        <version>1.2.14</version>
       </dependency>
       <dependency>
         <groupId>org.apache.lucene</groupId>
@@ -641,16 +651,6 @@
         </exclusions>
       </dependency>
       <dependency>
-        <groupId>org.codehaus.plexus.webdav</groupId>
-        <artifactId>plexus-webdav-simple</artifactId>
-        <version>1.0-beta-2</version>
-      </dependency>
-      <dependency>
-        <groupId>org.codehaus.plexus.webdav</groupId>
-        <artifactId>plexus-webdav-api</artifactId>
-        <version>1.0-beta-2</version>
-      </dependency>	  
-      <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>2.4</version>
@@ -663,7 +663,7 @@
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-log4j12</artifactId>
-        <version>1.2</version>
+        <version>1.5.0</version>
       </dependency>
       <dependency>
         <groupId>taglibs</groupId>
@@ -743,6 +743,7 @@
       </plugin>
       <plugin>
         <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.2</version>
         <configuration>
           <source>1.5</source>
           <aggregate>true</aggregate>