Reputation: 71
What are the conditions to be met when using the <properties></properties
tag to override a transitive dependency in maven? For example, in this sample github project (https://github.com/Richou/swagger-codegen-maven-plugin) I want to override the version of slf4j-ext used in swagger-codegen by defining the required version inside <properties>
tag in the parent pom. What are the conditions for that?
NOTE: I understand that <dependencyManagement>
can be used for this purpose but I want to get better insight on version overriding and how the pom works.
Upvotes: 1
Views: 1644
Reputation: 2333
Typically you need to define a transitive dependency by tagging to a specific version.
lets say:
in the first case you can use dependency exclusion like explained here https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html#dependency-exclusions
In the later case you need to verify if your transitive dependency will work or if you need also to exclude the transitive dependency.
to upgrade the
Upvotes: 0