Publishing to a Nexus Release repository from Studio fails with:
An error occurred (400 Bad Request)
java.io.IOException: Transfer to /org/example/WebService/0.1.0/WebSerivce-0.1.0.zip failed 400 Bad Request
The Nexus Release repository has a setting that prevents redeployment. This prevents the same version of a Job from being published. This setting can be found in Releases > Configuration > Deployment Policy.
Resolution
There are two possible solutions:
- Update the Job version and publish.
-
Change the Deployment Policy value in Nexus to Allow Redeploy.
- Navigate to your local Nexus folder (the default location is http://localhost:8091/nexus/).
- Select Views/Repositories > Repositories.
- Open Releases.
- Select Configuration.
-
Under Acess Settings, change the Deployment Policy to Allow Redeploy:

It's always advisable (though not required) to deploy or redeploy Jobs in Snapshot, and when the final build is ready, then deploy it to Releases.