Skip to content
bdferris edited this page Feb 19, 2012 · 13 revisions

The OneBusAway project is composed of a number of Maven modules. Every once in a while, when the stars and the patches align, a module is deemed ready for an official release. This page attempts to document everything you'll need to perform an official release of a OneBusAway module. Typically, this information will only be useful to a handful of core OneBusAway project managers.

The typical Maven release process looks like:

mvn release:prepare
mvn release:perform

and it's pretty much the same for OneBusAway. The trick is making sure you have all the proper permissions and credentials to perform the release.

Before You Release

Commit Privileges

You'll need commit privileges on the OneBusAway Git repository for the module you wish to release.

Configure your ~/.m2/settings.xml File

You'll need a couple of entries in your ~/.m2/settings.xml Maven settings file.

<profiles>
  <profile>
    <id>onebusaway-release</id>
    <properties>
      <gpg.passphrase>########</gpg.passphrase>
    </properties>
  </profile>
  <profile>
    <id>oss-distribution</id>
    <properties>
      <distribution_id>sonatype-nexus-staging</distribution_id>
      <distribution_name>Sonatype Nexus Release Repository</distribution_name>
      <distribution_url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</distribution_url>
      <snapshot_distribution_id>sonatype-nexus-snapshots</snapshot_distribution_id>
      <snapshot_distribution_name>Sonatype Nexus Snapshots Repository</snapshot_distribution_name>
    </properties>
  </profile>
</profiles>
<servers>
  <server>
    <id>sonatype-nexus-staging</id>
    <username>contact_onebusaway</username>
    <password>########</password>
  </server>
  <server>
    <id>nexus.onebusaway.org-releases</id>
    <username>deployment</username>
    <password>########</password>
  </server>
  <server>
    <id>developer.onebusaway.org</id>
    <username>onebus</username>
    <privateKey>path/to/id_rsa</privateKey>
  </server>
</servers>

This does a couple of things:

GPG Key

We sign our Maven releases with a GPG key so that others can verify that they really came from us. You'll need both the OneBusAway public and private key. Once you have them, you import them into your GPG keystore with the following commands:

gpg --import public.key
gpg --allow-secret-key-import --import private.key

If you ever need to export the keys:

gpg --export -a "OneBusAway Contact" > public.key
gpg --export-secret-key -a "OneBusAway Contact" > public.key

Project Configuration

Typically, when working with an existing project, most of the project configuration will have already been taken care of.

Perform a Release

Now that you've got everything ready to go, it's time to perform a release.

mvn release:prepare
mvn release:perform