There's one git repo in my company that has several maven projects; they're referencing to each other, and when other projects reference to these modules, those projects would usually reference to the same version of these modules.
However, due to some legacy reason, the POM files of these projects are not pointing to a common parent. This causes a pain such that.. when one is trying to release a newer version, one would needs to update the version for every POM file, and the corresponding dependencies.
I want to have a single source of truth -- a single place to define the version, and all POM files in this repo would make use of that version variable.
This can be done by creating a parent POM. In this parent POM, I want to achieve the follow things:
Create a version variable(
settings.version
), and update each of the sub-module's POM file to use this version variable whenever possible.Take out the commonly used dependencies, and put it into the parent POM.
The above process can be done manually, but it would take lots of efforts to 1) manually find correct location to put the version variable; 2) find out the commonly used dependencies, by taking a intersect of the dependencies of each of the sub-modules.
I want to ask if there's any tools to automate process 2), and if there's any suggestion on implementing 1).
Thanks.
No comments:
Post a Comment