Ant 如何将条件放入build.xml文件的exec中?
如何在从Hudson调用的Ant 如何将条件放入build.xml文件的exec中?,ant,parameters,exec,build.xml,Ant,Parameters,Exec,Build.xml,如何在从Hudson调用的build.xml文件中的exec中放置条件 我只需要在发生某些事情(我发送了一些参数)时使用arg,并且我需要一个if任务或可以解决问题的条件。库中有一个if任务,它看起来像: <if> <my condition goes here> <then> </then> </if> <condition property="condition.to.set"> <my condition
build.xml
文件中的exec中放置条件
我只需要在发生某些事情(我发送了一些参数)时使用arg,并且我需要一个if任务或可以解决问题的条件。库中有一个if任务,它看起来像:
<if>
<my condition goes here>
<then>
</then>
</if>
<condition property="condition.to.set">
<my condition goes here>
</condition>
在raw Ant中,您使用如下所示的:
<if>
<my condition goes here>
<then>
</then>
</if>
<condition property="condition.to.set">
<my condition goes here>
</condition>
然后是一个条件目标:
<target name="mine" if="condition.to.set">
我更喜欢Ant Contrib,因为它更容易阅读。你说的话很有用,但我需要这样说: