How to do a Release

How To Release

Releasing is hard, so I'm recording this here as a reference. This walk-thru is based on the Sonatype release guide since Sonatype is where the official repository is for AndHow . After a new release, Sonatype automatically copies them over to Maven Central.


Currently requires running on Java 1.8 to ensure that 1.8 compatible jars are created (Only true for the 0.4.x releases)


> mvn clean install -P source-and-javadoc-jar,gpg-sign,release-verification

(Verify the '-P' argument matches the 'releaseProfiles' of the release plugin in the main pom. This ensures this test install run matches the actual release run)

This will verify if all configuration for GPG is working correctly. Check your local ~/.m2/repository/org/yarnandtail/andhow/[version] to see if there are .asc signing files for each artifact, as well as javadocs and sources. It should look like this:

andhow-0.4.1-SNAPSHOT-javadoc.jar

andhow-0.4.1-SNAPSHOT-javadoc.jar.asc

andhow-0.4.1-SNAPSHOT-sources.jar

andhow-0.4.1-SNAPSHOT-sources.jar.asc

andhow-0.4.1-SNAPSHOT.jar

andhow-0.4.1-SNAPSHOT.jar.asc

andhow-0.4.1-SNAPSHOT.pom

andhow-0.4.1-SNAPSHOT.pom.asc


Checks:

  • Verify the samples project runs against the new snapshot locally using JDK 1.8 and JDK 16 (and more)

  • Verify the 'shaded' andhow.pom file does not have dependencies in it

  • Sanity check size of andhow.jar


Also try JDK9+ using the release and source flags:

<configuration>

<release>8</release>

</configuration>

and

<configuration>

<source>8</source>

<target>8</target>

</configuration>


> mvn clean deploy


Checks:

  • Verify the samples project runs against the new snapshot on Travis CI


> mvn release:clean release:prepare

> mvn release:perform

Login to https://oss.sonatype.org/

Select the Staging Repositories on the left navigation. I only see my latest uploaded staged release when I do this. Check it out... maybe download and try it.

It sounds like its possible to do the release from command line via the nexus plugin:

> mvn nexus-staging:release

From the UI, it sounds like the repository needs to be 'closed' (no further additions), then 'Released'.

Followup Stuff

  • Update the GitHub Release to point to the new tag

  • Update samples to the new release and the samples homepage branch

  • Update Readme of per the new release