Pascal Schumacher created MDEP-952:
--------------------------------------

             Summary: Unpack fails if extension of artifact is used
                 Key: MDEP-952
                 URL: https://issues.apache.org/jira/browse/MDEP-952
             Project: Maven Dependency Plugin
          Issue Type: Bug
          Components: unpack
    Affects Versions: 3.7.1, 3.7.0
            Reporter: Pascal Schumacher


With 3.6.0 this works:


{quote}

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] ------------------------------------------------------------------------

{quote}


but it fails with 3.7.0 and 3.7.1:

{quote}

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
{quote}

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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to