-
Notifications
You must be signed in to change notification settings - Fork 73
Release Management
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.
You'll need commit privileges on the OneBusAway Git repository for the module you wish to release.
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:
- Specifies your GPG passphrase to use when signing releases (more on that later)
- Specifies that when the
oba-distribution
profile is active, we change the distribution points to be the OneBusAway Maven repository - Specifies the username and password for deployment to the https://oss.sonatype.org/ Nexus staging repository.
- Specifies the username and password for the OneBusAway Maven repository
- Specifies the username and ssh private key for accessing the http://developer.onebusaway.org/ server for deploying site documentation.
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
Typically, when working with an existing project, most of the project configuration will have already been taken care of.
Now that you've got everything ready to go, it's time to perform a release.
mvn release:prepare
mvn release:perform