Releasing new version
Before getting started
- Read the OSSRH guide from Sonatype.
- Create a GnuPG key to sign the artifacts.
-
Configure your
~/.m2/settings.xml
contains the following configuration:<?xml version="1.0" encoding="UTF-8"?> <settings> <servers> <server> <id>sonatype-nexus-snapshots</id> <username>myusername</username> <password>mypassword</password> </server> <server> <id>sonatype-nexus-staging</id> <username>myusername</username> <password>mypassword</password> <configuration> <httpHeaders> <!-- Override User-Agent header which is used when deploying an artifact so that Sonatype Nexus does not create multiple staging repositories when artifacts are deployed from different platforms (e.g. Linux and OSX). --> <property> <name>User-Agent</name> <value>Apache-Maven</value> </property> </httpHeaders> </configuration> </server> </servers> ... </settings>
Standard Maven release procedure
You must be familiar with the standard Maven release procedure, which uses maven-release-plugin:
- Stage the new release into the staging repository.
- Verify the staged files are all good. If not, drop the staging repository and try again.
- Close the staging repository so that no more modifications are made into the staging repository.
- Release the staging repository so that the new release is synchronized into the Maven central repository.
Netty 3
Following the standard Maven release procedure should be enough.
Netty 4 and beyond
The release procedure must be performed from 64-bit RHEL 6 or its derivatives so that we can easily ensure the ABI compatibility of the native libraries we ship. Install the required packages as well.
Netty/TomcatNative
Because we ship both Linux and Mac OS X artifacts, the release procedure is even more complicated.
- Perform a release from 64-bit RHEL 6 or its derivatives like you did for Netty 4. However, do not close the staging repository just yet. Write down the repository name which was used for staging (like onetty-1102).
-
On your Mac OS X and 64-bit Windows, whose build environment is set up as documented here, run the following commands to deploy the release artifacts to the staging repository:
$ git checkout netty-tcnative-[version] ... You'll get a warning about detached HEAD ... $ mvn -Psonatype-oss-release -DskipAll=true clean package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy \\ -DstagingRepositoryId=ionetty-1102 -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging ... The artifact with OSX or Windows native library will be deployed. ... ... Please replace ionetty-1102 with the correct id. ...
Make sure both the Linux, Mac OS X, and Windows artifacts have been deployed into the same staging repositories. If they are deployed into two or three different staging repositories, drop them all and figure out what was the problem.
- If all three JARs (e.g.
netty-tcnative-1.1.30.Fork1-linux-x86_64.jar
,netty-tcnative-1.1.30.Fork1-osx-x86_64.jar
, andnetty-tcnative-1.1.30-Fork1-windows-x86_64.jar
) exist in the same staging repository, close and release the staging repository.
Close the milestone in Github
Go here to close the released milestone.
Upload a tarball
We use bintray.com for hosting tarballs.
- Log in with your account.
-
Add a new version.
- Type the version number and release date. Note that the release date format is
dd/mm/yyyy
. - Click the 'Create Version' button.
- Type the version number and release date. Note that the release date format is
- Put additional information to the newly created version.
- Type the name of the Git tag in the 'VCS tag' field. (e.g.
netty-4.1.0.Beta1
) - Click the 'Update Version' button.
- Type the name of the Git tag in the 'VCS tag' field. (e.g.
- Go to the download page.
- Click the link to the version you've just created, which will lead you to the version page.
- Upload the tarball file.
- Click the 'Upload Files' link.
- Upload the tarball file (e.g.
netty-4.1.0.Beta1.tar.bz2
) by dragging and dropping the file into the 'Drag files here' area. - Click the 'Save Changes' button once the upload is finished.
- Publish the tarball file.
- Bintray will warn you that you have 1 unpublished item. Click the 'Publish' button.
- Add the published tarball to the download list.
- You've uploaded the tarball successfully, but the page will say 'No direct downloads selected for this package.' It is because you did not make the tarball file visible in the download list.
- Click the 'Files' tab. You will see the tarball file you've uploaded.
- Move your mouse cursor over the 'Actions' link of the tarball file, which will display a submenu.
- Click the 'Show in download list'.
- Now go back to the 'General' tab. Your tarball should be visible in the direct download list.
Update the 'new and noteworthy' page
We have a dedicated 'new and noteworthy' page for each minor versions. Add or update it if necessary. If you added one, add it also to New and noteworthy list.
Update the web site
Our official web site is built with Awestruct. Please make sure you are familiar with Awestruct and its related markup languages such as HAML and Markdown.
If you did not yet, clone the web site project:
git clone [email protected]:netty/netty-website.git
cd netty-website
_config/site.yml
contains important metadata about the latest Netty versions. For example, it has the following section:
releases:
- version: 5.0.0.Alpha1
date: 22-Dec-2013
stable: false
branch: master
- version: 4.0.21.Final
date: 01-Jul-2014
stable: true
- version: 3.9.2.Final
date: 11-Jun-2014
stable: true
Update it with the new version number and release date. You could also update the stability and the Git branch if necessary.
Try to generate the web site to confirm that the new version shows up in the generated web site. The generated web site is located in the _site
directory and you can browse it from your favorite web browser by opening _site/index.html
.
_bin/clean.sh
_bin/generate.sh
Update the Javadoc and Xref to the latest one. You can copy them from your netty/target/checkout/all/target
directory:
cd 4.1 # or the version you are working on
rsync -aiP --delete ~/Workspace/netty/target/checkout/all/target/api . # Note no trailing slash!
rsync -aiP --delete ~/Workspace/netty/target/checkout/all/target/xref . # Note no trailing slash!
git add -A .
cd ..
Also, don't forget to add _config/site.yml
we updated to the Git index when you commit:
git add _config/site.yml
git commit -m "Release 4.1.0.Beta1"
git push
Now you are ready to push the web site:
_bin/deploy.sh
Make an announcement
Write a blog post. The blog posts are located in the news
directory of the web site project.
Make sure the file name does not contains a dot (.) or a whitespace (e.g. OK: 2014-07-04-4-1-0-Beta1-released.html.md
NOT OK: 2014-07-04-4.1.0.Beta1-released.html.md
Deploy the new blog post using the _bin/deploy.sh
script.
Once the new blog post is up, make another announcement via your personal Twitter account, and retweet it using our official Twitter account.