Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • This document contains a mixture of information, advice and examples of best practices for releasing versions of Apache Juneau.

The instructions provided here are consistent with, but not a replacement for the ASF Release Guidelines.

Table of Contents

1 - Intro

The Apache Juneau project uses the Nexus installation at the Apache Software Foundation to stage Maven artifacts before the release and later publish them; the POM in the root project contains all the necessary configuration.  This guide covers deploying to Nexus using Maven.  For alternatives see the ASF wide documentation.  If this is the first time you are publishing to the ASF's Nexus instance you'll need to prepare your development environment.

Juneau components are expected to use Maven to build the jar/zip files.  The version of Maven used is assumed to be Maven 3 throughout.  At a minimum, Juneau releases must include full source distributions packaged in zip archives.

This document assumes that the release is being prepared on a linux/unix system, and that steps are being executed from the command-line.  The principles are the same, however, for a release prepared on other operating systems.

These instructions assume you are taking on the role of release manager.  This implies you are at least one of the developers.

(info) If you're using Mac OS, you'll want to install wget.

(info) Yellow blocks are code blocks that can be executed as-is UNLESS you see red text indicating values that need to be replaced.

2 - Preparation

2.1 - Determine version number

Consult the versioning guidelines and check that the current level of compatibility is suitable for the proposed version number.

2.2 - Propose email to dev@juneau

Send an email to the dev@juneau mailing list informing the community you plan on creating a new release.  The message can be simple:

Round Rectangle
vSize10px
bgcolor#D4EFDF
hSize10px
cornersize10px

To: dev@juneau.apache.org

[PROPOSE] Release Apache Juneau 7.x.x RCx

Hi everyone,

I'm going to create a new release of Juneau because <state short reason why>.

If I do not hear any objections within the next 24 hours, I'm going to go ahead and start the process.

The release will be called 7.x.x-RCx. The next release will be set to 7.x.y.

3 - Creating a release candidate

3.1 - Create new release in JIRA

Log into JIRA and create the new version (e.g. 7.0.1).  Change the Release date on the current version to today.  

Generate the release notes for the current release as plain text.  Click on the current release and click the Release Notes button.  Click the Configure Release Notes button to select plain text.  Copy the contents of this file to the root RELEASE-NOTES.txt file and commit the change.  

3.2 - Update Release Notes section in overview.html

We maintain externally-consumable new-and-noteworthy information for all our releases in our javadocs.

Using the release notes above as a guide, create release notes in the Release Notes section of the /juneau-core/src/main/javadoc/overview.html document.  Use the previous release as a guideline. 

3.3 - Update LICENSE and NOTICE files

Check the contents of the LICENSE and NOTICE files in the root directory.  

Ensure that the LICENSE files contain the latest information specified in the Apache Licenses page.  

Check that the years in the copyright statement in the NOTICE file are correct.  The notice file should contain the following:

Round Rectangle
vSize10px
bgcolor#D4EFDF
hSize10px
cornersize10px
Apache Juneau
Copyright 2016-{this-year} The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).


Developer documentation on how to apply the Apache License can be found in Applying the Apache License, Version 2.0 and ASF Source Header and Copyright Notice Policy.

3.4 - Run release script

If you've already successfully performed a release, you can run the automated shell script to perform the release.  If you do not wish to use the script, skip to section 3.5 - Prepare your build machine.

The release script consists of the following files:

  • juneau-release-env.sh
  • juneau-release.sh

Update the contents of the juneau-release-env.sh to match the values for the new release:

Round Rectangle
vSize10px
bgcolor#FCF3CF
hSize10px
cornersize10px
export X_VERSION=7.0.0
export X_NEXT_VERSION=7.0.1-SNAPSHOT
export X_RELEASE=juneau-7.0.0-RC1

export X_STAGING=~/tmp/dist-release-juneau
export X_USERNAME=<your apache username>
export X_EMAIL=you@apache.org

Make sure not to check in this changed file!

Next, run the juneau-release.sh file from the juneau root directory.  It will walk you through the entire process.

If successful, you can skip to section 4 - Voting.

3.5 - Prepare your build machine

Run the following commands to set environment variables that will be used throughout this page.  
Set X_RELEASE to the version you plan on release and X_STAGING to the staging directory to use on your machine:

Round Rectangle
vSize10px
bgcolor#FCF3CF
hSize10px
cornersize10px
export X_VERSION=7.0.0
export X_NEXT_VERSION=7.0.1-SNAPSHOT
export X_RELEASE=juneau-7.0.0-RC1

export X_STAGING=~/tmp/dist-release-juneau
export X_USERNAME=<your apache username>
export X_EMAIL=you@apache.org

