Maven 部署因冲突而失败
Maven deployment fails with conflict
我尝试了以下 maven 命令,
- mvn clean install
- mvn clean package
- mvn clean deploy
前两个成功,但是最后一个(部署)失败并显示以下错误消息。对此的任何建议都会有所帮助
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project blkmessenger-parent: Failed to deploy artifacts: Could not transfer artifact com.jd.terf:blkmessenger-parent:pom:1.10.0-RC1-20190627.131740-1 from/to blkmessenger.snapshots (http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots): Failed to transfer file: http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots/com/jd/terf/blkmessenger-parent/1.10.0-RC1-SNAPSHOT/blkmessenger-parent-1.10.0-RC1-20190627.131740-1.pom. Return code is: 409, ReasonPhrase: Conflict. -> [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,确保您的 groupId、artifact 和版本格式正确(版本以“-SNAPSHOT”结尾)。
为什么 Artifactory return 部署时出现 409 错误有几个原因:
- 将快照版本部署到不允许快照的存储库 - 处理快照设置为 false
- 将发布版本部署到不允许发布的存储库 - 处理发布设置为 false
- Checksum policy 设置为 "Verify against client checksums" 并且客户端已发送校验和,但它与服务器上计算的校验和然后 Artifactory
冲突
- Suppress POM Consistency设置为true,POM里面的groupId:artifactId:version信息与部署的路径不匹配
- A user plugin 可能会因为某些原因决定 return 409 错误
我尝试了以下 maven 命令,
- mvn clean install
- mvn clean package
- mvn clean deploy
前两个成功,但是最后一个(部署)失败并显示以下错误消息。对此的任何建议都会有所帮助
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project blkmessenger-parent: Failed to deploy artifacts: Could not transfer artifact com.jd.terf:blkmessenger-parent:pom:1.10.0-RC1-20190627.131740-1 from/to blkmessenger.snapshots (http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots): Failed to transfer file: http://jd.artifactory.net:8081/artifactory/blkmessenger/snapshots/com/jd/terf/blkmessenger-parent/1.10.0-RC1-SNAPSHOT/blkmessenger-parent-1.10.0-RC1-20190627.131740-1.pom. Return code is: 409, ReasonPhrase: Conflict. -> [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,确保您的 groupId、artifact 和版本格式正确(版本以“-SNAPSHOT”结尾)。
为什么 Artifactory return 部署时出现 409 错误有几个原因:
- 将快照版本部署到不允许快照的存储库 - 处理快照设置为 false
- 将发布版本部署到不允许发布的存储库 - 处理发布设置为 false
- Checksum policy 设置为 "Verify against client checksums" 并且客户端已发送校验和,但它与服务器上计算的校验和然后 Artifactory 冲突
- Suppress POM Consistency设置为true,POM里面的groupId:artifactId:version信息与部署的路径不匹配
- A user plugin 可能会因为某些原因决定 return 409 错误