[ http://jira.codehaus.org/browse/MNG-1577?page=all ]

Ralph Goers updated MNG-1577:
-----------------------------

    Attachment: mng1577.patch

Attached is a patch that addresses this issue.  Without doing anything maven 
will behave as it currently does.  However, adding <override>true</override> to 
the dependencyManagement section will cause the dependencyManagement section to 
be propogated to each child project and the versions in the 
dependencyManagement entries will override any versions specified in 
subprojects. 

This patch applies to 2.0.x at revision 442440.

> dependencyManagement does not work for transitive dependencies
> --------------------------------------------------------------
>
>                 Key: MNG-1577
>                 URL: http://jira.codehaus.org/browse/MNG-1577
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.0
>            Reporter: Joerg Schaible
>             Fix For: 2.1
>
>         Attachments: mng1577.patch
>
>
> The dependencyManagement does not work for transient dependencies. The 
> specified version is ignored.
> Use case:
> Main POM defines commons-digester-1.6 and commons-beanutils-1.7.0, A-SNAPSHOT 
> and B-SNAPSHOT
> Project A is child of Main and depends directly on commons-beanutils (version 
> inherited from Main)
> Project B is child of Main and depends directly on commons-digester (version 
> inherited from Main)
> Project C is child of Main and depends directly on A & B (versions inherited 
> from Main)
> A is compiled and tests are run using commons-beanutils-1.7.0
> B is compiled and tests are run using commons-digester-1.6 and 
> commons-beanutils-1.6, since digester is dependend on this
> C is compiled and tests are run using commons-beanutils-1.7.0
> Integration tests of B did not verify, that B is behaving as expected in this 
> scenario. B might fail with 1.7.0 and it is not even recognized.
> If I add beanutils also as direct dependency to B, it works fine, but then 
> are transitive dependency useless. It should be possible to define at least 
> in the dependencyManagement, that the versions of transient dependencies also 
> defined in the dependencyManagement have priority.
> - Jörg

-- 
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


Reply via email to