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

Unpack fails if extension of artifact is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.7.0, 3.7.1
    • None
    • unpack

    Description

      With 3.6.0 this works:

      mvn org.apache.maven.plugins:maven-dependency-plugin:3.6.0:unpack -Dartifact=org.apache.commons:commons-lang3:LATEST::jar -DoutputDirectory=.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] -----------------< org.apache.maven:standalone-pom >------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] -------------------------------[ pom ]--------------------------------
      [INFO]
      [INFO] — dependency:3.6.0:unpack (default-cli) @ standalone-pom —
      [INFO] Configured Artifact: org.apache.commons:commons-lang3:LATEST:jar
      Downloading from artifactory-dms-maven-virtual: https://REPO/org/apache/commons/commons-lang3/maven-metadata.xml
      Downloaded from artifactory-dms-maven-virtual: https://REPO/org/apache/commons/commons-lang3/maven-metadata.xml (1.8 kB at 4.2 kB/s)
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2.231 s
      [INFO] Finished at: 2024-08-21T16:59:57+02:00
      [INFO] ------------------------------------------------------------------------

      but it fails with 3.7.0 and 3.7.1:

      mvn org.apache.maven.plugins:maven-dependency-plugin:3.7.1:unpack -Dartifact=org.apache.commons:commons-lang3:LATEST::jar -DoutputDirec
      tory=.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] -----------------< org.apache.maven:standalone-pom >------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] -------------------------------[ pom ]--------------------------------
      [INFO]
      [INFO] — dependency:3.7.1:unpack (default-cli) @ standalone-pom —
      [INFO] Configured Artifact: org.apache.commons:commons-lang3:jar:LATEST:null
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 0.859 s
      [INFO] Finished at: 2024-08-21T17:00:12+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.7.1:unpack (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:3.7.1:unpack failed.: NullPointerException -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

      If the extension is omitted it works with all version (This is a simplified example, the real use case is a private zip artifact.)

      I tried it with Maven 3.9.5 and 3.9.9 on both Linux and Windows.

      By the way: Thank you very much for developing/providing the Maven Dependency Plugin.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pascal.schumacher@t-systems.com Pascal Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: