Affects Version/s: 2.0.8
Fix Version/s: None
Number of attachments :
I would like to be able to say, in a high-level POM:
"Whenever Foo.jar is in a dependency tree in version 2.0 or above, Bar.jar version 1.0 or below should not also be in that same dependency tree."
- There once was Foo, version 1.0.
- Then came along the Bar extension, also version 1.0, to be used alongside Foo 1.0.
- Later, a new version 2.0 of Foo was released, that included the Bar functionality (also updated); so Foo 2.0 made Bar 1.0 obsolete.
Presently, Maven will happily provide Bar 1.0 alongside with Foo 2.0, thus ushering us into JAR hell. It is then up to JAR lottery which of Bar 1.0 or Foo 2.0's Bar we actually get.
What I want is a way to fix this in my own top-level POM, in dependency management.
"If I have Foo 2.0, never even think of including Bar 1.0 also."
- Analyze all low-level POMs.
- Most use Foo 1.0, leave those alone. (Unfortunately, Foo 2.0 is not without issues.)
- Find the few that do use Foo 2.0.
- Figure out all transitive dependencies of such a POM that pull in Bar 1.0.
- Apply <exclude> to those.
Regards, and thank you for providing fine software,