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

download latest artifact failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.2
    • None
    • copy
    • None

    Description

      Does copy respect LATEST as version, actually ?

      I can download a specific version, but not the 'latest' version, see logs below. however, in modern CI/CD pipelines, we sometimes need to get latest artifact.

      [ggfan@localhost nexus]$ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy -Dartifact=org.sonatype.nexus.plugins:nexus-repository-apk:0.0.9:kar:bundle -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:3.1.2:copy (default-cli) @ standalone-pom —
      [INFO] Configured Artifact: org.sonatype.nexus.plugins:nexus-repository-apk:bundle:0.0.9:kar
      Downloading from bgzchina-maven-releases: http://172.31.0.187:8081/repository/maven-bgzchina-releases/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9.pom
      Downloading from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9.pom
      Downloaded from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9.pom (2.5 kB at 758 B/s)
      Downloading from bgzchina-maven-releases: http://172.31.0.187:8081/repository/maven-bgzchina-releases/org/sonatype/nexus/plugins/apk-parent/0.0.9/apk-parent-0.0.9.pom
      Downloading from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/apk-parent/0.0.9/apk-parent-0.0.9.pom
      Downloaded from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/apk-parent/0.0.9/apk-parent-0.0.9.pom (5.0 kB at 1.7 kB/s)
      Downloading from bgzchina-maven-releases: http://172.31.0.187:8081/repository/maven-bgzchina-releases/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9-bundle.kar
      Downloading from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9-bundle.kar
      Downloaded from bgzchina-maven-proxy: http://172.31.0.187:8081/repository/central-aliyun/org/sonatype/nexus/plugins/nexus-repository-apk/0.0.9/nexus-repository-apk-0.0.9-bundle.kar (588 kB at 48 kB/s)
      [INFO] Copying nexus-repository-apk-0.0.9-bundle.kar to /home/ggfan/Desktop/fwx/raw/nexus/nexus-repository-apk-0.0.9-bundle.kar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 20.063 s
      [INFO] Finished at: 2020-06-16T22:15:01+08:00
      [INFO] ------------------------------------------------------------------------
      [ggfan@localhost nexus]$ ls
      '${project.basedir}' build.sh deployment.yaml Dockerfile keycloak-intergration nexus-repository-apk-0.0.10-bundle.kar nexus-repository-apk-0.0.9-bundle.kar upstream
      [ggfan@localhost nexus]$ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy -Dartifact=org.sonatype.nexus.plugins:nexus-repository-apk:LATEST:kar:bundle -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:3.1.2:copy (default-cli) @ standalone-pom —
      [INFO] Configured Artifact: org.sonatype.nexus.plugins:nexus-repository-apk:bundle:LATEST:kar
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 0.877 s
      [INFO] Finished at: 2020-06-16T22:15:40+08:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:copy (default-cli) on project standalone-pom: Unable to find/resolve artifact.: Failed to read artifact descriptor for org.sonatype.nexus.plugins:nexus-repository-apk:kar:bundle:LATEST: Failed to resolve version for org.sonatype.nexus.plugins:nexus-repository-apk:kar:bundle:LATEST -> [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/MojoExecutionException

      Attachments

        Activity

          People

            Unassigned Unassigned
            WestFarmer WestFarmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: