項目發佈到 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代表不穩定、尚處於開發中的版本,所以不允許上傳私服倉庫

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章