[
http://jira.codehaus.org/browse/MNG-4132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=173006#action_173006
]
Ralph Goers commented on MNG-4132:
----------------------------------
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
in the section on Importing Dependencies clearly documents this behavior. At
this point I don't believe it would be possible to make a behavioral change
like this in 2.0.x or 2.1. However, it is my understanding that 3.0 will be
doing "importing" in a very different manner.
This can either be changed to wontfix or set the fix version to 3.0.
> import dependencies should honor "nearest definition" resolution
> ----------------------------------------------------------------
>
> Key: MNG-4132
> URL: http://jira.codehaus.org/browse/MNG-4132
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.10, 2.1.0
> Reporter: Mike Youngstrom
> Attachments: import.zip
>
>
> Maven defines a "nearest definition" approach to dependency resolution.
> However, the newly introduced "import" dependencies don't. They take a top
> down "first defined" approach.
> For example:
> bom1:
> defines log4j:1.2.9
> bom2:
> defines log4j:1.2.12
> bom3
> imports bom1
> jar
> imports bom3
> imports bom2
> mvn dependency:tree in "jar" will resolve log4j:1.2.9 simply because it is
> first in the dependencyManagement section of the jar. I would expect it to
> resolve log4j:1.2.12 since it is the "nearest definition" in this scenario.
> This is somewhat confusing because this example works differently:
> bom1
> defines log4j:1.2.9
> jar
> imports bom1
> defines log4j:1.2.12
> mvn dependency:tree in "jar" will resolve log4j:1.2.12. In this case
> "nearest definition" is honored.
> I've attached a test case illustrating the problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira