我们正在使用hudson上的maven发布插件并尝试自动执行发布过程.发布:准备工作正常.当我们尝试执行release:perform时,它会失败,因为它会尝试将源工件两次上传到存储库.
我试过的东西,
它仍然吐出这个错误.
[INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[INFO] [DEBUG] Checking for pre-existing User-Agent configuration.
[INFO] [DEBUG] Adding User-Agent configuration.
[INFO] [DEBUG] not adding permissions to wagon connection
[INFO] Uploading: http://xx.xx.xx.xx:8081/nexus/content/repositories/releases//com/yyy/xxx/hhh/hhh-hhh/1.9.40/hhh-hhh-1.9.40-sources.jar
[INFO] 57K uploaded (xxx-xxx-1.9.40-sources.jar)
[INFO] [DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[INFO] [DEBUG] Using Wagon implementation lightweight from default …Run Code Online (Sandbox Code Playgroud) 当我mvn release:perform在父POM上执行时,服务器正在响应有关其中一个子项目(文件名已编辑)的错误:
[错误]无法在项目上执行目标org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file(default-cli):无法部署工件:无法将工件从/向存储库传输:无法转移文件.返回码为:400,ReasonPhrase:错误请求.
但是,此子项目的所有文件都已成功上载!我看到一个新目录(以发行版本号命名),它包含了人们所期望的所有.jar,.pom,.md5和.sha1文件.
我无法访问Nexus服务器,但我想知道是什么原因造成的,以及如何解决它.是否有可能Maven试图两次上传这个特定的子项目?如果是这样,为什么Maven会这样做,我怎么能阻止它呢?
更新:如果你有同样的问题,请与最upvotes答案这个职位.我跑了mvn help:effective-pom,发现有问题的项目实际上有两次部署阶段的执行.删除其中一个执行解决了我的问题.
[通过maven-release-plugin发布,在Atlassian Stash上托管的Git repos触发了Jenkins的构建管道.
有没有办法阻止释放触发新的管道运行?发生这种情况是因为已释放的pom文件已提交回Stash.鉴于刚刚发生了构建(进入发布工作),这完全是不必要的,因为从上一次构建发生的所有变化都是pom文件版本号.