tools/maven-central/README.md
Creating a JGit release and deploying it to Maven Central
Prerequisites
Configure credentials for deployment to Maven Central Portal
- register a user account on the Maven Central Portal
- ask Eclipse Foundation to get yourself registered for the Maven Central namespace
org.eclipse.jgit - login to the Maven Central Portal
- if you don't already have one create a user token here
- add the username and token from the user token to ~/.jreleaser/config.toml
JRELEASER_GITHUB_TOKEN="EMPTY"
JRELEASER_MAVENCENTRAL_TOKEN="maven central token"
JRELEASER_MAVENCENTRAL_USERNAME="maven central username"
- store your gpg passphrase used for GPG signing the Maven artifacts in ~/.gnupg/passphrase
- restrict read access to the jreleaser config and the gpg passphrase file to yourself
chmod 600 ~/.jreleaser/config.toml
chmod 600 ~/.gnupg/passphrase
Create a JGit release and deploy it to repo.eclipse.org
Deploy a JGit release to Maven Central
- prepare virtualenv for
download_release.py:$ cd tools/maven-central
$ pipenv --python 3.12
$ pipenv sync
- download a JGit release from repo.eclipse.org and create artifact signature files (
.asc) using your GPG signing key$ pipenv run ./download_release.py 6.1.0.202203080745-r
- deploy the release to maven central portal
$ JRELEASER_MAVENCENTRAL_STAGE=UPLOAD jreleaser deploy
- check in the Maven Central Portal if the release looks good. You can download uploaded artifacts from there. How to manually test a staged release is explained here
- create a bearer token as described here
- add the sections mentioned here using the bearer token you created in the previous step to your
~/.m2/settings.xml - clone the jgit-build-test repo from github
$ git clone https://github.com/msohn/jgit-build-test
- update the version in its
pom.xml to the new JGit release you staged - delete all jgit artifacts from your local m2 repository
$ rm -r ~/.m2/org/eclipse/jgit
- build the jgit-built-test maven project to test if all artifacts of the new release can be downloaded and used in a build
$ mvn clean install -Pcentral.manual.testing
- commit the version update in jgit-build-test and push it to github
- if the test build of jgit-build-test succeeded publish the new release