Codearte / gradle-nexus-staging-plugin

Automatize releasing Gradle projects to Maven Central.
Apache License 2.0
172 stars 26 forks source link

Nexus staging plugin connects to old OSS server. The new one should be https://s01.oss.sonatype.org #200

Closed therock24 closed 3 years ago

therock24 commented 3 years ago

This plugin is not working for newer modules that are being published, because sonatype is assigning them to the https://s01.oss.sonatype.org staging server, which is the new server.

The plugin still tries to connect to https://oss.sonatype.org, which will not work as the module is not registered on that server.

Can this be changed by any chance to allow setting a different staging repository URL?

szpak commented 3 years ago

A default server for the plugin is https://oss.sonatype.org , which is sane as the majority of projects leave there. The new projects use a different server and you - as described in readme - can configure the serverUrl variable to match your needs. Please let me know, if it is not enough.

therock24 commented 3 years ago

A default server for the plugin is https://oss.sonatype.org , which is sane as the majority of projects leave there. The new projects use a different server and you - as described in readme - can configure the serverUrl variable to match your needs. Please let me know, if it is not enough.

Yea, sorry, didn't properly check the Readme. Setting the serverUrl to the new server fixed the issue.

I think this should be added to the parameters or FAQ section, something like this: Important. Users registered in Sonatype after 24 February 2021 need to customize the serverURL: serverUrl = https://s01.oss.sonatype.org/service/local/

Otherwise, the task closeAndReleaseRepository will fail with 403: Forbidden, attempting to connect to the old server.

szpak commented 3 years ago

Definitely it is a good idea. Would you like to provide a PR with those changes? :-)

therock24 commented 3 years ago

Definitely it is a good idea. Would you like to provide a PR with those changes? :-)

Yea, I was just thinking about it, I will do it. Thanks for the quick reply!

szpak commented 3 years ago

Closing as serverUrl did a trick and your PR has been merged.

Btw, as you setup a new project, you might want to consider a swtich to a new plugin, which is a spiritual continuation of that one. See https://github.com/Codearte/gradle-nexus-staging-plugin/issues/193 .