Search code examples
mavenartifactory

405 error when deploying to virtual artifactory repository


I setup an Maven artifactory repo using the "Quick Repository Creation" function available through the web UI and was able to deploy to the virtual repository without issue. Then the virtual repo got accidentally deleted so I created a new version of it by hand, specifying that it include the original local repo.

After recreating the virtual repo, however, I started to get a 405 error on deploys. I double/triple checked typos and am not seeing anything. I looked for a way to specify access controls for a virtual repo, but I couldn't find anything in the web UI to allow that; I gather they just inherit the access controls associated with the local or remote repos they include.

Not sure it matters, but I'm using this maven deploy plugin for the deploy.

I'm confident I could get things working again by deleting both the local and virtual repos and recreating them through Quick Repository Creation function, but I'd like really like to understand what the issue is so that have a better model in my head of how the virtual repositories work.


Solution

  • If the 405 message looks like

    {
      "errors" : [ {
        "status" : 405,
        "message" : "No local repository was configured as local deployment repository for the (maven-virtual) virtual repository."
      } ]
    }
    

    In the virtual repository configuration, make sure you set the "Default Deployment Repository" to the local repository.