Skip to content

Releasing new version

Trustin Lee edited this page May 12, 2014 · 31 revisions

Before getting started

  • 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:

  1. Stage the new release into the staging repository.
  2. Verify the staged files are all good. If not, drop the staging repository and try again.
  3. Close the staging repository so that no more modifications are made into the staging repository.
  4. 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.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.

  1. 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.

  2. On your Mac OS X, run the following 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 native library will be deployed ...
    
  3. Make sure both the Linux and Mac OS X artifacts have been deployed into the same staging repositories. If they are deployed into two different staging repositories, drop them all and figure out what was the problem.

  4. If both JARs (e.g. netty-tcnative-1.1.30.Fork1-linux-x86_64.jar and netty-tcnative-1.1.30.Fork1-osx-x86_64.jar) exist in the same staging repository, close and release the staging repository.