Skip to content
Les Hazlewood edited this page Apr 25, 2022 · 23 revisions

Welcome to the jjwt wiki!

Release Instructions:

  1. Ensure all @since JJWT_RELEASE_VERSION references are changed to the version you are about to release. Commit/push these changes.

  2. Ensure all version references (dependency declarations, etc) in README.md have been replaced with the version you are about to release. Commit/push this change.

  3. Ensure the correct ~/.m2/settings.xml are enabled (not using a company private repo) and you have both the ossrh profile and ossrh server enabled as follows:

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
        <profiles>
            <profile>
                <id>ossrh</id>
                <properties>
                    <!-- 
                        All artifacts uploaded to Nexus/OSSRH for release must be verified via digital signatures, 
                        so configure gpg (or gpg2) for signing with a gpg key.  More information can be found here: 
                        https://central.sonatype.org/publish/requirements/gpg/
                    -->
                    <gpg.executable>gpg</gpg.executable> <!-- or gpg2 if that's what you have installed -->
                    <gpg.keyname>YOUR_GPG_KEY_ID</gpg.keyname>
                    <gpg.passphrase>YOUR_GPG_KEY_PASSPHRASE</gpg.passphrase>
                </properties>
            </profile>
            <!-- ... any other profiles you may have for your own needs ... -->
        </profiles>
    
        <servers>
            <server>
                <id>ossrh</id>
                <!--
                    This is the same username and password you use to login to both 
                    https://issues.sonatype.org and https://oss.sonatype.org.
                --> 
                <username>YOUR_OSSRH_USERNAME</username>
                <password>YOUR_OSSRH_PASSWORD</password>
            </server>
            <!-- ... any other servers you may have for your own needs ... -->
        </servers>
    
    </settings>
  4. Ensure you have the Zulu JDK 7 installed.

  5. Ensure java -version equals this Zulu JDK 7, e.g. the output looks something like this:

    openjdk version "1.7.0_342"
    OpenJDK Runtime Environment (Zulu 7.54.0.13-CA-macosx) (build 1.7.0_342-b01)
    OpenJDK 64-Bit Server VM (Zulu 7.54.0.13-CA-macosx) (build 24.342-b01, mixed mode)
  6. Ensure MAVEN_OPTS is set properly:

    export MAVEN_OPTS="-Dhttps.protocols=TLSv1.2 -Xmx512m -XX:MaxPermSize=128m"
  7. Run the release build:

    mvn clean
    mvn release:clean
    mvn release:prepare
    # Choose a version number.
    # Choose an SCM release tag.  This should be *just* the version number: 0.5, not jjwt-0.5
    # Choose the new development version.  If releasing 0.5, this would be 0.6-SNAPSHOT
    mvn release:perform
  8. In the master branch (and in the Maj.min.x branch if you are cutting a patch release), change the root pom.xml jjwt.previousVersion property value to equal the version just released. Commit and push these changes.

  9. Log in to the Sonatype OSSRH admin console

  10. On the menu on the left, click the Staging Repositories link. On the resulting list, find iojsonwebtoken-### (usually at the bottom of the list). Check the checkbox for that item.

  11. Click the Close button at the top of the list. Add in a quick note (e.g. 'Closing for the 0.5 release') and click Confirm.

  12. Wait a minute or so and click the Refresh button at the top of the list. The Release button should now be enabled. Click Release and enter in a quick note (e.g. 'Releasing 0.5'). Ensure the Automatically Drop option IS checked (you want this). Click Confirm.

  13. Logout.

That's it! The release should show up in Maven Central in 15 to 30 minutes.

Clone this wiki locally