-
Notifications
You must be signed in to change notification settings - Fork 18
Releasing
This page is intended for WComponents framework developers with authority to deploy WComponents releases. The rest of this document assumes deployment to Maven Central.
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>
<!-- The below is optional extra configuration for older GPG installs. -->
<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>
<!-- This is the configuration for newer GPG installs. Mutually exclusive. -->
</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:
To build the release on OS X you will need the Xcode command line tools.
Please ensure you are building using the correct versions of Java and Maven. For example: Java 1.7.0_79 and Maven 3.2.2.
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
Running a complete deploy with all tests (since the Selenium tests were reinstated) may result in a permgen outOfMemory error on some systems. There are a few ways to avoid this in the unlikely event it occurs:
- increase the permSize e.g. on UNIX-like system
export MAVEN_OPTS='-XX:MaxPermSize=256m'(256m is not required, it is an example - 128m should be plenty) then run the deployment build; - skip 'optional' Selenium tests by adding
-DskipOptionalTests=trueto the command line above (not recommended); - skip all tests by adding -DskipTests to the command line above (really not recommended).
You should only resort to the second or third options above if you are very short of memory and have done a full build of wcomponents-parent with all tests prior to running the deploy.
http://central.sonatype.org/pages/releasing-the-deployment.html
Maybe this would be useful: http://central.sonatype.org/pages/manual-staging-bundle-creation-and-deployment.html