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
Scripting 从其他Ant脚本执行Ant脚本?_Scripting_Ant - Fatal编程技术网

Scripting 从其他Ant脚本执行Ant脚本?

Scripting 从其他Ant脚本执行Ant脚本?,scripting,ant,Scripting,Ant,我有几个Ant脚本,例如ant1.xml、ant2.xml、ant3.xml。我想在ant3.xml中执行ant1.xml和ant2.xml,这样当我执行ant3.xml时,就会执行ant1.xml和ant2.xml 有人能告诉我一些方法吗?使用Import或include命令导入ant3.xml中的ant1.xml和ant2.xml <import file="ant1.xml"/> 将ant1和ant2中的预期目标设置为默认值-下面的示例 <project defau

我有几个Ant脚本,例如ant1.xml、ant2.xml、ant3.xml。我想在ant3.xml中执行ant1.xml和ant2.xml,这样当我执行ant3.xml时,就会执行ant1.xml和ant2.xml


有人能告诉我一些方法吗?

使用Import或include命令导入ant3.xml中的ant1.xml和ant2.xml

<import file="ant1.xml"/>

将ant1和ant2中的预期目标设置为默认值-下面的示例

<project default="compile-ant1">

<project default="compile-ant2">

这将根据需要在ant3中运行


有关更多详细信息,请参见此处:

@martin clayton:谢谢您的编辑。我敢肯定,当我第一次发布链接时,它是有效的