Dependency management is implied to be transitive. There doesn't need to be a special rule for this, but rather it's a consequence of the already mentioned rules: Transitive Dependencies.
Consider this example structure:
- your module
A
- dependency
D
- transitive dependency
B
- dependency
D
- transitive dependency
When A
or B
are built, their corresponding dependencyManagement
section is checked to pick version for D
, if it's not explicitly specified. Here's the important part: exactly the same process is used when A
or B
are used as dependencies to determine which version of D
they depend on. Consequently, they do not affect each other in any way.
This could result, for example, in A
depending on D:1.0
, and B
depending on D:1.1
, their dependencyManagement
sections have already been applied at this point to determine this and will not be taken into account anymore. With this information as input, dependency mediation rules are applied to pick just one version of D
for your module.
Dependency mediation rules are also described in the linked page. But in a nutshell, the nearest definition wins and ties are broken based on order. Naturally, definitions in your module itself are always the nearest.
Now let's say your module is used as a dependency. Your project could depend on D:1.2
based on all the rules above due to a definition in your dependencyManagement
section, but that's where the scope of your dependencyManagement
ends.
(Note that import
scope is an exception as it behaves completely differently from the other scopes.)