Skip to content
Ameen Abozaid
In reviewJNR-002-L02

Transitive dependencies and dependency:tree

  • Lesson 2 of 8
  • 11 min read
  • Junior
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:tree prints 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

text
[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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.