Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ant 如何将条件放入build.xml文件的exec中?_Ant_Parameters_Exec_Build.xml - Fatal编程技术网

Ant 如何将条件放入build.xml文件的exec中?

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

如何在从Hudson调用的
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,因为它更容易阅读。

你说的话很有用,但我需要这样说: