Skip to content

Releasing

Rick Brown edited this page Nov 12, 2015 · 25 revisions

Releasing

This page is intended for WComponents framework developers with authority to deploy WComponents releases, for example to Maven Central.

Maven Central Deploy

Configuring the build machine - One time setup

On the build machine you need to install GPG and create a key pair so the build can cryptographically sign the built artefacts. Read this.

The configuration of the signing plugin does not go in the main pom file since it contains secrets and machine specific configuration. Instead you should create a profile in the settings.xml file (example below).

You also need an OSS Sonatype account with authority to deploy WComponents. The account credentials will need to be provided in the settings.xml file (example below).

Your settings.xml file should look a little something like this:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
	<profiles>
		<profile>
			<id>sonatype-oss-release</id>
			<properties>
				<gpg.keyname>539ED197</gpg.keyname>
				<gpg.passphrase>*********</gpg.passphrase>
				<gpg.defaultKeyring>false</gpg.defaultKeyring>
				<!-- <gpg.executable>/usr/local/bin/gpg</gpg.executable> -->
				<gpg.useagent>true</gpg.useagent>
				<gpg.lockMode>never</gpg.lockMode>
				<gpg.homedir>/home/banana/.gnupg</gpg.homedir>
				<gpg.publicKeyring>/home/banana/.gnupg/pubring.gpg</gpg.publicKeyring>
				<gpg.secretKeyring>/home/banana/.gnupg/secring.gpg</gpg.secretKeyring>
			</properties>
		</profile>
	</profiles>
	<servers>
		<server>
			<!-- The id here must match the id of the repositories in the pom file's distributionManagement -->
			<id>ossrh</id>
			<username>mrbanana</username>
			<password>********</password>
		</server>
	</servers>
</settings>

The build currently uses maven-release-plugin to save a lot of the manual "pom shuffle" work. It needs to connect to SCM so using GitHub as an example you would need to configure access by following these steps:

Generate new SSH key

Add public SSH key to GitHub

Building

Warning - running the commands below makes changes in Git including your remote repository.

Make sure you create a new activity branch before running these commands.

Three release goals are needed and you should ensure you activate the correct profile in your settings.xml. For example if your profile is sonatype-oss-release.

mvn release:clean release:prepare release:perform -Psonatype-oss-release

Releasing

http://central.sonatype.org/pages/releasing-the-deployment.html

TODO

Maybe this would be useful: http://central.sonatype.org/pages/manual-staging-bundle-creation-and-deployment.html

Clone this wiki locally