Skip to content
MysterAitch edited this page Mar 28, 2020 · 1 revision

(This is a note to self.)

Tasks

  1. Update Copyright end year in all files
  2. Update the "next release" milestone to the version about to be pushed out
  3. Update changelog.md to ensure that all changes are referenced
    • check the "next release" milestone in github issues
    • highlight any breaking changes
    • update the "issues resolved" link
  4. Create a new "next release" milestone
  5. Update code snippets (maven configs) in readme.md with new current version number
  6. Release jar to Maven Central (See Below)
  7. Push new JavaDoc to gh-pages branch (NOTE: is this done any more?)
  8. Announce new version to the world!
    • Gitter
    • Twitter
    • Anywhere else!

Maven Release Process

This guide documents how to create a release of javaparser on The Central Repository (old coordinates).

Prerequisites

  1. You must be part of the Javaparser bintray team
    • Click the link, login, then request access
  2. You must have done what the "set me up" button says on the team page
    • "Set Me Up" -> "Uploading" (visible only after logging in) -> "Deploying with Maven"
      • Setup your copy of ~/.m2/settings.xml with your username and bintray api key
      • The <distributionManagement> section should already be in the main pom.xml
  3. You must be confirmed by Sonatype via an application to upload artifacts to the appropriate coordinates.
    • See the guidelines here.
    • You can see an example application for this project under https://issues.sonatype.org/browse/OSSRH-5465.
    • In our case we use always the following criteria (also found in the <distributionManagement> tag of pom.xml):
      • Group Id: com.github.javaparser
      • Project URL: https://github.com/javaparser/javaparser
      • SCM url: https://github.com/javaparser/javaparser.git
  4. You must have commit access to the JavaParser repo
    • This is in order to be able to push tags during the release cycle (specifically, during the release:prepare phase

Note: In the future (perhaps v4?) we may switch to using the group id org.javaparser per https://issues.sonatype.org/browse/OSSRH-13194

Stage a Release

Before staging a release, you should be confident that the release will be in good working order.

  • This can be achieved by running the test suite using mvn -e clean test.
  • Alternatively, the test suite will run as part of the release:prepare phase.

First you need to prepare a release before uploading any artifact:

$ mvn -e release:clean
$ mvn -e release:prepare

You will be asked how the release version should be named and what name should be used to create a new tag.

Optionally, you may use mvn -e --batch-mode release:prepare to use the default version numbers.

Note: As part of the release:prepare phase, a new git tag will be created and pushed to the default remote repository.

Then stage the release:

$ mvn release:perform
  • Maven will checkout the tag you just prepared before.
  • It will build and deploy the project to Bintray.

On Bintray you can find a button to send the release to Maven Central.

Something unclear?

Read the Usage Guide in detail, because everything important is described in detail there.

Clone this wiki locally