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

dependency:tree fails for a multi-module project where one module depends on another and "mvn install" has not been run yet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 3.0.1
    • Component/s: tree
    • Labels:
      None
    • Environment:
      Linux

      Description

      When I run dependency:tree on a multi-module project without having run a "mvn install", it fails with this error:

      [ERROR] Failed to execute goal on project slide-test-module-svn-2: Could not resolve dependencies for project org.slide:slide-test-module-svn-2:jar:1.1-SNAPSHOT: The following artifacts could not be resolved: org.slide:slide-test-module-svn-3:jar:1.1-SNAPSHOT, org.slide:git-component-for-testing-slide:jar:1.0.b1782: Could not find artifact org.slide:slide-test-module-svn-3:jar:1.1-SNAPSHOT in maven-central -> [Help 1]
      

        Issue Links

          Activity

          Hide
          epabst Eric Pabst added a comment -

          All that is needed is for the dependency:tree goal to specify @requiresDependencyCollection instead of @requiresDependencyResolution.

          Show
          epabst Eric Pabst added a comment - All that is needed is for the dependency:tree goal to specify @requiresDependencyCollection instead of @requiresDependencyResolution.
          Hide
          epabst Eric Pabst added a comment -

          Also available as a github pull request: https://github.com/epabst/maven-plugins/pull/3

          Show
          epabst Eric Pabst added a comment - Also available as a github pull request: https://github.com/epabst/maven-plugins/pull/3
          Hide
          hboutemy Hervé Boutemy added a comment -

          yes, this is the solution
          the only drawback is to require Maven 3: I'd prefer to avoid such requirement

          Show
          hboutemy Hervé Boutemy added a comment - yes, this is the solution the only drawback is to require Maven 3: I'd prefer to avoid such requirement
          Hide
          michael-o Michael Osipov added a comment -

          With the resolution of MDEP-410, can this be solved now?

          Show
          michael-o Michael Osipov added a comment - With the resolution of MDEP-410 , can this be solved now?
          Hide
          MattNelson Matt Nelson added a comment -

          Gonna bump this again. I have some scripts that I attempted to update to use the new collect goal from (MDEP-410), but I need the tree goal updated because the output includes a slightly different dependency set. Eric Pabst Would you be willing to pick up from where it was left and get this pulled?

          https://github.com/epabst/maven-plugins/commit/f9335a8aef7f96b1ba16e7782b28639cda7e4370

          Show
          MattNelson Matt Nelson added a comment - Gonna bump this again. I have some scripts that I attempted to update to use the new collect goal from ( MDEP-410 ), but I need the tree goal updated because the output includes a slightly different dependency set. Eric Pabst Would you be willing to pick up from where it was left and get this pulled? https://github.com/epabst/maven-plugins/commit/f9335a8aef7f96b1ba16e7782b28639cda7e4370
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user reda-alaoui opened a pull request:

          https://github.com/apache/maven-plugins/pull/111

          MDEP-409 dependency:tree fails for a multi-module project where one module depends on another and "mvn install" not run yet

          Credits go to @epabst

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/Cosium/maven-plugins bugfix/mdep-409-deptree-fails-multi-module

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/maven-plugins/pull/111.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #111


          commit 4acd8a8f690343bf5fd97a280268859008f9d3c8
          Author: Réda Housni Alaoui <reda.housnialaoui@gmail.com>
          Date: 2017-04-09T11:37:53Z

          Fixed


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user reda-alaoui opened a pull request: https://github.com/apache/maven-plugins/pull/111 MDEP-409 dependency:tree fails for a multi-module project where one module depends on another and "mvn install" not run yet Credits go to @epabst You can merge this pull request into a Git repository by running: $ git pull https://github.com/Cosium/maven-plugins bugfix/mdep-409-deptree-fails-multi-module Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven-plugins/pull/111.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #111 commit 4acd8a8f690343bf5fd97a280268859008f9d3c8 Author: Réda Housni Alaoui <reda.housnialaoui@gmail.com> Date: 2017-04-09T11:37:53Z Fixed
          Hide
          reda-alaoui Réda Housni Alaoui added a comment - - edited

          Hello,

          Since, Eric Pabst pull request is gone, I created a new one with the same patch.
          Please accept this fix, this bug prevents dependency debugguing when the project cannot be compiled because of work in progress.

          https://github.com/apache/maven-plugins/pull/111

          Show
          reda-alaoui Réda Housni Alaoui added a comment - - edited Hello, Since, Eric Pabst pull request is gone, I created a new one with the same patch. Please accept this fix, this bug prevents dependency debugguing when the project cannot be compiled because of work in progress. https://github.com/apache/maven-plugins/pull/111
          Hide
          michael-o Michael Osipov added a comment -

          Can you create an IT or that since this issue seems to be crucial?!

          Show
          michael-o Michael Osipov added a comment - Can you create an IT or that since this issue seems to be crucial?!
          Hide
          reda-alaoui Réda Housni Alaoui added a comment -

          Hello Michael,

          Tests were created on the PR

          Show
          reda-alaoui Réda Housni Alaoui added a comment - Hello Michael, Tests were created on the PR
          Hide
          michael-o Michael Osipov added a comment -

          Fixed with r1791410.

          Show
          michael-o Michael Osipov added a comment - Fixed with r1791410 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/maven-plugins/pull/111

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/maven-plugins/pull/111
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-plugins #8913 (See https://builds.apache.org/job/maven-plugins/8913/)
          MDEP-409 dependency:tree fails for a multi-module project where one module depends on another and "mvn install" has not been run yet

          Submitted-by: Réda Housni Alaoui <reda.housnialaoui@gmail.com>

          This closes #111 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1791410)

          • (edit) maven-dependency-plugin/pom.xml
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/expected.txt
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/invoker.properties
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a/expected.txt
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a/pom.xml
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b/expected.txt
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b/pom.xml
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/pom.xml
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/test.properties
          • (add) maven-dependency-plugin/src/it/projects/tree-multimodule/verify.bsh
          • (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8913 (See https://builds.apache.org/job/maven-plugins/8913/ ) MDEP-409 dependency:tree fails for a multi-module project where one module depends on another and "mvn install" has not been run yet Submitted-by: Réda Housni Alaoui <reda.housnialaoui@gmail.com> This closes #111 (michaelo: http://svn.apache.org/viewvc/?view=rev&rev=1791410 ) (edit) maven-dependency-plugin/pom.xml (add) maven-dependency-plugin/src/it/projects/tree-multimodule (add) maven-dependency-plugin/src/it/projects/tree-multimodule/expected.txt (add) maven-dependency-plugin/src/it/projects/tree-multimodule/invoker.properties (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a/expected.txt (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-a/pom.xml (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b/expected.txt (add) maven-dependency-plugin/src/it/projects/tree-multimodule/module-b/pom.xml (add) maven-dependency-plugin/src/it/projects/tree-multimodule/pom.xml (add) maven-dependency-plugin/src/it/projects/tree-multimodule/test.properties (add) maven-dependency-plugin/src/it/projects/tree-multimodule/verify.bsh (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java
          Hide
          reda-alaoui Réda Housni Alaoui added a comment - - edited

          Thank you Michael
          Do you know when we can expect a release including this fix?
          Regards

          Show
          reda-alaoui Réda Housni Alaoui added a comment - - edited Thank you Michael Do you know when we can expect a release including this fix? Regards
          Hide
          trajano Archimedes Trajano added a comment -

          https://github.com/apache/maven-plugins/commit/71c24e418afd37b8f4290fd1a4e0419bc9e2285a seems like it was released but I don't see it on central.

          Show
          trajano Archimedes Trajano added a comment - https://github.com/apache/maven-plugins/commit/71c24e418afd37b8f4290fd1a4e0419bc9e2285a seems like it was released but I don't see it on central.
          Hide
          michael-o Michael Osipov added a comment -

          This will take some a day.

          Show
          michael-o Michael Osipov added a comment - This will take some a day.
          Hide
          trajano Archimedes Trajano added a comment -

          that release commit is actually 5 days old right now. it should be there already shouldn't it?

          Show
          trajano Archimedes Trajano added a comment - that release commit is actually 5 days old right now. it should be there already shouldn't it?

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              epabst Eric Pabst
            • Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development