Multimodule maven release with tags per module
Assume the following project structure for a Maven-based Java project:
xx-parent
xx-moduleA
xx-moduleB
xx-moduleC/submodule1
xx-moduleC/submodule2
xx-moduleC/submodule3
The project structure in Subversion is as follows:
xx-parent/trunk
xx-moduleA/trunk
xx-moduleB/trunk
xx-moduleC/trunk/submodule1
xx-moduleC/trunk/submodule2
xx-moduleC/trunk/submodule3
My goal is to create tags per module when performing a release:
xx-parent/tags/xx-parent-1.0
xx-moduleA/tags/xx-moduleA-1.0
xx-moduleB/tags/xx-moduleB-1.0
xx-moduleC/tags/xx-moduleC-1.0
In the past, each module was built and released separately. As the project grew larger (30 modules), the time to build a release increased. I would like to change the project to a multi-module set up to perform a reactor build and release. Building doesn't seem to be a problem, but creating tags per module is.
The maven-release-plugin seems to insist on making only a single tag for the whole project/release. I'm looking for a way to create multiple tags, e.g. a tag per module.
<module>../xx-moduleB</module>
<scm>
elements in the pom.xml
, but they are not used when performing a reactor release.mvn --batch-mode -DcommitPerProject=true -DautoVersionSubmodules=true -Drelease.version=1.0.6 release:prepare release:perform
<scm>
tag with invalid URLs, e.g. nested "trunk"-tags under the xx-parent tagHow can I set up this project with a Maven release process, a multi-module layout and still get separate tags per module?
http://jira.codehaus.org/browse/MRELEASE-261 (Closed) and MRELEASE-561 (Open)
According to Arnaud Héritier (an Apache Maven PMC member),
Maven can't handle composite applications like module-A v0.1, module-B v0.3.
Maven consider a project and all his sub-modules as a unique set.
see: http://blog.aheritier.net/maven-release-plugin-2-0/ (9 June 2010)
Maybe the situation changed since with Maven 3 ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With