Repository navigation
Keep the publish credentials on Maven 3.10 - #207
Merged
Merged
Conversation
The runner image now ships Maven 3.10.0, which offers the credentials of server 'central' only to repo.maven.apache.org, so the snapshot upload to central.sonatype.com is refused with a 401. With maven.repository.credentialScope=id the server is matched by id again; Maven 3.9 ignores the property.
Thorsrud22
approved these changes
Oct 16, 2026
Thorsrud22
left a comment
Contributor
There was a problem hiding this comment.
The run log matches: 38124855884 has Maven's warning "Not using credentials of server 'central' for repository https://central.sonatype.com/", followed by the 401 on the snapshot upload. The flag is the second of the two options that warning offers; the first (<repositoryOrigins>) would mean replacing the settings.xml that setup-java generates, so the flag is the smaller change. The job only has the one server, so id-only matching doesn't widen anything here. Release uploads use the same server id, so this covers them too.
I haven't reproduced it locally, so the check is the publish run after the merge, as you say. LGTM.
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.
The publish job fails with a 401 since the runner image moved to Maven 3.10.0 (run 38124855884, after #205). Maven 3.10 offers the credentials of server
centralonly to repo.maven.apache.org, and the upload goes to central.sonatype.com.-Dmaven.repository.credentialScope=idmatches the server by id again, as Maven's warning suggests. Checked against a local listener on 3.9.16 and 3.10.0; the proof is the publish run after the merge.Summary by cubic
Fixes the Maven publish job returning 401 because Maven 3.10 limits the
centralserver credentials to repo.maven.apache.org, while artifacts upload to central.sonatype.com.Adds
-Dmaven.repository.credentialScope=idso the server is matched by id again. Maven 3.9 ignores the property, so older runners are unaffected.Written for commit e7cd3a6. Summary will update on new commits.