microsoft / vsts-nexus

VSTS Build Extension for integration with Sonatype Nexus
MIT License
12 stars 17 forks source link

Nexus 3.0 Not Supported (its REST APIs do not exist) #14

Open terminatur opened 7 years ago

terminatur commented 7 years ago

I currently have the docker container with nexus 3 installed. I am able to run the deployment from my local machine with the "mvn deploy" command, but when I attempt to deploy with this extension, I receive the following error:

[error]Upload failed, HttpResponse.statusCode: 405, HttpResponse.statusMessage: Method Not Allowed

My settings look like:

Do I possibly have the url formatted wrong? I have tried: http://name.westus.cloudapp.azure.com:8081/repository/ which gives a 404, not found error. http://name.westus.cloudapp.azure.com:8081/ which gives "Error: read ECONNRESET"

yacaovsnc commented 7 years ago

The endpoint doesn't look right. We have recorded a video tutorial here: https://www.youtube.com/watch?v=bIIIh0Ki0q0

Hope that helps. Thanks!

dev7dev8 commented 7 years ago

I think this does not support Nexus 3. I was unable to get this working in v3, but v2 worked just fine

ypupo2002 commented 7 years ago

This plugin does not supports nexus 3 because it depends on the nexus 2 rest api which isn't present on the v3.

For reference, see this issue #5 and this link: https://groups.google.com/a/glists.sonatype.com/forum/#!topic/nexus-users/eb7jeXKNgdU

davidstaheli commented 7 years ago

We're investigating adding Nexus 3 support right now.

ypupo2002 commented 7 years ago

As this plugin only supports uploading artifacts to maven repositories, it could relay on the standard http api used by maven clients. A reference implementation is the apache http provider for maven wagon located at https://github.com/apache/maven-wagon/tree/wagon-2.10/wagon-providers/wagon-http

yacaovsnc commented 7 years ago

It appears REST api is still not available in nexus v3.2. :(

As of now, if 'mvn deploy' works for you, a workaround would be using the Maven task and do the same.

terminatur commented 7 years ago

It's awesome you guys are active on this. I have decided to go with Nexus 2 for now, since that is working with the extension.

ajross commented 7 years ago

It would be great if you could make it more prominent that this extension currently only works with Nexus v2.

terminatur commented 7 years ago

Is there a time frame we can expect for support with Nexus 3?

davidstaheli commented 7 years ago

Hi @terminatur. Unfortunately, Nexus 3 still doesn't have REST APIs for this extension to upload into. The best solution for now is using a Maven pom.xml file to upload an artifact into Nexus via Nexus' Maven support. Just curious... would this workaround be a natural part of a Java build process for you, or are you uploading non-Java artifacts or using non-Java builds?

dangmike commented 7 years ago

Does Nexus 3 have any REST API's?

24mu13 commented 7 years ago

Seems so: http://books.sonatype.com/nexus-book/reference3/scripting.html

quartelh commented 7 years ago

Using curl it is quite easy to upload file to Nexus 3 (be it just the file, and not the associated pom file, and related md5 and sha... so it is a crude way to use Nexus as binary repository): curl -u <username>:<password> --upload-file <artifactId>-<version>.<extention> <url to nexus>/repository/<name of repository>/<groupId using '/' separators>/<artifactId>/<version>/<artifactId>-<version>.<extention>

optionally add --insecure when using https with a self-signed certificate.

Adhering to the Maven2 repo layout is important for this to work.

I use the cURL Upload File Task for this in VSTS to upload to Nexus 3.

IronCity commented 6 years ago

I currently have the docker container with nexus 3 installed too, I faced same issue when I try to deploy application into nexus 3 repository. Now I usedmvn deploy:deploy-file command I hope soon I can do deploy by pom.xml file to nexus 3 repository use mvn deploy command

mrpolaris commented 6 years ago

so looks like nexus 3 now supports apis https://help.sonatype.com/repomanager3/rest-and-integration-api

heresandyboy commented 5 years ago

Hi, It's been a while since there was any update on extension support for Nexus 3, since the API was added, how is everyone integrating these days? Still a combination of cURL and Maven tasks?

quartelh commented 5 years ago

Yes, we still use curl and maven, because this is sufficient for our situation. We do not use maven release plugin (like you normally do)Best regards, Herbert  -------- Oorspronkelijk bericht --------Van: Andy Ainsworth notifications@github.com Datum: 07-05-19 17:19 (GMT+01:00) Aan: microsoft/vsts-nexus vsts-nexus@noreply.github.com Cc: Herbert Quartel herbert@quartel.net, Comment comment@noreply.github.com Onderwerp: Re: [microsoft/vsts-nexus] Nexus 3.0 Not Supported (its REST APIs do   not exist) (#14) Hi, It's been a while since there was any update on extension support for Nexus, how is everyone integrating these days? Still a combination of cURL and Maven tasks?

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/microsoft/vsts-nexus/issues/14#issuecomment-490125219", "url": "https://github.com/microsoft/vsts-nexus/issues/14#issuecomment-490125219", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]