How to create and announce an ActiveMQ release.

Maven 2 Setup

Before you deploy anything to the maven repository using Maven 2, you should configure your ~/.m2/settings.xml file
so that the file permissions of the deployed artifacts are group writeable. If you do not do this, other developers will not able to overwrite your SNAPSHOT releases with newer versions.

<settings>
  ...
  <servers>

    <server>
      <id>apache-repo</id>
      <username>chirino</username>
      <directoryPermissions>775</directoryPermissions>
      <filePermissions>664</filePermissions>
    </server>
    <server>
      <id>apache-snapshots</id>
      <username>chirino</username>
      <directoryPermissions>775</directoryPermissions>
      <filePermissions>664</filePermissions>
    </server>
    <server>
      <id>apache-website</id>
      <username>chirino</username>
      <directoryPermissions>775</directoryPermissions>
      <filePermissions>664</filePermissions>
    </server>

  </servers>
  ...
</settings>

It is also essential that you configure your umask to 2 on people.apache.org for non-interactive login. If your shell is tcsh you can edit .cshrc to include

umask 2

Other shell initialization files may interfere with this setting but if this is the only umask setting it appears to work. Instructions for other shells would be welcome.

Additional local configuration for using release and staging plugins.

To effectively use the release and staging plugins you need some information about where the staging will happen and signing information for gpg. Your ~/.m2/settings.xml should contain a profile like this:

<settings>
    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <gpg.passphrase>secretPhrase</gpg.passphrase>
                <staging.altRepository>apache.releases::default::scp://people.apache.org/x1/home/[your apache id]/public_html/staging-repos</deploy.altRepository>
                <staging.siteURL>scp://people.apache.org/x1/home/[your apache id]/public_html/staging-sites</staging.siteURL>
           </properties>
        </profile>
        <profile>
            <!-- use for local site deploy testing and local deploy testing -->
            <!-- this is NOT needed to actually release but is useful for checking -->
            <id>local</id>
            <properties>
                <gpg.passphrase>secretPhrase</gpg.passphrase>
                <staging.altRepository>djencks::default::file://[home directory]/staging-repos</deploy.altRepository>
                <staging.siteURL>file://[home directory]/staging-sites</staging.siteURL>
            </properties>
        </profile>
    </profiles>
 ...
</settings>

Creating the ActiveMQ 5.x and 4.x Release, New method using release and staging plugins

  1. Do a release dry run to check for problems
    mvn release:prepare -DdryRun=true -Prelease

    Check that you are happy with the results. The poms for the proposed tags will be in pom.xml.tag. When you like the results, clean up:

    mvn release:clean
  2. Prepare the release
    mvn release:prepare -Prelease

    This will create the tag in svn and leave various stuff around locally to direct the perform phase.

  3. Make a local copy of the release configuration in case something goes wrong
    cd ..
    cp -r activemq-4.1-temp activemq-4.1-temp-prepared
    cd activemq-4.1-temp
  4. Perform the release to the staging repo
    mvn release:perform -Prelease

    This uses both the activemq release profile which directs building source jars, javadoc jars, and signing everything, and also the settings release profile that says where to
    put stuff and how to sign it.

  5. Stage the maven generated site
    Note that the -Prelease profile is needed to specify the profile in settings.xml that configures the staging location.
    Build the site from the tag that release:perform checked out into target/checkout in the previous step.
    cd target/checkout
    mvn site site:deploy -Prelease

    This will copy to the staging.siteURL set up in your settings.xml release profile.

  6. Call a vote on the dev list, listing the great new features of the release.
  7. After it passes, use the staging plugin to get the release into the apache m2 sync repo
    mvn stage:copy -Dsource="http://people.apache.org/~<your apache id>/staging-repos/<siteId>" \
      -Dtarget="scp://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository" \
      -Dversion=2.3 \
      -DtargetRepositoryId=apache.releases
    

    The version parameter is currently ignored and the entire staging repository is synced, not just the given version or the current project. It still needs to be provided, though.

  8. Deploy the versioned website
    (this is not yet tested)
    ssh [apacheId]@people.apache.org
    chgrp -R activemq public_html/staging-sites/[siteId]
    cp -r public_html/staging-sites/[siteId] /www/activemq.apache.org/activemq/
    
  9. Continue with the Announcing section below

Creating the ActiveMQ 4.x Release, Old method

  1. Grab the latest source from SVN
    svn co https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1
    cd activemq-4.1
  2. Change the version number, use the following script, change the X with the next bug fix release version:
    VERSION=4.1.X
    find . -type f -name 'pom.xml' -print | grep -v .svn | grep -v target | while read filename 
    do (
      echo "Editing $filename"
      sed "s/<version>4.1-SNAPSHOT<\/version>/<version>$VERSION<\/version>/g;" $filename > $filename.sed
      mv $filename.sed $filename
    )
    done
    sed "s/<activemq-version>4.1-SNAPSHOT<\/activemq-version>/<activemq-version>$VERSION<\/activemq-version>/g;" pom.xml > pom.xml.sed
    mv pom.xml.sed pom.xml
  3. Let Maven build, test, package, and deploy the binaries
    mvn source:jar deploy -Ddist-repo-url=file:../m2-dist-repo -Dm1-dist-repo-url=file:../m1-dist-repo
  4. Tag the release using your local workspace to a new activemq-4.1.X label
    svn copy ../activemq-4.1 https://svn.apache.org/repos/asf/activemq/tags/activemq-4.1.X -m "ActiveMQ 4.1.X Release"
  5. A Maven 1 and Maven 2 repo will have been created in the ./m2-dist-repo and ./m1-dist-repo
  6. Sign the artifacts with GPG and upload to your home directory so that a VOTE can be called on the binaries

Announcing the ActiveMQ Release

  1. Perform a release in JIRA and create a new release version in JIRA
  2. Create a download page for the release in the WIKI similar like the ActiveMQ 3.0 Release
  3. Update the Xml Reference page with a link to the HTML and XSD
  4. Mail the dev & user lists
  5. Post a news entry on the WIKI
  6. Have a beer!
Graphic Design By Hiram