蚂蚁 - 在每一个构建结束运行的目标 [英] ant - Running a target at the end of every build
问题描述
有没有办法始终运行在的最终目标的每个版本的?
Is there a way to always run a target at the end of every build?
我知道我可以做这样的事情...
I know I can do something like this...
<target name="runJob" depends="actuallyRunJob, teardown"/>
...但这是马虎,因为我需要一个包装为每一个需要拆除的目标。
... but that's sloppy, since I'd need a wrapper for every target that needs a teardown.
任何想法?
谢谢,
罗伊
推荐答案
使用buildlistener,F.E.在那里你可以把你所有需要的任务结果|中将exec监听器,为每个构建结果结果一个taskcontainer(BUILD构建失败成功的)
看<一个href=\"http://stackoverflow.com/questions/6387319/conditional-task-on-exec-failure-in-ant/6391165#6391165\">Conditional任务在蚂蚁 EXEC失败进一步的细节结果
或推出自己的身材监听器,见=结果
http://ant.apache.org/manual/develop.html 结果
并从您的蚂蚁安装=结果的API文档
$ ANT_HOME /文档/手动/ API /组织/阿帕奇/工具/ ANT / BuildListener.html
use a buildlistener, f.e. the exec-listener which provides a taskcontainer for each build result
( BUILD SUCCESSFUL | BUILD FAILED ) where you can put all your needed tasks in
see Conditional Task on exec failure in Ant for further details
or roll your own build listener, see =
http://ant.apache.org/manual/develop.html
and the api docs from your ant installation =
$ANT_HOME/docs/manual/api/org/apache/tools/ant/BuildListener.html
这篇关于蚂蚁 - 在每一个构建结束运行的目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!