How to solve 405 error on maven build to Nexus 3?

stara picture stara · Jun 16, 2016 · Viewed 10.1k times · Source

I have created proxy repos in Nexus 3 pointing to Nexus 2 hosted repositories. This is to snapshot and release repositories on Nexus 2. Now, on distributionManagement tag, I am using the proxy URLs and trying do a mvn clean deploy. I am getting the following error:

[INFO] Error deploying artifact: Failed to transfer file: http://nexus3url/repository/m2-snapshots/path/abc-1.1.4-SNAPSHOT.pom. Return code is: 405

Has anyone tried this?

Answer

DarthHater picture DarthHater · Nov 15, 2016

As indicated in the comments, you can only deploy to Maven Hosted Repositories, not Proxies. This is by design.