Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0.6
-
Component/s: Artifacts and Repositories
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
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
Issue Links
- is related to
-
MNG-3038
Transitive DepMan not working (per MNG-1577) [use case attached]
-
-
MDEP-97
dependency:tree not consistent with maven core's dependency tree
-
-
MNG-2192
Transitive dependency overrides version specified in POM
-
- relates to
-
MNG-4457
dependency:resolve decides to take older (incompatible) version for transitive dep
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Component/s | maven-core [ 11340 ] | |
| Component/s | maven-artifact [ 11338 ] | |
| Fix Version/s | 2.0.1 [ 12000 ] |
| Fix Version/s | 2.0.1 [ 12000 ] | |
| Fix Version/s | 2.0.2 [ 12107 ] |
| Workflow | Maven [ 42075 ] | Maven New [ 48268 ] |
| Fix Version/s | 2.0.4 [ 12294 ] | |
| Fix Version/s | 2.0.3 [ 12107 ] |
| Fix Version/s | 2.0.5 [ 12294 ] |
| Fix Version/s | 2.1 [ 11704 ] |
| Summary | dependencyManagent does not work for transient dependencies | dependencyManagent does not work for transitive dependencies |
| Summary | dependencyManagent does not work for transitive dependencies | dependencyManagement does not work for transitive dependencies |
| Attachment | mng1577.patch [ 22750 ] |
| Attachment | mng1577a.patch [ 22783 ] |
| Attachment | mng1577b.patch [ 23453 ] | |
| Attachment | mng1577trunk.patch [ 23454 ] |
| Attachment | mng1577c.patch [ 23578 ] |
| Attachment | mng1577d.patch [ 23590 ] |
| Attachment | mng1577e-trunk.patch [ 23942 ] | |
| Attachment | mng1577e.patch [ 23941 ] |
| Assignee | John Casey [ jdcasey ] |
| Link | This issue is related to MPH-20 [ MPH-20 ] |
| Attachment | mng1577f.patch [ 25000 ] |
| Assignee | John Casey [ jdcasey ] | Jason van Zyl [ jason ] |
| Fix Version/s | 2.0.5 [ 12294 ] | |
| Fix Version/s | 2.1 [ 11704 ] |
| Fix Version/s | 2.0.5 [ 12294 ] | |
| Fix Version/s | 2.0.6 [ 13010 ] |
| Fix Version/s | 2.0.x [ 13141 ] | |
| Fix Version/s | 2.0.6 [ 13010 ] |
| Fix Version/s | 2.0.6 [ 13010 ] | |
| Fix Version/s | 2.0.x [ 13141 ] |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] |
| Attachment | site.patch [ 26331 ] |
| Attachment | MNG-1577-trunk-final.patch [ 26392 ] |
I think we determined this wasn't the behaviour that would be used (depMgmt only applying to the current project and inheritence) - need to review and confirm then close as won't fix, or fix for 2.0.1 if I'm wrong.