releasing guanxi the mechanics

Tue, Nov 25, 2008

This was all fairly simple before I moved to maven. I wrote a fairly lengthy Ant task that would gather together CVS tags and make binary and source releases of the software. With the switch to Maven I could now use:

mvn release:prepare -DdryRun=true -Dusername=USERNAME
mvn release:clean release:prepare -Dusername=USERNAME
I first created a new branch for Guanxi::Core, guanxi-core-2_0_0 and then tried out the above commands. What resulted though was a local guanxi-core-2.0.0.jar with the pom in CVS being updated to 2.0.1-SNAPSHOT, which is not the release at all. If I make a 2.0.0 release, I expect to be able to checkout the source and build guanxi-core-2.0.0.jar, not guanxi-core-2.0.1-SNAPSHOT.jar. So that’s maven out of the question for now, at least until I can understand why it should do this.

The most reliable way for the moment is to create a release branch:

cd IdP2
cvs tag -b guanxi-idp-2_0_0
cd somwhereelse
cvs co -P -r guanxi-idp-2_0_0 IdP2
cd IdP2
vi pom.xml
change all SNAPSHOT dependencies to their released versions
cvs commit pom.xml
mvn clean install
mvn deploy
That then produces a Guanxi::IdP 2.0.0 release with the source available from:
cvs co -P -r guanxi-idp-2_0_0 IdP2
and the compiled JAR available from http://source.uhi.ac.uk/mvn/org/guanxi/guanxi-idp/2.0.0/guanxi-idp-2.0.0.jar

That means I then just up the SNAPSHOT levels of the modules in HEAD and continue developing. No need to merge from the release branches as the only things that have changed are the poms, which have stepped up a level from SNAPSHOT to live.

comments powered by Disqus