feat(stage-vote-release): target Central Portal OSSRH Staging API - #189
Open
vlsi wants to merge 1 commit into
Open
feat(stage-vote-release): target Central Portal OSSRH Staging API#189vlsi wants to merge 1 commit into
vlsi wants to merge 1 commit into
Conversation
oss.sonatype.org was sunset in 2025, so nexus.mavenCentral() now points the staging host at the Central Portal OSSRH Staging API compatibility host (ossrh-staging-api.central.sonatype.com) and snapshots at central.sonatype.com. Users no longer need to set the compatibility host by hand. A new nexus.snapshotUrl property carries the snapshot host, since it no longer shares a host with staging. The compatibility host identifies staging profiles by namespace and does not support the profile_repositories lookup, so mavenCentral() defaults stagingProfileId to the project group for production releases. The test environment and apacheRepository() are unaffected. Also propagate releaseParams.nexus.stagingProfileId to the publish plugin's nexus repository; it was declared but never wired up, so an explicit stagingProfileId had no effect. Co-Authored-By: Claude Opus 4.8 <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
Three issues with publishing to Maven Central via the stage-vote-release plugin:
stagingProfileIdwas never propagated.releaseParams.nexus.stagingProfileIdwas declared but never wired to the publish plugin'snexusrepository, so setting it had no effect. The only workaround was to reconfigure the repository by hand:mavenCentral()pointed atoss.sonatype.org, which was sunset in 2025. Users had to override the host to reach the Central Portal OSSRH Staging API compatibility service.No default
stagingProfileId. On the compatibility host the staging profile is the namespace, and theprofile_repositorieslookup is unsupported (publish-plugin#379), so a sensible default avoids a manual step.What
releaseParams.nexus.stagingProfileIdto thenexusrepository.nexus.mavenCentral()now targets the Central Portal OSSRH Staging API compatibility host:nexusUrl) →https://ossrh-staging-api.central.sonatype.com/service/local/https://central.sonatype.com/repository/maven-snapshots/nexus.snapshotUrlproperty, since the snapshot host no longer matches the staging host. When unset, the plugin keeps deriving it fromurl.mavenCentral()defaultsstagingProfileIdto the project group for production releases only. The test environment (asflike-release-environment) andapacheRepository()are unaffected —repository.apache.orgstill uses its hashed profile and the profile lookup.After this change the manual workaround above can be dropped;
nexus { mavenCentral() }is enough.How to verify
NexusConfigTestcovers all three:mavenCentral targets the Central Portal compatibility host in production— staging/snapshot URLs andstagingProfileId == project.groupmavenCentral keeps the local stub in the test environment— local127.0.0.1URLs, no default profileexplicit stagingProfileId reaches the nexus repository— explicit value is propagatedDocs in
plugins/stage-vote-release-plugin/README.mdare updated to match.🤖 Generated with Claude Code