idea mvn deploy 到 nexus 错误

向奕昌 发布于 2018/05/18 17:32
阅读 1K+
收藏 0

idea 直接构建打包到nexus报错。错误如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project pcd-web-framework: Failed to deploy artifacts: Could not transfer artifact com.maven.framework:pcd-web-framework🏺2.0.0 from/to nexus-releases (http://xxxxx/nexus/content/repositories/releases/): Failed to transfer file: http://xxxxx/nexus/content/repositories/releases/com/maven/framework/pcd-web-framework/2.0.0/pcd-web-framework-2.0.0.jar. Return code is: 400, 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

加载中
0
向奕昌
向奕昌

自己回答下。查了很多资料都说到这个:

 Return code is: 400
400错误的含义是“错误的请求”,在这里的原因是往往是没有部署到nexus的仓库中。nexus的repository分三种类型:Hosted、Proxy和Virtual,另外还有一个repository group(仓库组)用于对多个仓库进行组合。部署的时候只能部署到Hosted类型的仓库中,如果是其他类型就会出现这个400错误。  具体是那里大牛们帮忙看看

返回顶部
顶部