[ https://issues.apache.org/jira/browse/MDEP-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17624770#comment-17624770 ]
Curtis Rueden commented on MDEP-390: ------------------------------------ This is still an issue: {noformat} $ mvn -v Maven home: /usr/local/Cellar/maven/3.8.6/libexec Java version: 1.8.0_322, vendor: Azul Systems, Inc., runtime: /Users/curtis/Java/macos/zulu-fx-8u322/zulu-8.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac" $ mvn dependency:get \ -DremoteRepositories=scijava.public::::https://maven.scijava.org/content/groups/public \ -Dartifact="org.scijava:scijava-cache:0.1.2" [INFO] Scanning for projects... [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:2.8:get (default-cli) @ standalone-pom --- [INFO] Resolving org.scijava:scijava-cache:jar:0.1.2 with transitive dependencies Downloading from central: https://repo.maven.apache.org/maven2/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.pom Downloading from scijava.public: https://maven.scijava.org/content/groups/public/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.pom Downloaded from scijava.public: https://maven.scijava.org/content/groups/public/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.pom (3.1 kB at 8.6 kB/s) Downloading from central: https://repo.maven.apache.org/maven2/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.jar Downloading from scijava.public: https://maven.scijava.org/content/groups/public/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.jar Downloaded from scijava.public: https://maven.scijava.org/content/groups/public/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.jar (4.1 kB at 255 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.590 s [INFO] Finished at: 2022-10-26T16:40:42-05:00 [INFO] ------------------------------------------------------------------------ $ rm -rf ~/.m2/repository/org/scijava/scijava-cache $ mvn dependency:unpack \ -DremoteRepositories=scijava.public::::https://maven.scijava.org/content/groups/public \ -Dartifact="org.scijava:scijava-cache:0.1.2" \ -DoutputDirectory=. [INFO] Scanning for projects... [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:2.8:unpack (default-cli) @ standalone-pom --- [INFO] Configured Artifact: org.scijava:scijava-cache:0.1.2:jar Downloading from central: https://repo.maven.apache.org/maven2/org/scijava/scijava-cache/0.1.2/scijava-cache-0.1.2.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.130 s [INFO] Finished at: 2022-10-26T16:40:21-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack (default-cli) on project standalone-pom: Unable to find artifact.: Could not find artifact org.scijava:scijava-cache:jar:0.1.2 in central (https://repo.maven.apache.org/maven2) ... {noformat} Happens also with the {{copy}} mojo. > org.apache.maven.plugins:maven-dependency-plugin:unpack to support > remoteRepositories > ------------------------------------------------------------------------------------- > > Key: MDEP-390 > URL: https://issues.apache.org/jira/browse/MDEP-390 > Project: Maven Dependency Plugin > Issue Type: Improvement > Components: unpack > Affects Versions: 2.5.1 > Reporter: Mickael Istria > Priority: Major > > As a user, I'd like to download a Maven artifact from command-line and get it > unzipped. > In order to use the maven-depdenceny-plugin:goal as the ultimate command-line > client to download a maven artifact (not necessarly in the context of a > project), it would be useful to add to it an "unpack" parameter that would > allow to unpack the just-downloaded stuff. > When in comes to automating download+unzip of an artifact in CI: > Currently, one has to add a Shell or Ant or Groovy script to unzip, after > using "mvn org.apache.maven.plugins:maven-dependency-plugin:2.5.1:get > -Dartifact=blah:blah:1.0 -DremoteRepositories=http://somewhere". It's not > very convenient as this requires usage of another Ant or Groovy file, or > usage of a platform-specific interpreter. > Also note that the unpack-mojo can't fit this use-case since it's not > configurable via command-line (can't set artifactItems nor > remoteRepositories). -- This message was sent by Atlassian Jira (v8.20.10#820010)