[ 
https://jira.codehaus.org/browse/MNG-4132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Benedict updated MNG-4132:
-------------------------------

    Fix Version/s:     (was: Issues to be reviewed for 3.x)

> import dependencies should honor "nearest definition" resolution
> ----------------------------------------------------------------
>
>                 Key: MNG-4132
>                 URL: https://jira.codehaus.org/browse/MNG-4132
>             Project: Maven
>          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 was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to