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

Lightweight HTTP Wagon PUT imcomplete - Missing scoped ancestor collections are not created

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None
    • Maven 2.0.2
      wagon-http-lightweight-1.0-alpha-6.jar
      Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

    Description

      The WEBDAV RFC states that "A PUT that would result in the creation of a resource without an appropriately scoped parent collection MUST fail with a 409 (Conflict)."
      http://www.webdav.org/specs/rfc2518.html#rfc.section.8.7.1

      All the scoped ancestor collections must therefore exist before PUTing the artifact, it is not the responsibility of the server to create the ancestor scoped collections but the responsibility of the HTTP Wagon, exactly as it is for the FTP Wagon. Today, because the Lightweigth HTTP Wagon doesn't create those forementionned ancestor collections, it cannot be used to deploy an artifact to a WEBDAV server (unless I'm missing something).

      Creating those forementioned ancestor scoped collections using the WEBDAV protocol is done using the MKCOL command, which cannot be sent using the java.net.HttpURLConnection which only support "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE" and "TRACE". It therefore requires the use of a WEBDAV aware library such as the Jakarta Slide Client library (or issuing the MKCOL method manually, or adding a MkcolMethod to Jakarta Commons HttpClient).

      Two possibilities, either adding the MkCol method to the lightweight (or fat) http wagon (Completing WAGON-28) , or adding a new wagon (See WAGON-32). The bottom line being that using the proper wagon should be transparent to the end user (no replacing jars in the maven lib dir).

      I have already done some isolated tests and wagon hacking and I am willing to help here by submitting a patch, I just would like to know which way you guys would prefer to go before doing any real work.

      PS: As a matter of fact, regarding the error code returned when the scoped parent collection is missing, 403 is returned instead of 409 with the following server :
      Apache/2.0.54 (Debian GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e

      Attachments

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              cedricvidal Cédric Vidal
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: