slachiewicz opened a new pull request, #14104: URL: https://github.com/apache/maven/pull/14104
A settings server with the id `central` could not authenticate snapshot deployments to Maven Central: the default repository binds that id to `https://repo.maven.apache.org`, so its credentials were withheld from `https://central.sonatype.com` and the deploy ended with `HTTP Status: 401`. The id is the default `publishingServerId` of `central-publishing-maven-plugin`. The id `central` is now also bound to the origins Central is published to, `https://central.sonatype.com` and `https://ossrh-staging-api.central.sonatype.com`, as long as the built-in location is its only origin. A mirror, a repository or a server `<repositoryOrigins>` that gives the id another origin takes over and nothing is added. The default repository's origin stays bound on purpose: a parent POM can declare a repository `central` at another host, and that binding is what withholds the credentials there. Verified: `mvn deploy:deploy -DaltDeploymentRepository=central::https://central.sonatype.com/repository/maven-snapshots/` with a settings server `central` on a 4.0.x build, against a local stand-in for `central.sonatype.com` → 401 without credentials before, deployed with credentials after. On master only the unit tests were run. I have not run the core ITs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
