-
Notifications
You must be signed in to change notification settings - Fork 5
Release Instructions
Neale Upstone edited this page Jun 3, 2013
·
14 revisions
- Don't run anything on port 8080 (such as other tests etc) as you'll interfere with the build
- Ensure your working directory is entirely free of uncommitted files and changes.
- Check that your gpg keys can be found by typing
gpg --list-keys
If not, you need to copy them to where expected, which if you're on Windows 7 is/Users/{user}/AppData/Roaming/gnupg
- Check you've got your maven central server creds set up in settings.xml
- Including your gpg passphrase, which I add to the central profile:
<profile>
<id>central</id>
<properties>
<gpg.passphrase>XXXXX</gpg.passphrase>
<arguments>-Dgpg.passphrase=XXXX</arguments>
</properties>
</profile>
Configure your the release plugin as follows (the release profile can do things like generate sources and javadoc):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<releaseProfiles>release,central</releaseProfiles>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>release-@{project.version}</tagNameFormat>
</configuration>
</plugin>
WARNING: Do NOT run other builds at the same time. If they have clashes on things like Jetty ports for UI/WebService tests, then the build will fail.
###Dry Run
Check gpg by something like
mvn clean verify -Pcentral,release
Perform a dry run
mvn release:prepare -DdryRun=true -DautoVersionSubmodules=true -Pcentral,release
Example versions to enter:
- release = 1.0.0.M3
- tag = 1.0.0.M3
- next dev version = 1.0.0.M4-SNAPSHOT
Note that having done a dry run you need to set resume=false or done release:clean
mvn release:prepare -Pcentral,release -Dresume=false -DautoVersionSubmodules=true
Note: Ensure that you can login to https://oss.sonatype.org/ with the credentials in your settings.xml
If not, then you need to set your password at https://issues.sonatype.org
This can be a PITA, so I prefer (NOTE: clean is important, and DON'T use -Pfast as it'll skip javadoc)
git checkout [tagName]
mvn clean deploy -Pcentral,release -DskipTests
over
mvn release:perform -Darguments=-Dgpg.passphrase=xxxxxxxx -Pcentral,release
- <https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven.
- http://www.vertigrated.com/blog/2011/03/releasing-maven-artifacts-to-central-repository-through-sonatype/
- http://www.andygibson.net/blog/tutorial/releasing-maven-projects-with-github-in-windows/
- https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide