Skip to content

Latest commit

 

History

History
83 lines (68 loc) · 3.23 KB

RELEASING.md

File metadata and controls

83 lines (68 loc) · 3.23 KB

Releasing

Prerequisites

  1. Get permissions to publish on Maven Central (sonatype)

    • Create a user here
    • Ask for permissions on the existing ticket here
  2. Make sure you have a GPG client installed and configured. Check GNUPG

    • Refer to the GPG Keys guide if you need to set up GPG keys for signing. Check also the GPG Guide here
    • Install the GPG client. In Linux: sudo apt install gnupg
    • Generate a Key Pair with: gpg --gen-key
    • Distribute the public Key with: gpg --keyserver keyserver.ubuntu.com --send-keys XXXXXXXXXXXXXXXXXXXXXXXXXXX
  3. In ~/.m2/settings.xml, set the following:

<settings>
  <servers>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>your-nexus-username</username>
      <password>your-nexus-password</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <gpg.keyname>Firstname.Lastname</gpg.keyname>
        <gpg.passphrase>the_passphrase</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
</settings>

Release to Maven Central

  1. Do the following tasks sequentially:

    • Update the RELEASE_NOTES.md for the impending release
    • Make sure the javadocs generation does not have any errors: mvn javadoc:javadoc
    • Make sure the MO Testbeds are passing
    • Update the versions of ALL the pom files. Example, from: 9.0-SNAPSHOT to: 9.0
    • Delete the local ~/.m2/repository and make sure that the project can be built from scratch
  2. Compile the projects with sources and javadocs (and enter your GPG Passphrase when prompted) and deploy to OSSRH (Maven Central):

mvn clean deploy -P release
  • Note 1: On some Windows machines sometimes the command does not go through. Workaround: Use an Ubuntu VM
  • Note 2: The command might fail in the end because the Nexus Repository is slow with the checks. Wait and check the progress on the Nexus Repository Manager website mentioned below. Eventually, the status will change from open to closed. After this occurs, the software can then be released, check the next step.
  1. Inspect the staging repository in the Nexus Repository Manager here

    • Release it if everything looks alright
    • Or Drop it if there are errors
  2. Tag the release (tag name example: release-10.0)

    • Tag: git tag release-XX.Y
    • Then push it to the repo: git push origin --tags
  3. Create a Pull Request from the new version branch to master. Please squash it.

  4. Create a GitHub release in: https://github.com/esa/mo-services-java/releases

Extra

Complete Maven Central publishing guide available here!