Skip to content

Release Instructions

Neale Upstone edited this page Jun 3, 2013 · 14 revisions

Preparation

  • Don't run anything on port 8080 (such as other tests etc) as you'll interfere with the build
  • Ensure your working directory is entirely free of uncommitted files and changes.
  • Check that your gpg keys can be found by typing gpg --list-keys If not, you need to copy them to where expected, which if you're on Windows 7 is /Users/{user}/AppData/Roaming/gnupg
  • Check you've got your maven central server creds set up in settings.xml
  • Including your gpg passphrase, which I add to the central profile:
    <profile>
      <id>central</id>
      <properties>
        <gpg.passphrase>XXXXX</gpg.passphrase>
        <arguments>-Dgpg.passphrase=XXXX</arguments>
      </properties>
    </profile>

Configure your the release plugin as follows (the release profile can do things like generate sources and javadoc):

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <releaseProfiles>release,central</releaseProfiles>
                <autoVersionSubmodules>true</autoVersionSubmodules>
                <tagNameFormat>release-@{project.version}</tagNameFormat>
            </configuration>
        </plugin>

WARNING: Do NOT run other builds at the same time. If they have clashes on things like Jetty ports for UI/WebService tests, then the build will fail.

Procedure Using Maven 3.0.4

###Dry Run

Check gpg by something like

mvn clean verify -Pcentral,release

Perform a dry run

mvn release:prepare -DdryRun=true -DautoVersionSubmodules=true -Pcentral,release

Example versions to enter:

  • release = 1.0.0.M3
  • tag = 1.0.0.M3
  • next dev version = 1.0.0.M4-SNAPSHOT

Prepare the Release

Note that having done a dry run you need to set resume=false or done release:clean

mvn release:prepare -Pcentral,release -Dresume=false -DautoVersionSubmodules=true

Perform the Release

Note: Ensure that you can login to https://oss.sonatype.org/ with the credentials in your settings.xml

If not, then you need to set your password at https://issues.sonatype.org

This can be a PITA, so I prefer (NOTE: clean is important, and DON'T use -Pfast as it'll skip javadoc)

git checkout [tagName]
mvn clean deploy -Pcentral,release -DskipTests

over

mvn release:perform -Darguments=-Dgpg.passphrase=xxxxxxxx -Pcentral,release

References