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
<p>自己回答下。查了很多资料都说到这个:</p>
Return code is: 400
400错误的含义是“错误的请求”,在这里的原因是往往是没有部署到nexus的仓库中。nexus的repository分三种类型:Hosted、Proxy和Virtual,另外还有一个repository group(仓库组)用于对多个仓库进行组合。部署的时候只能部署到Hosted类型的仓库中,如果是其他类型就会出现这个400错误。 具体是那里大牛们帮忙看看
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。