Hudson and maven-release-plugin

有些话、适合烂在心里 提交于 2019-12-10 02:50:08

问题


I'm using Hudson with the maven-release-plugin.

As you may know, the maven-release-plugin builds project in 2 steps: release:prepare, then release:perform.

How should I configure Hudson to execute release:rollback in case release:perform failed?


回答1:


The standard way of performing release with Hudson/Jenkins is the Jenkins M2 release plugin. It wraps the maven release plugin and automates its execution.




回答2:


Short answer: don't. Turn off update (do a clean checkout each time). FWIW, in my experience release:rollback isn't terribly reliable anyways.




回答3:


If this is absolutely needed, than you should be able to do a "Invoke top-level Maven targets" build step where you will invoke the release:prepare and release:perform and catch on the result of this build through a "Execute system groovy script" build step.
Take a look here how to check pom.xml for versions (it might give you an idea if the perform failed or not).



来源:https://stackoverflow.com/questions/4831080/hudson-and-maven-release-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!