dependency:tree to optionally display all instances of a transitive dependency,
not just the first one found
------------------------------------------------------------------------------------------------------------
Key: MDEP-123
URL: http://jira.codehaus.org/browse/MDEP-123
Project: Maven 2.x Dependency Plugin
Issue Type: New Feature
Components: tree
Affects Versions: 2.0-alpha-5
Reporter: William Ferguson
Assignee: Brian Fox
Attachments: pom.xml
dependency:tree is *really* useful for tracking down how a particular
transitive dependency has been introduced, but it only lists the first
occurrence, not all occurrences. So it can be frustrating game attempting to
remove a dep only to find it introduced by another component. A parameter to
dependency:tree to show all occurences of a transitive dep would be *really*
helpful.
Eg the attached POM has a direct dep on commons-beanutils and commons-digester,
which both have a dep on commons-logging. But executing
{code}
mvn org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-5-SNAPSHOT:tree
{code}
only shows commons-logging listed as a transitive dep for commons-beanutils,
not commons-digester, Ie
{code}
[INFO] [dependency:tree]
[INFO]
maven-dependency-plugin-tree-all-deps:maven-dependency-plugin-tree-all-deps:jar:0.0.1
[INFO] +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | \- commons-logging:commons-logging:jar:1.0.3:compile
[INFO] \- commons-digester:commons-digester:jar:1.7:compile
[INFO] +- commons-collections:commons-collections:jar:2.1:compile
[INFO] \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
{code}
but if an exclusion is added to commons-beanutils for for commons-logging, then
the other transitive dep instance is revealed. Ie
{code}
[INFO] [dependency:tree]
[INFO]
maven-dependency-plugin-tree-all-deps:maven-dependency-plugin-tree-all-deps:jar:0.0.1
[INFO] +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] \- commons-digester:commons-digester:jar:1.7:compile
[INFO] +- commons-logging:commons-logging:jar:1.0:compile
[INFO] +- commons-collections:commons-collections:jar:2.1:compile
[INFO] \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
{code}
An option to show both instance would be fantastic, Eg
{code}
[INFO] [dependency:tree]
[INFO]
maven-dependency-plugin-tree-all-deps:maven-dependency-plugin-tree-all-deps:jar:0.0.1
[INFO] +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | \- commons-logging:commons-logging:jar:1.0.3:compile
[INFO] \- commons-digester:commons-digester:jar:1.7:compile
[INFO] +- commons-logging:commons-logging:jar:1.0:compile
[INFO] +- commons-collections:commons-collections:jar:2.1:compile
[INFO] \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
{code}
--
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