xetus-oss / docker-archiva

A docker image for Apache Archiva
Apache License 2.0
55 stars 33 forks source link

Return code is: 405, ReasonPhrase: HTTP method PUT is not supported by this URL. #4

Closed benman1 closed 7 years ago

benman1 commented 7 years ago

Hi, I set up the archiva container and now I am using archiva for the first time. I can upload file manually over the web interface, however I am struggling using maven. I tried out different configuations and I am still trying to figure out the maven configuration for deployment to the archiva container. I've changed the project pom (as ) to point to the archiva server, and I've set up the credentials for a new archiva user with the role manager for the internal and snapshot repositories in my settings.xml. I am still getting the error "PUT method is not supported." I've tried out dav (no change), and I've searched around a lot, and it'd be of great help to get some more pointers on how to resolve this. I am pasting the error below to show the problem:

Cheers! Ben.

[INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ common --- [INFO] Installing /Users/benjamin/common/target/common-0.7-SNAPSHOT.jar to /Users/benjamin/.m2/repository/com/company/common/0.7-SNAPSHOT/common-0.7-SNAPSHOT.jar [INFO] Installing /Users/benjamin/common/pom.xml to /Users/benjamin/.m2/repository/com/company/common/0.7-SNAPSHOT/common-0.7-SNAPSHOT.pom [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ common --- Downloading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/maven-metadata.xml Uploading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.jar Uploading: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.764 s [INFO] Finished at: 2017-04-03T11:15:23+01:00 [INFO] Final Memory: 26M/263M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project common: Failed to deploy artifacts: Could not transfer artifact com.company:common:jar:0.7-20170403.101523-1 from/to snapshots (http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/): Failed to transfer file: http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/com/company/common/0.7-SNAPSHOT/common-0.7-20170403.101523-1.jar. Return code is: 405, ReasonPhrase: HTTP method PUT is not supported by this URL. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

benman1 commented 7 years ago

I've finally found the problem.

The repository url shouldn't be http://org-risk-jenkins-01.dev.company.com:8080/archiva/repository/snapshots/

but

http://org-risk-jenkins-01.dev.company.com:8080/repository/snapshots/

x-lhan commented 7 years ago

Glad you found the problem. Archiva standalone installation make the service available on / (ROOT) context since 1.4-M3. Closing this issue.

andrii-vv commented 5 years ago

To fix repository url - change Nexus Version to 'NEXUS3'.

223038472 commented 2 years ago

i am having same error message with corrected url https://nexusprod.corp.intranet:8443/repositories/maven-releases please help!

tkent commented 2 years ago

@223038472 - by the URL, I'm pretty sure you're at the wrong place. This is project is an apache archiva container, not nexus.