Reputation: 825
The tile pretty much says it all.
I often deal with a project which depends on libraries A
and B
,
where A
wants to pull in C version 1.0.0
and B
wants to pull in C version 1.5.6
.
Maven's default behavior seems to be that mvn package
succeeds, including one or the other version of C
on the classpath.
I would like to specify in my pom.xml
that maven should refuse to build the project until one of the two C
dependencies has been excluded.
Can this be done without first writing a new plugin?
Upvotes: 3
Views: 67
Reputation: 1503
The maven enforcer plugin should be able to check that, see Dependency Convergence here
Upvotes: 3