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

Try to support nexus 2.x staging for b2 builds #146

Open
u3r opened this issue May 19, 2015 · 0 comments
Open

Try to support nexus 2.x staging for b2 builds #146

u3r opened this issue May 19, 2015 · 0 comments

Comments

@u3r
Copy link
Contributor

u3r commented May 19, 2015

The nexus-staging-plugin does not fully substitute the maven-deploy plugin.
The deploy-file goal is not supported.
B2 uses deploy-file to only upload important artifacts.
It would be nice to have a solution (somehow use maven:deploy) or even path the staging plugin (wrong place for the issue - i know)
I already filed a ticket with Sonatype and got this reply:
Answer from Sonatype:

Hi XXX,
We aren't planning any major new features for the nexus-staging-maven-plugin at this time because the staging feature is undergoing major changes in Nexus 3.x.
However, there are several ways you can achieve what you want using current functionality.
You could use a file:// URL with the maven-deploy-plugin:deploy-file goal, and then use the "deploy-staged-repository" of the nexus-staging-maven-plugin to stage the locally deployed repository to nexus.
Alternatively, you can use the REST API to upload artifacts to staging. The endpoint needed is "/service/local/staging/upload", and the syntax needed is pretty similar to the regular REST API for upload.
Using curl you could do this with:
curl -v -F e=jar -F g=com.test -F a=project -F v=1.0 -F p=jar -F [email protected] -F desc="some description" -u admin:admin123 http://localhost:8081/nexus/service/local/staging/upload

If you need to upload multiple artifacts to a single staging repository you can easily discover the needed call, see here for details on how:
http://blog.sonatype.com/2012/07/learning-the-nexus-rest-api-read-the-docs-or-fire-up-a-browser/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant