Codearte / gradle-nexus-staging-plugin

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

How to handle DEPRECATION WARNING. The staging repository ID is not provided? #127

Closed pwittchen closed 3 years ago

pwittchen commented 4 years ago

Hi,

I used Gradle task closeAndReleaseRepository and got the warning:

DEPRECATION WARNING. The staging repository ID is not provided. The fallback mode may impact release reliability and is deprecated. Please consult the project FAQ how it can be fixed.

What should I do? Where should I provide repository ID and what does it really mean?

szpak commented 4 years ago

See the point in FAQ to add nexus-publish-plugin to better handle a staging repository resolution.

I will keep the issue open as I plan to rework the FAQ, the error message or even apply the nexus-publish-plugin automatically in a default configuration to make it more natural in reception.

pwittchen commented 4 years ago

Do I really need nexus-publish-plugin? I publish artifacts with custom groovy/gradle script and it works well and use gradle-nexus-staging-plugin for closing and releasing the artifacts. I don't want to add another dependency to the project (which I'm not going to use) just to remove the warning. I don't see any benefits from this as I already have working solution :). Maybe I'll wait for updated FAQ.

szpak commented 4 years ago

If you are not using Travis (or anything else that sends subsequent requests via different IP addresses) and release on project at the time (+ you manually clean up old staging repositories if anything goes wrong) then GNSP should enough for you (the feature is deprecated and I don't have any intermediate plans to remove it). However, as described in the FAQ, in this issue and in my blog post much more reliable is using GNPS together with NPP.

Btw, I rather planned to update FAQ how to start using NPP, not how to suppress the warning :).

pwittchen commented 4 years ago

Ok, I'll check it. Thanks!

Fleshgrinder commented 3 years ago

I am using nexus-publish-plugin but I still get this whenever I execute :closeRepository. I also noticed that the nexus-publish-plugin does not pick up my nexusUsername and nexusPassword credentials. It seems as if this seamless integration does not work anymore.

szpak commented 3 years ago

@Fleshgrinder It should work. Please provide a link to your project. Or, even better, please consider migration to our (my and Marc's) new plugin which - to avoid confusion like your - integrates GSNP and NPP into one plugin - GNPP.

Fleshgrinder commented 3 years ago

Here you go.

Last time I checked the plugin wasn't hosted anywhere but I see that 1.0.0 is out now. Will switch to it. 😊

szpak commented 3 years ago

1.0.0 has been released last weekend.

The configuration looks ok. Having a CI job would make it easier to analyze the output.

Fleshgrinder commented 3 years ago

I'm in the process of moving from bintray to Central so all this Nexus stuff is new to me so I first want to build up a solid understanding of the workflow before moving to automation. 😉

szpak commented 3 years ago

TL;TD. This issue does not occur in gradle-nexus-publish-plugin.

A longer version. To make releasing to Maven Central even easier, I and Marc Phillip (the author of nexus-publish-plugin) combined forces to create a next generation, unified, 2-in-1 plugin - gradle-nexus-publish-plugin. It is a recommended solution, as our development effort will be put in that new plugin. See my blog post and the official migration guide.