Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Nexus Pro 3 #320

Open
sradi opened this issue Feb 8, 2024 · 3 comments
Open

Support Nexus Pro 3 #320

sradi opened this issue Feb 8, 2024 · 3 comments
Labels
enhancement New feature or request for discussion

Comments

@sradi
Copy link
Contributor

sradi commented Feb 8, 2024

Hi,

io.github.gradle-nexus.publish-plugin fails with http 404, when I try to use it with Nexus Pro 3:

Execution failed for task ':initializeReleaseStagingRepository'.
> Failed to load staging profiles, server at https://<nexusProUrl>/repository/<repoName/ responded with status code 404, body:
  <!DOCTYPE html>
  <html lang="en">
  <head>
    <title>404 - Sonatype Nexus Repository</title>
...

The REST API of Nexus Pro 3 (3.63.0-01) doesn't seem to offer any endpoint for stagingProfiles. Instead, one is supposed to tag artifacts and stage them by moving them to another repository (/v1/staging/move/{destination}?tag=...).

Do I assume correctly, that this Plugin is only compatible with Nexus Pro 2.x?
If this plugin could offer to add a tag to each published artifact, this would help a lot for staging or dropping a set of artifacts.

@szpak
Copy link
Contributor

szpak commented Feb 8, 2024

Nexus 3 is rewritten a piece of software from scratch with completely different API. This plugin supports only Nexus 2 which powers The Central Repository (aka Maven Central). I also haven't heard about the Sonatype plans to switch publishing to TCR to Nexus 3. The main use case it to publish artifacts to TCR.

If this plugin could offer to add a tag to each published artifact, this would help a lot for staging or dropping a set of artifacts.

It looks like the completely new API. I would be probably hard to maintain both APIs (and related workflows) in the same plugin.

Let's keep this request open, but probably it would be easier to write a separate plugin for that (but I haven't analized the problem in depth).

@szpak szpak added enhancement New feature or request for discussion labels Feb 8, 2024
@sradi
Copy link
Contributor Author

sradi commented Feb 11, 2024

Thanks for the clarification. I wasn't aware, that Nexus 3 is a completely rewritten Software.

I totally agree, that it doesn't make sense to squeeze support for both Nexus versions into this plugin.
What do you think about making the docs clearer on, what Nexus versions are supported?

In case, the Sonatype Enterprise Support shares some best practices with me, how to publish to Nexus Pro 3 from Gradle, I am going to share it here.

@szpak
Copy link
Contributor

szpak commented Feb 11, 2024

What do you think about making the docs clearer on, what Nexus versions are supported?

Good idea. I believe, you are the second person with the similar problem. Would you like to create a PR with the proposed change?

In case, the Sonatype Enterprise Support shares some best practices with me, how to publish to Nexus Pro 3 from Gradle, I am going to share it here.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for discussion
Projects
None yet
Development

No branches or pull requests

2 participants