[ 
https://issues.apache.org/jira/browse/MNG-5761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889862#comment-17889862
 ] 

Didier Loiseau commented on MNG-5761:
-------------------------------------

@Everyone, now that the fix for MNG-8295 has been merge, you’ll be glad to read 
that, with the current master, you’ll get the expected output:
{code:java}
$ mvn -V -f depending-pom.xml dependency:tree
Apache Maven 4.0.0-beta-5-SNAPSHOT (a293822852c90ca7cca636d11ed0d7a6c7eda691)
[…]
[INFO] --- dependency:3.8.0:tree (default-cli) @ depending ---
[INFO] MNG-5761:depending:pom:1.0-SNAPSHOT
[INFO] \- MNG-5761:dependent:pom:1.0-SNAPSHOT:compile
[INFO]    \- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO]       +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO]       \- commons-collections:commons-collections:jar:3.2.2:compile
{code}
[~gnodet], [~cstamas], I think this one can be marked as resolved in 
4.0.0-beta-5

[~schulte77] While I understand your bitterness, I think you are wrong. Things 
seem to be changing. {{<modelVersion>4.1.0</modelVersion>}} _is_ a thing 
{_}now{_}. It is true that there is a huge passive with all artifacts published 
in Maven Central and other repositories, but they have found a solution for 
this as well: consumer poms.

I have been using Maven for 14+ years, but it is indeed the first time I get 
involved in its development. In fact, I’m pretty sure I’ve come across this 
dependency management issue in the past. And while I’m a bit worried that it 
could still somehow get reverted, I’m hopeful. In the worst case, I would have 
lost a few hours of my time, and learned a bit about Maven internals, which 
can’t be bad either.

> Dependency management is not transitive.
> ----------------------------------------
>
>                 Key: MNG-5761
>                 URL: https://issues.apache.org/jira/browse/MNG-5761
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.2.5
>            Reporter: Jeff Schnitzer
>            Priority: Critical
>             Fix For: 4.0.x-candidate
>
>         Attachments: MNG-5761.zip, depending-pom2.xml
>
>
> A detailed description of the issue is here:
> http://stackoverflow.com/questions/28312975/maven-dependencymanagement-version-ignored-in-transitive-dependencies
> The short of it is that maven appears to be using the wrong 
> <dependencyManagement> version in a transitive dependency.  There are two 
> relevant <dependencyManagement> sections in the build, one pulled in by guice 
> and one pulled in by gwizard-parent. These are the dependency paths from the 
> top:
> gwizard-example -> gwizard-config -> gwizard-parent
> gwizard-example -> gwizard-config -> guice -> guice-parent
> gwizard-parent's dependencyManagement specifies guava 18
> guice-parent's dependencyManagement specifies guava 16
> Guava 16 is winning. This seems highly undesirable, and in fact it breaks our 
> build. I would expect that in a version # fight, "closest to the top" should 
> win.



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

Reply via email to