Skip to content

Declare central.sonatype.com as a repository origin - #929

Merged
oryan-block merged 1 commit into
masterfrom
feature/841-repository-origins
Oct 24, 2026
Merged

oryan-block merged 1 commit into
masterfrom
feature/841-repository-origins

Conversation

@oryan-block

Copy link
Copy Markdown
Collaborator

Fixes #841

Checklist

  • Pull requests follows the contribution guide
  • New or modified functionality is covered by tests

Description

setup-java v6.1.0 added mvn-server-repository-origins, and @v6 already points to it. This declares https://central.sonatype.com as an origin of the central server and drops the -Dmaven.repository.credentialScope=id workaround from #840. Maven 3.10 sends the credentials again, and its origin scoping stays on.

The release workflow gets the same origin. Its deploy wasn't broken, because central-publishing-maven-plugin uploads the bundle with its own client. It did log Not using credentials of server 'central' for repository https://central.sonatype.com/repository/maven-snapshots/ on every run, the latest being this one.

I checked this locally with Maven 3.10.0, a throwaway snapshot project and dummy credentials. Without <repositoryOrigins>, Maven logs the warning and drops the credentials. With the block setup-java writes, there's no warning and the credentials are sent. Both runs get a 401 because the credentials are dummies. The real check is the snapshot publish after this merges.

setup-java v6.1.0 writes repositoryOrigins into settings.xml, so the snapshot deploy no longer needs maven.repository.credentialScope=id to send credentials under Maven 3.10. The release deploy gets the same origin, which removes its credentials warning.
@sonarqubecloud

Copy link
Copy Markdown

@oryan-block
oryan-block merged commit 06ea234 into master Oct 24, 2026
5 checks passed
@oryan-block
oryan-block deleted the feature/841-repository-origins branch October 24, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declare central.sonatype.com as a repository origin once setup-java supports it

1 participant