Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-344

Error deploying maven-site throught webdav in childs modules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0
    • 2.0
    • wagon-http, wagon-webdav
    • None
    • Maven 3.0.3, 2.2.1, Wagon 1.0, Webdav server mod-dav (apache)
    • Patch

    Description

      I have an error when trying to deploy a site through webdav.

      I have a project X that has module A and module B. Module A is B's parent and doesn't have a parent itself.

      When deploying the site of A it works perfectly.

      When trying to deploy the site of B, the URL defined in its site ditributionManagement is relativized to A's site's distributionManagent URL to something like:

      dav://host/A//../B

      The double "//" after "A" generates the following error on the dav server when trying to deploy the site:

      ========================================================================================
      [INFO] --- maven-site-plugin:3.0:deploy (default-deploy) @ parent ---
      http://dav.ddit/alfresco/webdav/Sites/test/b/ - Session: Opened  
      [INFO] Pushing /home/temp/proyectodav/test/parent/target/site
      [INFO]    >>> to http://dav.ddit/alfresco/webdav/Sites/test/b/../a
      12-ago-2011 14:31:31 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
      INFO: basic authentication scheme selected
      Uploading: ../a/index.html to http://dav.ddit/alfresco/webdav/Sites/test/b/
      
      ##12-ago-2011 14:31:31 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
      INFO: basic authentication scheme selected
      ##http://dav.ddit/alfresco/webdav/Sites/test/b//../a/index.html - Status code: 403
      http://dav.ddit/alfresco/webdav/Sites/test/b/ - Session: Connection refused
      http://dav.ddit/alfresco/webdav/Sites/test/b/ - Session: Disconnecting  
      http://dav.ddit/alfresco/webdav/Sites/test/b/ - Session: Disconnected
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 17.948s
      [INFO] Finished at: Fri Aug 12 14:31:32 ART 2011
      [INFO] Final Memory: 20M/330M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:deploy (default-deploy) on project parent: Error uploading site: Access denied to: http://dav.ddit/alfresco/webdav/Sites/test/b//../a/index.html -> [Help 1]
      ========================================================================================
      

      Apparently this is caused by the lack of checking for a "/"-terminated parent URL when building the relative one.

      The attached patch is applied to http://svn.apache.org/repos/asf/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java

      Attachments

        1. AbstractHttpClientWagon.java.patch
          0.2 kB
          Pablo Baratto

        Activity

          People

            olamy Olivier Lamy
            elpernotador Pablo Baratto
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: