Version 3

    Or, How to Release WIthout the Release Plugin

    The Process:

    1. Prepare your branch or trunk for release by bumping your versions.
      1. Bump the version in your POMs, Java source, etc.  I do this with perl and find:
          perl -pi -e 's/1.2.0-SNAPSHOT/1.2.0.GA/g' `find . -name \*.xml -or -name \*.java`
      2. Then commit: svn commit -m 'Prepare 1.2.0.GA'
    2. Tag your branch or trunk: svn cp -m 'Tag 1.2.0.GA'
    3. Do a clean deploy.
      1. mvn clean install
      2. mvn deploy -DaltDeploymentRepository=jboss::default::file:///home/david/src/java/repos-maven2
    4. Commit your new artifacts to the repository.
      1. cd /home/david/src/java/repos-maven2/org/jboss/groupId
      2. svn status and svn diff, verify everything is correct
      3. svn commit -m 'Release Foo 1.2.0.GA'
    5. Return to your branch or trunk, and bump your versions for the next version.
      1. Perl and find: perl -pi -e 's/1.2.0.GA/1.3.0-SNAPSHOT/g' `find . -name \*.xml -or -name \*.java`
      2. Then commit: svn commit -m 'Next is 1.3.0'
    6. Done.  The whole thing takes me 3 minutes.


    The Details:

    1. Before you can use this process, you need to have the repository (at least partially) checked out.  I do this with a non-recursive checkout:
      1. svn co -N repos-maven2
      2. cd repos-maven2
      3. svn up -N org && cd org
      4. svn up -N jboss && cd jboss
      5. svn up foo (pull in the whole subtree)
    2. I also have a shell script which replaces mvn deploy -DaltDeploymentRepository=jboss::default::file:///home/david/src/java/repos-maven2 with a shorter command mvn-deploy.
    3. To prevent your aggregator module from publishing an artifact to the repository, add the following snippet (credit to Pete Muir):