Releases are deployed to the Sonatype Central Portal (https://central.sonatype.com)
via the JReleaser Gradle plugin (configured in build.gradle). The old OSSRH flow
(s01.oss.sonatype.org + manual "close/release") is no longer used — OSSRH has been
retired.
-
A Central Portal account with a generated user token (central.sonatype.com -> profile -> Generate User Token). The legacy OSSRH credentials (
s01.oss.sonatype.org) do NOT work against the Central Portal — a 401 during deploy almost always means an OSSRH/wrong token is being used. -
The
com.linbitnamespace must be verified for that account on the Central Portal (the published groupIdcom.linbit.linstor.apilives under it). -
A GPG key for signing — JReleaser signs every artifact (
signing.active = ALWAYS), and the matching public key must be published to a keyserver (e.g. keys.openpgp.org) so the Portal can verify the signatures. -
Credentials passed to JReleaser via environment variables. Run
./gradlew jreleaserEnvto print the exact names it expects:
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME # Central Portal token username JRELEASER_MAVENCENTRAL_SONATYPE_TOKEN # Central Portal token password JRELEASER_GPG_SECRET_KEY # armored secret key (signs the artifacts) JRELEASER_GPG_PASSPHRASE # passphrase for the secret key(Only the secret key is needed —
JRELEASER_GPG_PUBLIC_KEYwas deprecated in JReleaser 1.24.0. These can also live in~/.jreleaser/config.properties.)
-
Set the release
versioninbuild.gradle(no-SNAPSHOT); commit and tag. -
Build and stage the artifacts into the local staging repo:
./gradlew clean publishThis writes the jar,
-sources,-javadocand.pomunderbuild/staging-deploy. -
Sign and upload to the Central Portal:
./gradlew jreleaserDeployValidate the configuration first with
./gradlew jreleaserConfig. Use./gradlew jreleaserFullReleaseinstead if you also want JReleaser to create the matching Git release. -
Check the deployment at https://central.sonatype.com/ (Deployments) and publish it if your portal namespace is not set to auto-publish.
The staging directory must be the same on both sides. publish writes to
build/staging-deploy (layout.buildDirectory), so the JReleaser
stagingRepository(...) in build.gradle must point at build/staging-deploy too —
otherwise jreleaserDeploy uploads nothing.