Skip to content
Benjamin Schmid edited this page May 17, 2013 · 6 revisions

This page describes the necessary tasks to carry out a new Echo release.

General release process

The process here is as follows

  1. Change the release.version in the build properties to a stable version
  2. Commit the changes & assert you have a clean working copy
  3. Create a signed Git tag for the release: git tag -s v1.2.3 and push this new tag into the central Git repository git push upstream v1.2.3
  4. Build & upload the version to Maven central using ant mvn.stage
  5. Throughly test the version
  6. Go to https://oss.sonatype.org/ and close the staging repository.
  7. Finally promote the staging repository

Releasing Maven artifacts

Prerequisites

In order to be able to upload new artifacts to the central maven repository, you need the following prerequisites

Available Maven-related build targets

The following lists the central Ant build task for Maven deployment

  • mvn.install Installs the current version into your local Maven repository
  • mvn.snapshot Uploads the current snapshot release to the configured snapshot repository
  • mvn.stage Uploads & Signs a release to the configured staging repository and promotion as version.

Performing a Snapshot release

Assert that the current release.version in the build properties points to a SNAPSHOT-Version. For example if you want to distribute a new bugfix snapshot version based on the latest 3.0.2 the proper version would be probably 3.0.3-SNAPSHOT.

A simple mvn.snapshot builds the artifacts and uploads the snapshot version to the Maven Central Snapshot Repository.

Releasing a new version into Maven Central

To achieve a new version to be visible in Maven central you need to do the following tasks

  • Build & upload the version to Maven central using ant mvn.stage
  • Close and promote the staging repository via https://oss.sonatype.org/ to propagate the changes to Maven central.

These tasks are already described in detail in the General Release Process notes.

Maven Central and release signing key credentials

Your credentials to authenticate yourself against the central maven repositories are the same as your JIRA credentials. To tell Maven your credentials for the Sonatype Repos as well as the required signing key for releases you can use the Maven settings file ~/.m2/settings.xml

<settings>
  ...
  <servers>
    ...
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>your-jira-id</username>
      <password>your-jira-pwd</password>
    </server>
  </servers>
  ...
  <!-- if you sit behind a proxy -->
   <proxies>
      <proxy>
  		<active>true</active>
  		<protocol>http</protocol> <!-- read note below! -->
  		<host>proxy</host>
  		<port>3128</port>
  		<nonProxyHosts>*.mydomain.com</nonProxyHosts>
      </proxy>
   </proxies>

   <profiles>
      <profile>
  		<id>gpg</id>
  			<properties>
    			<gpg.passphrase>signingkeypassphrasegoeshere</gpg.passphrase>
    			<gpg.keyname>releases@echo-framework.org</gpg.keyname>
  			</properties>
      </profile>
   </profiles>
</settings>
Caveat if you sit behind a network proxy

For operating in regular mode, Maven requires a HTTP proxy. But for uploading you need a HTTPS proxy. Maven doesn't seem to provide options to configure a HTTP & HTTPS proxy at once, so I resort in modifying the <protocol> value in settings.xml before & after each upload.