maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1174103 - in /maven/wagon/trunk: ./ wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ wagon-providers/wagon-webdav-jackrabbit/ wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/p...
Date Thu, 22 Sep 2011 13:02:42 GMT
Author: olamy
Date: Thu Sep 22 13:02:42 2011
New Revision: 1174103

URL: http://svn.apache.org/viewvc?rev=1174103&view=rev
Log:
[WAGON-344] Error deploying maven-site throught webdav in childs modules
Patch submitted by Pablo Baratto.

Added:
    maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/resources/log4j.xml
Modified:
    maven/wagon/trunk/pom.xml
    maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
    maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/pom.xml
    maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java

Modified: maven/wagon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/pom.xml?rev=1174103&r1=1174102&r2=1174103&view=diff
==============================================================================
--- maven/wagon/trunk/pom.xml (original)
+++ maven/wagon/trunk/pom.xml Thu Sep 22 13:02:42 2011
@@ -282,6 +282,20 @@ under the License.
         <scope>test</scope>
       </dependency>
 
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-log4j12</artifactId>
+        <version>1.6.1</version>
+        <scope>test</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>jcl-over-slf4j</artifactId>
+        <version>1.6.1</version>
+        <scope>test</scope>
+      </dependency>
+
 
       <dependency>
         <groupId>easymock</groupId>

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java?rev=1174103&r1=1174102&r2=1174103&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
Thu Sep 22 13:02:42 2011
@@ -308,7 +308,11 @@ public abstract class AbstractHttpClient
         {
             // TODO: Fix encoding...
             // url += "/" + URLEncoder.encode( parts[i], System.getProperty("file.encoding")
);
-            url.append( '/' ).append( URLEncoder.encode( part ) );
+            if ( !url.toString().endsWith( "/" ) )
+            {
+                url.append( '/' );
+            }
+            url.append( URLEncoder.encode( part ) );
         }
 
         //Parent directories need to be created before posting
@@ -394,8 +398,13 @@ public abstract class AbstractHttpClient
     public boolean resourceExists( String resourceName )
         throws TransferFailedException, AuthorizationException
     {
-        String url = getRepository().getUrl() + "/" + resourceName;
-        HeadMethod headMethod = new HeadMethod( url );
+        StringBuilder url = new StringBuilder( getRepository().getUrl() );
+        if ( !url.toString().endsWith( "/" ) )
+        {
+            url.append( '/' );
+        }
+        url.append( resourceName );
+        HeadMethod headMethod = new HeadMethod( url.toString() );
         int statusCode;
         try
         {
@@ -553,8 +562,14 @@ public abstract class AbstractHttpClient
     {
         Resource resource = inputData.getResource();
 
-        String url = getRepository().getUrl() + "/" + resource.getName();
-        getMethod = new GetMethod( url );
+        StringBuilder url = new StringBuilder( getRepository().getUrl() );
+        if ( !url.toString().endsWith( "/" ) )
+        {
+            url.append( '/' );
+        }
+        url.append( resource.getName() );
+
+        getMethod = new GetMethod( url.toString() );
         long timestamp = resource.getLastModified();
         if ( timestamp > 0 )
         {

Modified: maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/pom.xml
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/pom.xml?rev=1174103&r1=1174102&r2=1174103&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/pom.xml (original)
+++ maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/pom.xml Thu Sep 22 13:02:42
2011
@@ -91,6 +91,19 @@ under the License.
       <version>0.4</version>
       <scope>test</scope>
     </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 
   <build>

Modified: maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java?rev=1174103&r1=1174102&r2=1174103&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
Thu Sep 22 13:02:42 2011
@@ -44,7 +44,7 @@ public class WebDavWagonTest
     protected String getTestRepositoryUrl()
         throws IOException
     {
-        return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/newfolder/folder2";
+        return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/newfolder/folder2/";
     }
 
     protected String getProtocol()

Added: maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/resources/log4j.xml?rev=1174103&view=auto
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/resources/log4j.xml
(added)
+++ maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/test/resources/log4j.xml
Thu Sep 22 13:02:42 2011
@@ -0,0 +1,36 @@
+<?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.
+  -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+  <appender name="console" class="org.apache.log4j.ConsoleAppender">
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
+    </layout>
+  </appender>
+
+  <root>
+    <priority value ="info" />
+    <appender-ref ref="console" />
+  </root>
+
+</log4j:configuration>



Mime
View raw message