[ https://issues.apache.org/jira/browse/MNG-8516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912773#comment-17912773 ]
Guillaume Nodet commented on MNG-8516: -------------------------------------- Dependency management in parent POMs and the child are merged. After this process, the dependency tree is built, the closest managed dependency (in terms of transitive dependency distance) is the winner. The doc says " When you have a set of projects that inherit from a common parent, it's possible to put all information about the dependency in the common POM and have simpler references to the artifacts in the child POMs." I think the implicit assumption is that the managed dependencies can be put in the current POM. This is shown in several examples on this page. > dependencyManagement in a single pom > ------------------------------------ > > Key: MNG-8516 > URL: https://issues.apache.org/jira/browse/MNG-8516 > Project: Maven > Issue Type: Improvement > Components: Documentation: General > Reporter: Elliotte Rusty Harold > Priority: Minor > > https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Management > describes putting a dependencyManagement section in a parent pom, but what > about putting a > dependencyManagement section in the current pom.xml? Does this override > dependency versions in transitive dependencies? > E.g. suppose my project depends on spring 2.5 which depends on Guava 25.0. If > I dependency manage Guava to 33.0, is that now the version that is added to > my classpath? > if yes, document this use. > If no, why not? -- This message was sent by Atlassian Jira (v8.20.10#820010)