In my project I see the following when issuing mvn dependency:tree -Dverbose
:
[INFO] | | \- xalan:xalan:jar:2.7.2:compile (version managed from 2.7.0) [INFO] | | \- xalan:serializer:jar:2.7.2:compile
Does this version managed
mean Xalan 2.7.2 overrides 2.7.0?
Note: In my parent pom I have 2.7.2 under dependencyManagement
.
Multiple transitive dependencies can be excluded by using the <exclusion> tag for each of the dependency you want to exclude and placing all these exclusion tags inside the <exclusions> tag in pom. xml. You will need to mention the group id and artifact id of the dependency you wish to exclude in the exclusion tag.
Enforcer can help developers solve dependency conflicts in Maven by analyzing all libraries declared in the POM file. The plugin uses a lot of different rules, but we are only interested in one: dependencyConvergence – ensures all dependencies converge to the same version.
One way to resolve a version collision is by removing a conflicting transitive dependency from specific artifacts. In our example, we don't want to have the com. google. guava library transitively added from the project-a artifact.
Yes, your understanding is correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With