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 release version (ex. 1.0.0)
- the new development version (ex. 1.0.1-SNAPSHOT)
- the release tag in SCM (ex. release-1.0.0 or 1.0.0)
- the tag base path in SCM
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.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://example.com/svn/myProject/releases</tagBase>
</configuration>
</plugin>
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:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tag>release-${pom.version}</tag>
<tagBase>https://example.com/svn/myProject/releases</tagBase>
</configuration>
</plugin>
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.