HI Benoit, Given you scenario, it really sounds as though your project is essentially a single project, and your modules should just inherit the version from the parent. Maven tools, especially the release plugin, make this easy.
If not, I would regard what you are creating is a set of interrelated projects rather than a single multi-module project, and I would suggest dispensing with keeping the versions in the parent. Instead, as long as the apis for module A are unchanged, leave B and C dependent on the previous version. They should be able to function with the old API, and you simply install the latest version of A. If you add an API to A that B needs, you simply update B to recognize the new version, while C remains unaware. The only time you would need to update a dependency version would be if you actually have to change or remove an API, or rely on changed functionality. But the multi-module project with a single shared version is the simplest approach, IMHO. Regards, Russ On Dec 20, 2013, at 3:06 PM, Benoît Berthonneau <ben...@berthonneau.com> wrote: > Hi all, > > > > I need your point of view/opinion/help on the way to version modules on > multi-modules Maven project. My question: is it really possible ? > > > > I’ve the following (simplified) Maven project: > > Parent (version 1.0) > > |__ module A (version 1.0) > > |__ module B (version 1.0, that depends on module A) > > |__ module C (version 1.0, that depends on module B and A) > > |__ module “packaging” (which create an archive with all needed > libraries/modules to start my application) > > > > All modules have their own version number (that’s the key of my question) > > Since all modules are executed in the same JVM, I need to be sure that > modules B & C are using the same version of module A. For this reason, the > version is specified in the <dependencyManagement> section of the parent. > > > > Now, I’ve updated module A (a minor modification, with no impact on > interfaces, or API), so I need to update the version to 1.1 > > This new version have to be also specified on the parent. This update force > me to update the parent to 1.1 > > This new parent version needs to be taken into account on all other modules > (B, C, packaging) > > So, I need to update B, C, packaging version to something like 1.0.1 > > > > At the end, all modules version have been changed ?!... > > > > How could I avoid this ? (I think that I have already the answer…) > > > > Thanks ! > > Benoît. > ----------------- Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video> Come read my webnovel, Take a Lemon <http://www.takealemon.com>, and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!