1

I have different maven projects to maintain and would like to aligned the used versions of the dependencies.

My goal would be to scan all the POMs (they are not necessary parent/child poms) for their dependencies and if there is a dependency to the same artifact it should compare the versions and list them if they don't match - so that I can see if there is a reason for having different versions.

Is there any tooling support for that task - or would I have to implement something my self?

PaulEdison
  • 897
  • 1
  • 15
  • 36

1 Answers1

2

You can write a BOM with the desired versions (i.e. a pom that only contains dependencyManagement that lists the artifacts with versions). Now you can either import the BOM in all of your projects or you can use versions:compare-dependencies to compare the versions in a project with the versions in the BOM.

This is not exactly what you suggested but I do not anything that comes closer (without scripting the task yourself).

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • This seems to me like a next step - but not for all projects (not all that common/coupled together). For me first I would like to know the differences/dependency versions - to make it possible to consolidate them also among not so much related projects. the compare would also work as is so only between two of them BOM vs project not all. But thanks for that good hint (will use the BOM for other purposes!). – PaulEdison Jul 24 '18 at 12:16