Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/321.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

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
Java Ant如何根据参数从build.xml调用另一个xml文件_Java_Ant - Fatal编程技术网

Java Ant如何根据参数从build.xml调用另一个xml文件

Java Ant如何根据参数从build.xml调用另一个xml文件,java,ant,Java,Ant,我有3个xml文件build.xml,build_1.xml,build_2.xml。build_1.xml、build_2.xml文件的目标名为“compress” 我如何配置build.xml文件,当我调用'ant compress 1'时,它从build\u 1.xml文件运行compress target,并在'ant compress 2的情况下从build\u 2.xml相应地运行compress target 见 据我所知,您的build.xml文件中需要以下两个目标: <t

我有3个xml文件
build.xml,build_1.xml,build_2.xml
build_1.xml、build_2.xml
文件的目标名为“
compress

我如何配置
build.xml
文件,当我调用'
ant compress 1
'时,它从
build\u 1.xml
文件运行compress target,并在'
ant compress 2
的情况下从
build\u 2.xml
相应地运行compress target

据我所知,您的build.xml文件中需要以下两个目标:

<target name="ant compress 1">
    <ant antfile="build_1.xml" target="compress"/>
</target>

<target name="ant compress 2">
    <ant antfile="build_2.xml" target="compress"/>
</target>


有没有办法从build.xml上的另一个目标中创建对“ant compress 1”的调用?我结束了导入文件的过程,并使用
depends
,thru depends=“”,我们可以选择另一个xml目标