gnodet commented on PR #14101: URL: https://github.com/apache/maven/pull/14101#issuecomment-7193197187
> -1 > > These proprietary services should not enter Maven codebase. Maven consumes "central", but it is wrong to (colloquially) say "I deploy to Central". This is in fact the mixup Njord was pushing to clear up. > > Long log time ago, Maven2 _did publish to Central_ via DAV, then we got OSS, then we got OSS1 too, then they vanished and we got "central portal". ASF users deploy to Central (and always had) by deploying to RAO instead. Similarly, Eclipse forge does something else. > > So, while consumption bit of "I consume from central" is pretty much unchanged since existence of Central, as we can see, deploy does not, moreover, these services wildly varies what and how they can do these things. > > So, conflating "I consume Central" and "I deploy to Central (via this or that _service_)" is IMHO wrong. > > In other words, conflating "central" server ID to Maven Central _and the service one uses to publish via_ is wrong. Please follow Njord guidelines, and let your POM (or settings.xml) contain "sincere" (truth, like "sonatype-porta" or whatever) entries, instead of conflated ones, as they just increase confusion. Again, portal, ossrh, rao etc are just distinct services that all you to publish to central. But nowhere are they _same thing_ (not even domain or protocol-wise). @cstamas you raise a valid point about the conceptual separation between consuming Central and publishing to it via a specific service. The Njord direction is right for the long term. That said, this is a regression: before the credential scoping introduced in #12954, a server central would naturally authenticate against any URL using that ID, including [central.sonatype.com](http://central.sonatype.com/). The scoping hardening (which was the right security move) inadvertently broke deployments via central-publishing-maven-plugin, which uses central as its default publishingServerId out of the box. I think we can reconcile both concerns. Rather than silently auto-adding the Sonatype origins, what if the fix emitted a deprecation warning when it kicks in? ``` [WARNING] Server 'central' credentials were automatically extended to https://central.sonatype.com/ and https://ossrh-staging-api.central.sonatype.com/ to restore pre-3.10.0 deployment behavior. To suppress this warning, declare the origins explicitly in settings.xml using <repositoryOrigins>, or configure your publishing plugin to use a dedicated server ID (publishingServerId). This automatic binding will be removed in a future release. ``` This gives us: - The regression fix today, with zero breakage for existing users - A clear migration path toward the "sincere" server ID that cstamas advocates - repositoryOrigins promoted as the explicit, documented idiom - A lever to remove the auto-binding in a future release once the ecosystem has migrated The warning would fire once per session (not on every request) to avoid noise. @slachiewicz would you be open to adding this to the current PR? -- 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]
