For lack of a better place at this time, here's some useful pages on Sonatype which detail the Sonatype Maven Release Process: |
As agreed by the Steering Group, VIVO follows the Semantic Versioning guidelines - http://semver.org/
To perform a release, you must have all of the following:
hkp://pgp.mit.edu
, as this is the Key Server Sonatype uses for verification:gpg --keyserver hkp://pgp.mit.edu --send-keys [yourKeyID]
[yourKeyId]
can be found by running the following command and copying the alpha-numeric string after the "/" on the "pub" line
gpg --list-keys
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).
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
In order to update the version number, you can run the following command:
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:
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).
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 |