Transitive dependency means that if A depends on B and B depends on C, then A depends on both B and C. Sometimes, transitivity brings a very serious problem when different versions of the same artifacts are included by different dependencies. It may cause version mismatch issues in runtime.
Run "mvn -X" command.
With eclipse, you should try to edit the pom. There's a special tab named "Dependencies". From there, you should see your parent dependencies + you could consider choosing what version of dependency you want to keep.
On the CLI, use mvn dependency:tree
(Here are some additional Usage notes)
When running dependency:tree
on multi-module maven project, use mvn compile dependency:tree
instead1.
Otherwise, the POM Editor in M2Eclipse (Maven integration for Eclipse) is very good, and it includes a hierarchical dependency view.
1If you don't compile, you might get error Failed to execute goal on project baseproject: Could not resolve dependencies for project com.company:childproject:jar:1.0.0: Could not find artifact
. This might happen because dependency:tree
command doesn't build projects and doesn't resolve dependencies, and your projects are not installed in maven repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With