Repository navigation
OP-43962: fix(ci): restore snapshot deploy to Maven Central (401) - #2426
Merged
Merged
Conversation
daniel-gmc
requested review from
daniel-kmiecik
and
a lite review from Copilot
November 11, 2026 16:28
There was a problem hiding this comment.
🔵 Needs a closer look
A live v1 snapshot push is required to verify the updated credential routing against GitHub secrets and Maven Central’s authenticated endpoint, which cannot be confirmed from the checkout alone.
No open issues 🎉
What changed in this PR
Restores authenticated v1 snapshot deployment to Maven Central by aligning the Maven server ID with the Central Publishing configuration and enabling repository-ID credential selection.
Changes:
- Changes the
setup-javaserver ID fromossrhtocentral. - Adds
-Dmaven.repository.credentialScope=idto snapshot deployments. - Preserves the existing Maven Central secret mappings.
| File | Description |
|---|---|
| .github/workflows/maven-v1.yml | Updates Java and Maven Central authentication settings for v1 snapshot deployment. |
Review effort: Lite
daniel-kmiecik
approved these changes
Nov 12, 2026
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.
Problem
Snapshot deploys on v1 fail at central-publishing-maven-plugin:publish with HTTP 401. Tests and compilation pass.
Root cause
Not an expired token. The failing log warns “Not using credentials of server ‘central’ for repository https://central.sonatype.com/repository/maven-snapshots/”. Newer Maven only sends credentials to the origins declared for a server ID. For central that is https://repo.maven.apache.org, so the upload goes out anonymous and Central returns 401.
Changes
server-id: ossrh → central in setup-java.
Add -Dmaven.repository.credentialScope=id to mvn clean deploy, so credentials are sent to the snapshot repo.
Secret names are unchanged.
Verify
On the next push to v1: the “Not using credentials” warning is gone and the deploy step completes without a 401.
Follow-ups
Apply the same change to the 3.0.0 workflow and check its log for the same warning.
Audit other swagger-api repos using central-publishing.
Long term, declare https://central.sonatype.com under in settings.xml instead of the legacy property.
Separate: the Swagger org hit the Central Release Size limit (grace period ends 2026-11-25).