You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roger Pack (JIRA)" <ji...@codehaus.org> on 2013/10/07 17:36:52 UTC

[jira] (MDEP-123) dependency:tree to optionally display all instances of a transitive dependency, not just the first one found

    [ https://jira.codehaus.org/browse/MDEP-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=333705#comment-333705 ] 

Roger Pack commented on MDEP-123:
---------------------------------

It appears that with -Dverbose=true it lists duplicates like

[INFO] |  |  +- (commons-httpclient:commons-httpclient:jar:3.1:compile - omitted for duplicate)
or
[INFO] |  |  |  \- (com.sun.jersey:jersey-client:jar:1.2:compile - omitted for conflict with 1.1.4.1)

@William is that the "solution" you were referring to?
                
> dependency:tree to optionally display all instances of a transitive dependency, not just the first one found
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MDEP-123
>                 URL: https://jira.codehaus.org/browse/MDEP-123
>             Project: Maven Dependency Plugin
>          Issue Type: New Feature
>          Components: tree
>    Affects Versions: 2.0
>            Reporter: William Ferguson
>            Assignee: Brian Fox
>             Fix For: 2.0
>
>         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, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira