项目发布到 maven 私服报 Return code is: 400

错误如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project tanhz-core: Failed to retrieve remote metadata com.tanhz:tanhz-core:1.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.tanhz:tanhz-core:1.0-SNAPSHOT/maven-metadata.xml from/to snapshotsid (http://192.168.1.10:8081/repository/maven-releases/): Failed to transfer file: http://192.168.1.10:8081/repository/maven-releases/com/tanhz/tanhz-core/1.0-SNAPSHOT/maven-metadata.xml. Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow metadata in path: com/tanhz/tanhz-core/1.0-SNAPSHOT/maven-metadata.xml. -> [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

解决

修改pom.xml文件 ,去掉红色部分

snapshot代表不稳定、尚处于开发中的版本,所以不允许上传私服仓库

发布了13 篇原创文章 · 获赞 8 · 访问量 2万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览