build: migrate Maven Central publishing to the Sonatype Central Portal#5
Merged
Merged
Conversation
The pom still deployed via nexus-staging-maven-plugin to s01.oss.sonatype.org, which was decommissioned with OSSRH in 2025 — the v2.1.1 release tagged fine but never reached Maven Central because the CI deploy failure was silently swallowed. Latest version on Central is still 2.1.0. - Replace nexus-staging-maven-plugin/ossrh with central-publishing-maven-plugin 0.11.0 (server id `central`, autoPublish) and drop the dead s01 distributionManagement block. - Explicitly disable the nexus-staging deploy injected by the Apache NiFi parent pom (aimed at repository.apache.org), which would otherwise hijack the deploy phase. - Enable the central-deploy job in release.yml using the org-level SONATYPE_* (Central Portal token) and GPG_* secrets already shared with this repo. It runs on v* tag pushes alongside the GitHub release and GHCR image jobs. Verified locally: full build passes and a `deploy -DskipPublishing` dry run stages all six artifacts (parent pom included) through the central-publishing plugin with no nexus-staging interference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The pom still deploys via
nexus-staging-maven-plugintos01.oss.sonatype.org, which was decommissioned with OSSRH in 2025. The v2.1.1 release (Nov 2025) tagged and branched fine but never reached Maven Central — the deploy failure was silently swallowed bymvn deploy || truein the old release tooling. The latest version on Central is still 2.1.0.This unblocks publishing 2.9.0 (matching
nifi.version2.9.0) to Maven Central.What
nexus-staging-maven-plugin(server idossrh, dead s01 URLs) withorg.sonatype.central:central-publishing-maven-plugin0.11.0 (server idcentral,autoPublish).<distributionManagement>block.repository.apache.org) — with our local declaration gone it would otherwise hijack the deploy phase.central-deployjob. It uses the org-level secrets already shared with this repo:SONATYPE_USERNAME/SONATYPE_PASSWORD(Central Portal token, same server idcentralstreamnative-ci uses) andGPG_PRIVATE_KEY/GPG_PRIVATE_KEY_PASSPHRASEfor signing. No new secrets required.v*tag pushes alongside the existing GitHub-release and GHCR-image jobs, stamps the pom version from the tag, and excludes thedocker-imagemodule from the Central bundle.Verification
mvn clean install -DskipTests -Dgpg.skip=true -pl '!docker-image'passes with the migrated pom.mvn deploy -DskipPublishing=true ...dry run:central-publishing:publishowns the deploy phase for all six modules (parent pom included — the rootmaven.deploy.skip=truedoesn't affect the new plugin), with no nexus-staging execution.Release plan (after merge)
Push tag
v2.9.0→release.ymlproduces the GitHub release with NARs, theghcr.io/streamnative/nifiimage, and the signed Maven Central publish of 2.9.0.🤖 Generated with Claude Code