Note that the following instruction are still in development
The following are details related to OPS4J release process and is to be used by those OPS4J members that are able to release OPS4J artifacts, such as Alin Dreghiciu, Niclas Hedhman, Stuart McCulloch, Toni Menzel.
The instructions bellow are assuming that your project pom has as parent (direct or indirect) org.ops4j.pax:master
pom.
Before releasing
Before starting the release process ensure that:
- there are no snapshot dependencies in the project to be released
- ...
Prepare the release
From a command line run the following:
mvn -Prelease,<reposProfile> -Darguments="-Prelease,<reposProfile>" release:prepare
where reposProfile
should be replaced with one of the profiles described bellow, as follows:
repos.ops4j
mvn -Prelease,repos.ops4j -Darguments="-Prelease,repos.ops4j" release:prepare
repos.sonatype
mvn -Prelease,repos.sonatype -Darguments="-Prelease,repos.sonatype" release:prepare
repos.sonatype.staging
mvn -Prelease,repos.sonatype.staging -Darguments="-Prelease,repos.sonatype.staging" release:prepare
Performing the release
From a command line run the following:
mvn -Prelease,<reposProfile> -Darguments="-Prelease,<reposProfile>" release:perform
where reposProfile
should be replaced with one of the profiles described bellow, as follows:
repos.ops4j
mvn -Prelease,repos.ops4j -Darguments="-Prelease,repos.ops4j" release:perform
repos.sonatype
mvn -Prelease,repos.sonatype -Darguments="-Prelease,repos.sonatype" release:perform
repos.sonatype.staging
mvn -Prelease,repos.sonatype.staging -Darguments="-Prelease,repos.sonatype.staging" release:perform
Jira
In the admin section of the released project us the "Release" button to mark the version as released and create the next version. Then close all issues related to just released version using a comment as "Released under x.y".
Change log
Create a change log in Confluence (wiki).
Here is an example from Pax Runner.
Release announcement
Create a news item announcing the release. The announcement should eventually include the release highlights and a link to change log created in the step above.
Here is an example from Pax Runner.
Appendix A: Repositories
While releasing use one of the following profiles based on your needs:
repos.ops4j
This will use OPS4J maven repositories. Use this profile when the version of artifacts you are releasing is < 1.0.repos.sonatype
This will use Sonatype OSS maven repositories: Use this profile when the version of artifacts you are releasing is >= 1.0 and you do not want/need to use staging.repos.sonatype.staging
This will use Sonatype OSS maven repositories: Use this profile when the version of artifacts you are releasing is >= 1.0 and you want/need to use staging.
To deploy to this repositories you must have the necessary credentials and rights.
Appendix B: Authentication
While deploying the artifacts to the specified repositories Maven will use credentials specified in ~/.m2/settings.xml
.
Sonatype Nexus authentication
To deploy to Sonatype repositories you will need an account for which you will get an name/password pair. If you do not have an account create a jira task mentioning your name and wanted id. Once your account is created (or you already have one), edit settings.xml
and add the following:
<settings> <servers> <server> <id>sonatype.releases.deploy</id> <username> <!-- your user --> </username> <password> <!-- your password --> </password> </server> <server> <id>sonatype.staging.releases.deploy</id> <username> <!-- your user --> </username> <password> <!-- your password --> </password> </server> </servers> </settings>
Appendix C: Signing key
We are using GnuPG for signing the artifacts via Maven gpg plugin.
Generate the private/public key pair
On *nix run the code bellow and follow the instructions:
gpg --gen-key
We suggest that:
- when gpg asks for e-mail linked to the key you should use the e-mail that you use on the mailing lists
- when gpg asks for comment linked to the key you should use "CODE SIGNING KEY"
Upload the key
Add the key to http://www.ops4j.org/keys by typing the following commands, replacing the word e-mail with your email used while generating the key pair.
(gpg --list-sigs e-mail && gpg --export --armor e-mail) > toadd.key cat toadd.key | ssh www.ops4j.org "cat >> /var/http/www.ops4j.org/keys"
Specify your gpg passphrase
While releasing gpg will need your pass phrase, passphrase that you will have to set it in your ~/.m2/settings.xml
as follow:
<settings> ... <profiles> <profile> <id>release</id> <properties> <gpg.passphrase> <!-- your key passphrase --> </gpg.passphrase> </properties> </profile> </profiles> ... </settings>
Note that you can also provide the pass phrase via command line:
mvn ... -Dgpg.passphrase=<!-- your key passphrase -->