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

The get Mojo doesn't resolve the artifact when setting transitive to false

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.1
    • Component/s: get
    • Labels:
      None
    • Flags:
      Important

      Description

      Using a command line call with no POM

      With 3.0.0

      mvn -X -B -U org.apache.maven.plugins:maven-dependency-plugin:3.0.0:get -Dartifact=com.cloudbees.jenkins.main:jenkins-enterprise-war:2.7.21.1:war -Dtransitive=false
      [INFO] Scanning for projects...
      [INFO] Downloading: https://nexus-internal.cloudbees.com/content/groups/mirror/org/apache/maven/plugins/maven-dependency-plugin/maven-metadata.xml
      [INFO] Downloaded: https://nexus-internal.cloudbees.com/content/groups/mirror/org/apache/maven/plugins/maven-dependency-plugin/maven-metadata.xml (921 B at 198 B/s)
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:3.0.0:get (default-cli) @ standalone-pom ---
      [INFO] Resolving com.cloudbees.jenkins.main:jenkins-enterprise-war:war:2.7.21.1
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5.835 s
      [INFO] Finished at: 2016-12-16T21:58:22+01:00
      [INFO] Final Memory: 15M/172M
      [INFO] ------------------------------------------------------------------------
      

      With 2.10

      mvn -X -B -U org.apache.maven.plugins:maven-dependency-plugin:3.0.0:get -Dartifact=com.cloudbees.jenkins.main:jenkins-enterprise-war:2.7.21.1:war -Dtransitive=false
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Maven Stub Project (No POM) 1
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:2.10:get (default-cli) @ standalone-pom ---
      [INFO] Resolving com.cloudbees.jenkins.main:jenkins-enterprise-war:war:2.7.21.1
      [INFO] Downloading: https://nexus-internal.cloudbees.com/content/groups/mirror/com/cloudbees/jenkins/main/jenkins-enterprise-war/2.7.21.1/jenkins-enterprise-war-2.7.21.1.war
      ...
      

      cc Robert Scholte

      I'm on Apache Maven 3.4.0-SNAPSHOT but my coworkers has the issue with 3.3.9 and others releases

        Activity

        Hide
        gboue Guillaume Boué added a comment -

        Fixed in r1774770.

        Show
        gboue Guillaume Boué added a comment - Fixed in r1774770 .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #7793 (See https://builds.apache.org/job/maven-plugins/7793/)
        MDEP-548 The get Mojo doesn't resolve the artifact when setting transitive to false

        When transitive is set to false, the ArtifactResolver needs to be used to resolve just the specified artifact, without its transitive dependencies. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774770)

        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar
        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom
        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar
        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom
        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar
        • (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom
        • (add) maven-dependency-plugin/src/it/projects/get-artifact
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-artifact/test.properties
        • (add) maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-gav
        • (add) maven-dependency-plugin/src/it/projects/get-gav/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/get-gav/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/get-gav/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/get-gav/test.properties
        • (add) maven-dependency-plugin/src/it/projects/get-gav/verify.bsh
        • (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #7793 (See https://builds.apache.org/job/maven-plugins/7793/ ) MDEP-548 The get Mojo doesn't resolve the artifact when setting transitive to false When transitive is set to false, the ArtifactResolver needs to be used to resolve just the specified artifact, without its transitive dependencies. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774770 ) (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.jar (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-1.0.pom (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.jar (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-maven-plugin-1.0.pom (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.jar (add) maven-dependency-plugin/src/it/mrm/repository/get-artifact-transitive-1.0.pom (add) maven-dependency-plugin/src/it/projects/get-artifact (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/invoker.properties (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/pom.xml (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/setup.bsh (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/test.properties (add) maven-dependency-plugin/src/it/projects/get-artifact-maven-plugin/verify.bsh (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/invoker.properties (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/pom.xml (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/setup.bsh (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/test.properties (add) maven-dependency-plugin/src/it/projects/get-artifact-no-transitive/verify.bsh (add) maven-dependency-plugin/src/it/projects/get-artifact/invoker.properties (add) maven-dependency-plugin/src/it/projects/get-artifact/pom.xml (add) maven-dependency-plugin/src/it/projects/get-artifact/setup.bsh (add) maven-dependency-plugin/src/it/projects/get-artifact/test.properties (add) maven-dependency-plugin/src/it/projects/get-artifact/verify.bsh (add) maven-dependency-plugin/src/it/projects/get-gav (add) maven-dependency-plugin/src/it/projects/get-gav/invoker.properties (add) maven-dependency-plugin/src/it/projects/get-gav/pom.xml (add) maven-dependency-plugin/src/it/projects/get-gav/setup.bsh (add) maven-dependency-plugin/src/it/projects/get-gav/test.properties (add) maven-dependency-plugin/src/it/projects/get-gav/verify.bsh (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java

          People

          • Assignee:
            gboue Guillaume Boué
            Reporter:
            aheritier Arnaud HERITIER
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development