maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Boettcher (JIRA)" <>
Subject [jira] (MNG-5341) Dependency plugin may treat transitive dependencies as direct dependencies
Date Thu, 06 Sep 2012 21:20:21 GMT
Tom Boettcher created MNG-5341:

             Summary: Dependency plugin may treat transitive dependencies as direct dependencies
                 Key: MNG-5341
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 3.0.4
            Reporter: Tom Boettcher

[Git repo|] containing sample projects illustrating
the bug.

When two artifacts sharing an artifact ID but with different classifiers are both dependencies
of a project, one of them being a direct dependency will cause the other to also be treated
as a direct dependency, even if it is transitive.

>From the repository linked above:
Project Relationships:
* projectA produces two artifacts with different classifiers: projectA and projectA-someclassifier.
* projectB depends directly on projectA-someclassifier (and also junit, for illustration purposes).
* projectC depends directly on projectB and projectA (note the lack of classifier) and transitively
on projectA-someclassifier and junit.

To see the bug, install projectA and projectB to your local repository, then run the following
commands on projectC:

* {{mvn dependency:resolve}}
* {{mvn dependency:resolve -DexcludeTransitive=true}}

In the latter case, projectA-someclassifier should be excluded from the list, but it is actually
included. Note that the "ordinary" transitive dependency of junit is excluded, as expected.
Furthermore, try running those same commands again after removing projectA from projectC's
dependencies: with the second command, projectA and projectA-someclassifier both disappear
from the list, even though only the direct dependency was changed!

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message