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.1.0, 2.0.10 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