从单个构建脚本调用多个构建脚本? build.xml

Invoke multiple build scripts from single build script ? build.xml

我有 3 个构建脚本,每个脚本创建一个 jar 文件。

如何从单个 build.xml 调用所有这些构建脚本?

尝试了以下脚本 (build.xml),但它始终只调用 1 个脚本 (build1.xml) 并创建 build1.jar 并退出流程。不处理其他 2 个构建脚本(build2.xml 和 build3.xml)。

求推荐。

<project name="Message Broker Build - DOCGEN" default="all">

<import file="build1.xml"/>
<import file="build2.xml"/> 
<import file="build3.xml"/>


<target name="all" depends="build1, build2, build3"></target>

</project>

您可以使用 ant task 在其他脚本文件上 运行 apache ant

<ant antfile="build1.xml" />
<ant antfile="build2.xml" />
<ant antfile="build3.xml" />

可以使用 target 选项指定每个文件中的 target