Transitive dependencies

One of Maven's major contributions is the way it deals and manages not only direct dependencies, but also transitive ones.

The concept of transitivity

Dependencies are transitive. This means that if A depends on B and B depends on C, then A depends on both B and C. Theoretically, there is no limit to the depth of dependency. So, if you observe the following diagram of the tree of dependencies, you will notice that by transitivity, A depends on B, C, D, … until Z:

The concept of transitivity

Even worse, we could have added a bit of complexity in mixing different versions of the same artifacts. In this very example with A as root project, B and C are level ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.