I'm writing a Jenkins plugin. Once in a while, I get a dependency conflict that needs to be addressed by using an entry in the dependencyManagement
section as described in the Maven documentation.
I tried using the dependencyConvergence
rule from maven-enforcer-plugin to resolve all potential conflicts. That forced me to write 28 entries to the dependencyManagement
section.
When making those entries, I would simply select the oldest version that would satisfy all dependencies, i.e. the newest of the required versions. Things would be so much easier if Maven would just do it for me, but it looks like they are not going to support it.
I'm fine with having a long dependencyManagement
section if it's maintainable, i.e. if I can refresh easily it once I update the dependencies. But I'm afraid it's not the case.
How do I resolve dependencies without letting dependencyManagement
become a mess over time?
Is there any tool to generate dependencyManagement
to satisfy dependencyConvergence
? Is there any tool to purge useless entries in dependencyManagement
? Or maybe somebody wrote a better VersionSelector
implementation for Maven?