We run multiple sites and build their code with Maven.
Each site has its own pom.xml, several have submodules.
Site B has a dependency on a submodule from site A.
Site B finds this dependency in the .m2/repository.
Currently, site B's pom.xml specifies the dependency name and version.
We're wondering how to handle versioning of submodules in terms of our development and release process, as well as in relation to a site that depends on a submodule from another like site B does to site A.
For the main site, should we increment the version of the submodules for every snapshot and release (keeping everything with the same version number), or only change submodule version if the submodule changes?
Is there some way, other than by communicating the new version, and editing the pom.xml of site B, updating the dependency version, to tell site B there is a new version of the submodule to look for?
We tried removing the version from the dependency specification in the site B pom.xml, but saw then that it looked for the dependency/submodule to have the same version as site B's code.
I'm guessing we could setup something in Jenkins to update pom.xml dependencies when versions change ... but maybe there is a better way?
I just saw this, which is very helpful (e.g. "release" and "latest") ...
How do I tell Maven to use the latest version of a dependency?