我有一个 Jenkins 工作,它使用 maven 构建目标“干净的包部署”作为主 git 分支。但是,由于 nexus repo 不允许重新部署,如果 Jenkins 作业在没有更改版本的情况下第二次运行,它将失败并出现预期的 400 Bad Request 错误:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy)
on project common-library:
Failed to deploy artifacts: Could not transfer artifact
net.bacon.common:common-library:pom:1.2.13 from/to bacon-releases
(https://maven.bacon.com/nexus/content/repositories/releases):
Failed to transfer file:
https://maven.bacon.com/nexus/content/repositories/releases/net/bacon/common/common-library/1.2.13/common-library-1.2.13.pom.
Return code is: 400, ReasonPhrase:Bad Request.
任何人都可以提出不同的策略,从而可以在不使 Jenkins 工作失败的情况下运行部署目标吗?