Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

How to cut a new Apache Empire-db release.

...

Make sure your system is set up correctly and that you have the needed credentials

  • you have all Maven servers defined in your settings.xml. For more information, please refer to Committer settings. This is what mine looks like:

    Code Block
    xml
    xml
    
    <?xml version="1.0"?>
    <settings>
     <servers>
        <!-- To publish a snapshot of some part of Maven -->
        <server>
          <id>apache.snapshots.https</id>
          <username>francisdb</username>
          <password>xxx</password>
        </server>
        <!-- To publish a website of some part of Maven -->
        <server>
          <id>apache.website</id>
          <username>francisdb</username>
          <filePermissions>664</filePermissions>
          <directoryPermissions>775</directoryPermissions>
        </server>
        <!-- To stage a release of some part of Maven -->
        <server>
          <id>apache.releases.https</id>
          <username>francisdb</username>
          <password>xxx</password>
        </server>
        <!-- To stage a website of some part of Maven -->
        <server>
          <id>stagingSite</id> <!-- must match hard-coded repository identifier in site:stage-deploy -->
          <username>francisdb</username>
          <filePermissions>664</filePermissions>
          <directoryPermissions>775</directoryPermissions>
        </server>
    </servers>
    
      <profiles>
        <profile>
          <id>apache-release</id>
          <properties>
            <gpg.passphrase>xxx</gpg.passphrase>
          </properties>
        </profile>
      </profiles>
    
    </settings>
    

Make sure maven uses Java 6

Download the latest JDK 6 http://www.oracle.com/technetwork/java/javase/downloads/jdk6java-archive-downloads-javase6-1637591419409.html

Create a mvn6 shell script and add it to your PATH. This script makes sure you use Java 6 to build the release.

/usr/bin/mvn6

Code Block

#!/bin/sh
JAVA_HOME="/usr/lib/jvm/java-1.6.0-sun"
mvn $@

test the script by running this command:

Code Block

>mvn6 --version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_33
Java home: /usr/lib/jvm/java-1.6.0-sun-1.6.0.33/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.28-15-generic" arch: "amd64" Family: "unix"

...

Info

You will be asked about the release versions. Make sure you enter a correct tag: apache-empire-db-[version]-rc[nr]. Once the release vote passes we can then copy this -rcX tag to the final version tag.

Code Block

>mvn6 clean install
...
>mvn6 clean release:clean
...
>mvn6 release:prepare -Papache-release
...
[INFO] Checking dependencies and plugins for snapshots ...
What is the release version for "Apache Empire-db Parent"? (org.apache.empire-db:empire-db-parent) 2.0.5: : 
What is SCM release tag or label for "Apache Empire-db Parent"? (org.apache.empire-db:empire-db-parent) empire-db-parent-2.0.5: : apache-empire-db-2.0.5-rc3
What is the new development version for "Apache Empire-db Parent"? (org.apache.empire-db:empire-db-parent) 2.0.6-SNAPSHOT: : 
[INFO] Transforming 'Apache Empire-db Parent'...
[INFO] Updating empire-db to 2.0.5
...

...

If anything goes wrong during the release you can do a rollback:

Code Block

>mvn6 release:rollback

Also run a svn diff/revert to make sure your working copy is clean

...

This step will upload the artifacts the the staging repository

Code Block

>mvn6 release:perform

Close the staging repository

...

TODO we might want to switch to https://dist.apache.org/repos/dist/dev/<TLP name>/
as explained here: http://www.apache.org/dev/release#upload-ci

Code Block

>cd target/checkout/empire-db-dist (we want to have the same artifacts in the dist as in the repo)
>./checksums.sh
...
All Done. Files available in ./target

...

this might not work, not tested, probably creates new artifacts instead of using existing ones

Code Block

>svn checkout https://svn.apache.org/repos/asf/empire-db/tags/apache-empire-db-2.0.5-rc3
...
>cd apache-empire-db-2.0.5-rc3/empire-db-dist/
>mvn6 clean install -Papache-release
>./checksums.sh
...
All Done. Files available in ./target

Now upload the generated files + rat report to your apache personal directory.

Code Block

>cd target/
>scp * people.apache.org:~/public_html/empire-db

Now remove the .pom on the remote machine (and clean up old files)

Code Block

>ssh people.apache.org
>rm public_html/empire-db/apache-empire-db*.pom*
>exit

...

  • Drop the staging repository in nexus
  • Update the local code
  • Use the maven versions plugin to roll back the version update

    Code Block
    
    > mvn versions:set -DnewVersion=2.0.7-SNAPSHOT -Papache-release -DgenerateBackupPoms=false
    
  • Commit the project
  • Go to the create new RC step

...

Just use your prefered subversion tool to copy the rc tag to the final release tag
apache-empire-db-2.0.5-rc3 -> apache-empire-db-2.0.5

Code Block

svn copy https://svn.apache.org/repos/asf/empire-db/tags/apache-empire-db-2.4.0-rc2 https://svn.apache.org/repos/asf/empire-db/tags/apache-empire-db-2.4.0

...

Maybe send the release to some other sites as well (dzone) / do a blog post about it...