【问题标题】:Execute multiple build files using ant使用ant执行多个构建文件
【发布时间】:2020-10-27 12:01:18
【问题描述】:

我有不同的项目,每个项目都在一个文件夹中,每个项目都有一个唯一的 build.xml 文件。

示例 有一个主文件夹,在这 3 个不同的文件夹下称为 A、B 和 C。 在每个 A、B 和 C 文件夹中都有一个唯一的 build.xml 文件。

有没有办法通过使用通用的 build.xml 从 apache ant 执行所有这 3 个 build.xml 文件? 如果可以的话怎么做?

【问题讨论】:

  • 如果下面的答案解决了您的问题,请标记它和/或投票!谢谢。

标签: build ant


【解决方案1】:

这是<ant> 任务的基本目的。手册页包含许多示例和选项:https://ant.apache.org/manual/Tasks/ant.html

例如

<target name="build-subprojects">
   <ant antfile="subproject1/build.xml"/>
   <ant antfile="subproject2/build.xml"/>
</target>

【讨论】:

    猜你喜欢
    • 2014-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-03
    • 2017-02-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多