Transitive dependencies and dependency:tree
On This Lesson 4 topics
The content for this lesson is written and waiting for review. The outline below shows what it covers. It will be published once it is approved.
In this lesson
see everything your project really pulls in.
Planned topics
- Your dependency has its own dependencies. These are transitive.
- Like the supplier who brings the ingredients' ingredients.
mvn dependency:treeprints the whole tree.- Use it to find where a library comes from and why it is there.
- More transitive jars means more risk: size, conflicts, security.
Draft outline details
Demonstration
[INFO] com.shop:shop-core:jar:1.0
[INFO] +- com.google.guava:guava:jar:33.0.0:compile
[INFO] | \- com.google.guava:failureaccess:jar:1.0.2:compile(Versions are examples; verify before recording.)
Check your understanding
Which command shows transitive dependencies?
Show answer
mvn dependency:tree.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.