Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Common tasks

Riccardo Ciovati edited this page Apr 17, 2014 · 25 revisions

This document explains common tasks for contributors.

Deploying SNAPSHOTS artefacts to Sonatype's nexus

mvn clean deploy

As a result, you can browse the SNAPSHOTS repository of RoboSpice on Sonatype's nexus for current snapshot version.

Preparing to release :

  • check if new versions of plugins are available : mvn versions:display-dependency-updates
  • rebase all commits of release on master branch, it mostly contains README changes that we want to preserve.
  • Update changelog Keeping up to date is really a life saver when releasing in a professional way.

Releasing RoboSpice to Sonatype / Maven Central

#prepare the release
mvn release:prepare
#perform the release, read below before typing this
mvn release:perform

If something goes bad with the site during release perform, skip the site phase with

#perform the release
mvn release:perform -Dgoals=deploy

WARNING : when the artifact is deployed on sonatype, you MUST finish all the release cycle on sonatype (a dialog will ask you to confirm twice). The artifact has to be released & cleared on sonatype, afterwards, you can procede with the rest of the release procedure. No need to wait for maven central real publishing, though it can a good idea for a first time, but there has never been any bug known once the artifact is released, Sonatype is highly reliable.

If you create the javadoc, or deploy on the repo branch, it will also update the artifact on sonatype and you will end up with a completely messed artifact that can't be released on central. In that case, reset -- hard your git HEAD to a commit before the release and release again.

Put release branch in release state

Be sure to have kept all commits on release branch, not to loose any README change for instance.

git checkout release
git reset --hard <latest-release-tag>
git push --force

Next, to create ant repo branch and javadocs from this tag on release branch see below.

Creating Maven site and Javadocs and exporting them to GitHub's pages

Note: JAVA_HOME must point to a jdk 7 home, not 6.

mvn clean site-deploy

In case you get Permgen OutOfMemoryError :

export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"; mvn clean site-deploy

As a result :

Deploying artefacts to repository branch on GitHub for ant users

Usually, you want to put release branch on a non-snapshot release tag before executing the following command line :

git checkout release
git reset --hard <latest-release-tag>
mvn clean deploy -P repository

As a result, you can browse the repository branch on GitHub for current version.

Update master branches of both lib and samples.

Ideally all stable samples should use the new version. Samples ain't tested.

Announce release on Google +

Usually, a post is sent on G+ to let people know a new version is available. It contains the changelog, the release number and the hashtags #robospice, #android, #androiddev. All main contributors, and ideally all release related contributors, should be CC'ed.