如果使用此命令,我可以上传到Nexus ...
mvn deploy:deploy-file -Dfile=target/common-2.0.0.jar -DgroupId=com.test -DartifactId=test-common -Dversion=2.0.0 -Dpackaging=jar -DrepositoryId=TEST-REPO -Durl=https://nexus.xxx.xxxx.net/content/repositories/test
如果我使用此命令
mvn deploy -DskipTests -DrepositoryId=TEST-REPO -DaltReleaseDeploymentRepository=releases::default::https://nexus.xxxx.xxxx.net/repository/test/
我收到此错误消息...
[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ common ---
[INFO] Using alternate deployment repository releases::default::https://nexus.xxx.xxx.net/repository/test/
Uploading to releases: https://nexus.xxx.xxx.net/repository/test/com/test/common/2.0.0/common-2.0.0.jar
Uploading to releases: https://nexus.xxx.xxx.net/repository/test/com/test/common/2.0.0/common-2.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:08 min
[INFO] Finished at: 2019-05-16T14:55:35+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project common:
Failed to deploy artifacts: Could not transfer artifact
com.test:common:jar:2.0.0 from/to releases (https://nexus.xxx.xxx.net/repository/test/):
Failed to transfer file: https://nexus.xxx.xxx.net/repository/test/common/common-2.0.0.jar. Return code is: 400, ReasonPhrase: HTTP method PUT is not supported by this URL. -> [Help 1]
有人知道命令“ deploy:deploy-file”是否使用HTTP POST,但命令“ deploy”是否使用HTTP PUT吗?
还是我可以强制它使用HTTP POST?
注意: Nexus版本为:Nexus Repository Manager OSS 2.14.4-03
Maven版本是3.0.5,并尝试过3.6.1
我发现... Nexus 3不支持POST上传。请改用PUT。