5

I'm trying to upload my maven project to nexus after a success build on jenkins. Here are my both configurations:

Nexus Nexus

And the jenkins configuration: Jenkins

Here the error

Failed to deploy artifacts: 
Could not transfer artifact de.xxx:NettyCore:pom:1.0-20170508.212447-1 from/to cloud-repo (http://xxx:xxx/nexus/content/repositories/cloud-repo): 
Failed to transfer file: http://xxx:xxx/nexus/content/repositories/cloud-repo/de/xxx/NettyCore/1.0-SNAPSHOT/NettyCore-1.0-20170508.212447-1.pom. 
Return code is: 400, ReasonPhrase:Bad Request.
ERROR: Uploading file pom.xml failed.
Finished: FAILURE
Markus
  • 407
  • 2
  • 9
  • 25

1 Answers1

5

As mentioned in "400 BAD request HTTP error code meaning?", an error 400 means the request was malformed.

In your case, a possible cause is the GAV you want to send: the Version is 1.0-SNAPSHOT... sent to a release repo: that kind of version would be rejected by Nexus.
That "Repository policy" should be "snapshots" in order to accept 1.0-SNAPSHOT.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250