Reputation: 3225
Let's say I have 3 libs, compiled using Maven: A, B and C.
And let's say I have this project:
Dependency C is included in A and B.
After compiling My project
, dependency C
will be present by 3 times? Or just once?
All of them use same version of C
Upvotes: 0
Views: 297
Reputation: 5348
Before Java 9, you will have only one version, decided by Maven dependency mediation. Java 9+, if those dependencies are modules, each module can use the dependency they have listed.
Upvotes: 0
Reputation: 35785
Maven manages transitive dependencies in a way that of each artifact, only one version will be used for the project.
If you have different versions, the version is decided by Maven dependency mediation.
Upvotes: 1