Useful Sonatype Links

For lack of a better place at this time, here's some useful pages on Sonatype which detail the Sonatype Maven Release Process:


Release Numbering Convention

As agreed by the Steering Group, VIVO follows the Semantic Versioning guidelines - http://semver.org/

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.


Prerequisites

Verify Release Priveleges

To perform a release, you must have all of the following:

  1. Write access to the Vitro and VIVO GitHub repositories hosted at GitHub
  2. Write access to the org.vivoweb groupId in the snapshot and staging repositories hosted at oss.sonatype.org.  If you don't already have this, you will need to:
    1. Sign up for a Sonatype JIRA account. This account will also serve as your login to the Sonatype OSS system. (If you already have a Sonatype account, you can skip this step)
    2. Ask a Committer with release privileges (e.g. a previous release manager) to request that your Sonatype account be given release privileges to the "org.vivoweb" GroupID. This request should be submitted via the Sonatype JIRA system in the Open Source Project Repository Hosting project.
    3. Once Sonatype gives you the proper authorization, you should be able to login to the Sonatype OSS system using the same login/password you setup in Sonatype JIRA. You should also have access to publish new releases to the "org.vivoweb" GroupID.
    4. NOTE: The full details of signing up and getting access to Sonatype are also posted online here: Sonatype Maven Repository Usage Guide
  3. You must generate and publish your own personal Code Signing Key (required by Sonatype). Here are two sites that give hints on how to do that:

Update Maven settings.xml

Vitro and VIVO root pom.xml already has the correct staging and snapshot repositories listed in the OSS parent's '<distributionManagement>' section.  In order to deploy, you will need to add your Sonatype OSS username and password to your local ~/.m2/settings.xml file. For example:


<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <profiles>
    <id>ossrh</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
       <gpg.keyname>YourKeyName</gpg.keyname>
       <gpg.passphrase>YourKeyPassphrase</gpg.passphrase>
       <gpg.defaultKeyring>false</gpg.defaultKeyring>
       <gpg.useagent>true</gpg.useagent>
       <gpg.lockmode>never</gpg.lockmode>
       <gpg.homedir>YourGPGDir</gpg.homedir>
       <gpg.publicKeyring>YourGPGDir/pubring.gpg</gpg.publicKeyring>
       <gpg.secretKeyring>YourGPGDir/secring.gpg</gpg.secretKeyring>
    </properties>
  </profiles>
  <servers>
    <!--Login info for Sonatype SnapShot repository-->
    <server>
      <id>ossrh</id>
      <username>YourSonatypeUsername</username>
      <password>YourSonatypePassword</password>
    </server>
  </servers>
</settings>

If you don't yet have a ~/.m2/settings.xml file, you should create one, and copy the full contents above (obviously make sure to put in your username and password, and GPG details).

Making a Snapshot Release (e.g. 'vivo-x.y.z-SNAPSHOT')

One Step Process

From a clean, up-to-date copy of master/branch, run the following command:

  • mvn clean deploy -Prelease

If you run this from the Vitro directory, it will only release the Vitro artefacts. If you release from VIVO - and have the Vitro checkout alongside - it will release artefacts from BOTH projects.

The snapshot will be immediately available in the public Sonatype repository: http://oss.sonatype.org/content/groups/public

Making an Official Release (e.g. 'vivo-x.y.z' or 'vivo-x.y.z-rc1')

Setting The Version Numbers

In order to update the version number, you can run the following command:

  • mvn versions:set

And enter the new version number - e.g. 1.9.0-rc1. You MUST do this - and use the same version number - in all of the following locations:

  • /Vitro
  • /Vitro/installer
  • /VIVO
  • /VIVO/installer

The reason that you have to update Vitro and VIVO, and the installer projects separately, is because each of them are "roots" of multi module projects (the installer is a "root" because it can be distributed and used separately, and if it chained into the top level projects, would cause the release process to fail).

Release The Project

With the version numbers set, you can run the following command:

  • mvn clean deploy -Prelease

Like above, if you run this from VIVO, and have the Vitro project next to it, then this will release all the artefacts in one go. Otherwise, you have to do Vitro and the VIVO.

Once the command completes successfully, you need to log in to the Sonatype server to check the uploaded files and to deploy them to Maven central

For More Information

 

These same steps are also covered in the Sonatype Maven Repository Usage Guide

  • No labels