Run the following commands:

Round Rectangle
vSize10px
bgcolor#FCF3CF
hSize10px
cornersize10px
cd ~/.m2
mv repository repository-old
rm -rf repository-old & 
rm -rf $X_STAGING

mkdir -p $X_STAGING
mkdir $X_STAGING/git
cd $X_STAGING/git
git clone https://gitbox.apache.org/repos/asf/juneau.git
git clone https://gitbox.apache.org/repos/asf/juneau-website.git
cd juneau
git config user.name $X_USERNAME
git config user.email $X_EMAIL

Make sure you're running at least Java 8 and Maven 3:

java -version
mvn -version

(info)  If you're not running Java 8, you'll get a "javadoc: error - invalid flag: -Xdoclint:none" when trying to generate the Javadocs.

3.

5

6 - Update KEYS file if necessary

Check that the KEYS file contains your correct key and fingerprint.  If not, then follow the instructions in this section.

You need to have gpg and preferably a GPG Agent installed on the machine you will build the release on. This needs to be configured with your GPG release key.

Find your PGP fingerprint:

gpg --fingerprint $X_EMAIL

You should see something like the following...

jamesbognar-ltm:dist-release-juneau james.bognar$ gpg --fingerprint jamesbognar@apache.org
pub   rsa2048 2016-09-21 [SC]
      59E1 A375 4EF6 0E6F CE42  ABFE 3629 2BD2 BA7D 3A86
uid           [ultimate] James Bognar <jamesbognar@apache.org>
sub   rsa2048 2016-09-21 [E]

Your key should list your @apache.org email address. Also check your key has not expired - you can use gpg --edit-key and gpg --send-key to update.

The public key must first be uploaded to a public keyserver.  To do this, take the last 8 digits from the hex fingerprint and upload them with the following command:

gpg --keyserver pgp.mit.edu --send-key BA7D3A86

Edit your details on id.apache.org to provide your OpenPGP Public Key Primary Fingerprint, e.g.:

59E1 A375 4EF6 0E6F CE42  ABFE 3629 2BD2 BA7D 3A86

(people.apache.org will fetch your public key from the key servers - you may need to allow some hours if you are adding a new key)

Verify that the people.apache.org juneau.asc file now includes the correct key fingerprint (scroll through or test with gpg --import), and update on dist:

cd $X_STAGING
svn co https://dist.apache.org/repos/dist/release/juneau/
cd juneau
rm KEYS
curl https://people.apache.org/keys/group/juneau.asc -o KEYS
svn commit -m "Updated KEYS" KEYS

3.

6

7 - Verify build

Now we'll make sure they build normally, pass all the tests and complete with BUILD SUCCESS:

...

  • juneau/juneau-microservice/juneau-microservice-template/target/my-microservice-<version>.bin.zip
  • juneau/juneau-examples/juneau-examples-rest/target/juneau-examples-rest-<version>.bin.zip
  • juneau/juneau-examples/juneau-examples-rest-springboot/target/juneau-examples-rest-springboot-<version>.bin.zip


3.

7

8 - Maven repository access

When releasing a stable version, Maven will deploy to Apache's Maven repository, a Nexus instance. Here, a staging repository will be automatically created.

...

cd $X_STAGING/git/juneau
mvn deploy

3.

...

9 - Prepare release candidate

The contents of the binary distribution is configured in the assembly descriptor juneau-distrib/src/assembly/bin.xml.  Make sure that all (and only) files that should be included in the binary distribution are included in the fileset elements of the descriptor.  We use the Maven release plugin to release candidates as it ensures a consistent release process.

...

 

mvn release:rollback git commit git push
git tag -d $X_RELEASE
git push origin :refs/tags/$X_RELEASE

Use git diff against the previous release tag for a rough check for changes:

git diff $X_RELEASE

3.

9

10 - Deploying release candidate

If the preparation was successful, then you should now be able to do:

...

This will check out the tag, build it, then sign and deploy the packaged source code and compiled JARs to http://repository.apache.org.

3.

...

11 Locate the staging repository

On Apache's Nexus instance, locate the staging repository for the code you just released.  It should be called something like orgapachejuneau-1000

...

export X_REPO=orgapachejuneau-1000

3.

...

12 - Uploading to dist.apache.org

The release candidate source code, checksums and signatures should be uploaded to the dev area of dist.apache.org using svn - which we'll check out to a new folder.

...

  • LICENSE
  • NOTICE
  • RELEASE-NOTES.txt

Make sure credentials didn't accidentally get added to the following file in the source zip (that would be bad):

  • juneau-release-env.sh

The bin file should contain the following artifacts:

...