BioJava:Make release

How to make a BioJava release

This page is intended for BioJava release managers. I was documenting this while I was doing the BioJava 1.7 release. –Andreas 15:14, 12 April 2009 (UTC)

Required time

A few hours. Most time is being spent in verifying that the code base is release ready. The actual preparation of the .jar files and copying them to the server is quite quick and can be done semi-automatic.

Prior to release

  • Announce release deadlines on mailing list
  • Run optimize imports across whole project
  • Make sure all java classes have the copyright statement by running this shell script:

Configure Authentication Keys

You need to configure the following 3 items for performing a full release

  1. OSS Sonatype login (OSS Jira account login)
  2. PGP signature for code signing (only can upload signed jars to OSS Sonatype)
  3. Write permission to

OSS Sonatype login

As of release 4.0.0 we moved our repository hosting from biojava’s web server to Maven Central. To push releases there, you need to first get an account set up at the OSS Sonatype Jira. One of the people who already have permission (currently @andreasprlic and @heuermh) can request to add you to the already existing biojava project. The BioJava pom.xml is set up correctly to upload the jars for you, as long as you set up your login:

You need to configure maven with your username and identity file. In ~/.m2/settings.xml (on the build machine), add or merge the following xml:

<settings xmlns=""

Maven reports ‘Auth Error’ in the release:perform stage if you keys are not properly set up. Permissions errors mean that authentication was successful but you can not write to the correct location (for instance, if a maven-metadata.xml exists from a previous build by another user).

More information about using the Maven release plugin to push to OSS Sonatype is here.

BioJava web server project write access

Make sure you can write to

PGP Signature

Set up a PGP signature for code signing. For documentation how to do this see here.

On release date

Verify code base

  • Make sure code is ready for release. Check last minute commits (there usually are some).
  • Make sure the auto-build page (cruisecontrol) does not report any problems

Clean checkout

Create a clean clone on a machine with ssh keys set up to access (and associated maven settings; see above).

git clone bj3.0.7

Make maven release

the release process is very straightforward nowadays. It is rather time-consuming, as maven runs all tests during each step.

mvn release:clean 
mvn release:prepare 
mvn release:perform

The second and third steps set up your local git repository and deploy jar files for each module to cloudportal. If something goes wrong, you can technically run mvn release:rollback, but it is easier to just reset your git repository to master.

git reset --hard origin/master

AP: I recommend NOT to do git reset, once files have been uploaded to sonatype. release:rollback will clean up for you.

Push to Github

If all three steps work fine, the maven release plugin will push on your behalf to Github and release the jars on OSS Sonatype. Note: mvn:release takes about 1 hour since the bandwith to upload at OSS Sonatype is limited.

If there is a problem, here how to add the release tag by hand:

push the tag to github and merge it to releases. Note that I’m assuming origin refers to the central biojava repository.

Note: double check these commands

git pull master #merge any commits that occurred while releasing
git push --tags origin master #push the new master (with updated pom) and new tags

git checkout release  
git merge biojava-3.0.7
git diff biojava-3.0.7 release #shouldn't print anything
git push origin release

And here how to delete a release tag again:

git tag -d biojava-3.0.7
git push origin :refs/tags/biojava-3.0.7

Prepare and release javadoc files

(Still in git checkout, e.g. bj3.0.7 if you’re following along or biojava/target/checkout/ if you did not mvn clean in the meanwhile)

build javadoc:

mvn site

Here we assume the version nr. of the current release is 3.0.7.

 cd target/site/
 mv apidocs/ api3.0.7
 tar czvf api3.0.3.tar.gz api3.0.7/
 scp api3.0.7.tar.gz

now log into the couldportal server:


cd /home/websites/
tar zxvf api3.0.7.tar.gz
rm api
ln -s api3.0.7 api

and back to your local machine…

Create the biojava-all bundle

If needed, rename your git checkout to bj3.0.7

mv checkout/ bj3.0.7

remove .git files

rm -rf .git .gitignore .travis.yml KEYS ignore.txt

Create -all tarball

cd ..
tar czvf bj3.0.7-all.tar.gz bj3.0.7


mkdir /home/websites/

back to your local machine

scp biojava-3.0.7-all.tar.gz


this is how to enable analytics in javadocs

cd biojava-svn/target/bj3.0.7/

mvn clean install source:jar javadoc:jar javadoc:aggregate

cd biojava-svn/target/bj3.0.7/target/site/apidocs

upload apidocs

Create a new download file for the release. (I copied BioJava:Download_3.0.4 to BioJava:Download_3.0.5). Modify the new page to the latest data.

Update (Change the redirect on the BioJava:Download page to )


Write release announcement to biojava-l and biojava-dev