I\'m setting up Hudson to use the batch-task plugin to do maven releases to our internal repository. I\'m doing it via:
mvn --batch-mode release:prepare
mvn --ba
Recently, a m2release plugin came to my attention. Seemed nice. Althought, I would have liked my release process to be completely «pom-tweaking-free». What I mean by that is that we have to provide 4 input parameter to process a complete release:
The first 2 have acceptable defaults. The version bumping at the bug-fix version digit is perfectly fine for me.
Number 4 can be specified in the pom. It won't change.
org.apache.maven.plugins
maven-release-plugin
https://example.com/svn/myProject/releases
It's the third one that prevent me from a complete automation of a release at the push of a button. The default release tag label won't do it for us so we have to specify it:
org.apache.maven.plugins
maven-release-plugin
release-${pom.version}
https://example.com/svn/myProject/releases
Now, while this might be just what I needed, I end up having a svn tag with the -SNAPSHOT at the end. :( So I have to pass the tag parameter in the Hudson job configuration. Furthermore, I have to go change it for each release we make ... which is not exactly what I need.
So, in the end, having a maven2 type project in hudson + the m2release hudson plugin + the maven release plugin correctly configured is the Mother of all the release process I've seen so far. While not perfect, it saved me a lot tiedous work.
JS.