Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Maven 2, how do I know from which dependency comes a transitive dependency?

I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory.

To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know which dependency in my pom.xml brings that.

like image 714
paulgreg Avatar asked Aug 29 '08 07:08

paulgreg


People also ask

How do you identify transitive dependencies?

A transitive dependency occurs when one non-prime attribute is dependent on another non-prime attribute. If a table schema contains a dependency , where and are non-prime attributes, we say it contains a transitive dependency from to .

How do I determine which form contains missing transitive dependency?

How do I determine which POM contains missing transitive dependency? Ans. If its already there in Maven local repository, We can add that as a dependency in the project pom file with its Group Id, Artifact Id and version.

How do I determine which POM contains missing transitive dependency mvn?

Run "mvn -X" command.


1 Answers

To add to @David Crow, here's a dependency:tree example from the Maven site:

mvn dependency:tree -Dincludes=velocity:velocity 

might output

[INFO] [dependency:tree] [INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT [INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile [INFO]    \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile [INFO]       \- velocity:velocity:jar:1.4:compile 
like image 85
A. Rex Avatar answered Oct 13 '22 20:10

A. Rex