Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-162

localRepository as file URL in settings.xml makes unpacking dependencies fail: expanding into null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: unpack-dependencies
    • Labels:
      None
    • Environment:
      Windows XP

      Description

      I specified the localRepository in settings.xml like this:

      <localRepository>file:///C:/.m2/repository</localRepository>

      Using a file URL is apparently valid for artifacts which are only downloaded.

      However, when a dependency is to be expanded to .unpacked-modules, a file URL leads to failure.

      The dependency is unpacked to the directory where mvn was started.

      The console output shows this line:

      [INFO] Expanding: c:\.m2\repository\com\company\project\activemq-cpp\2.1.3_02\activemq-cpp-2.1.3_02-win32.zip into null

      Debug output is attached, look for outputDirectory.

      The problem here is an inconsistency in treating a file URL; it is correctly used by some modules, but incorrectly by others.

      Possible solutions:

      1. Accept file URLs everywhere (preferred)
      2. Don't accept file URLs anywhere and fail cleanly when file URL is encountered
      3. Document clearly in which format the path is to be given

        Attachments

        1. expanding_into_null.txt
          2 kB
          Ivan Vasilev

          Activity

            People

            • Assignee:
              danttran Dan Tran
              Reporter:
              hok Ivan Vasilev
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: