Title says it all. Given a dependency, how can I get a tree of its dependencies?
Let's say I want to target org.hibernate:hibernate-core:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.24.Final</version>
</dependency>
As a result I want:
[INFO] | \- org.hibernate:hibernate-core:jar:5.4.24.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] | +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.10.17:compile
[INFO] | +- antlr:antlr:jar:2.7.7:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:compile
[INFO] | +- org.jboss:jandex:jar:2.1.3.Final:compile
[INFO] | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile
I tried:
mvn dependency:tree -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=5.4.24.Final
But It does not work.
:tree
or :list
does not matter. All I want is the dependencies of a dependency in my project.
If I mvn dependency:tree -Dincludes=org.hibernate:hibernate-core
I get:
[INFO] \- org.hibernate:hibernate-core:jar:5.4.24.Final:compile
and its dependencies are missing.
There is this online "tool" that does exactly what I want. Is it possible to do it with a mvn command?