-
Notifications
You must be signed in to change notification settings - Fork 0
Releasing new version
-
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>
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.
Following the standard Maven release procedure should be enough.
The release procedure must be performed from 64-bit RHEL 6.5 or its derivatives so that we can easily ensure the ABI compatibility of the native libraries we ship.
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.5 or its derivatives like you did for Netty 4. However, do not close the staging repository just yet.
-
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 deploy ... The artifact with OSX or Windows native library will be deployed ...
-
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.