创建一个 ant 文件来运行其他 ant 文件 [英] Create an ant file to run other ant files

查看:37
本文介绍了创建一个 ant 文件来运行其他 ant 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了这个相关问题,但我的情况不同,所以再次询问.基本上,我必须按特定顺序运行 12 个 ant 文件.对于每个 ant 文件,我选择不同的目标,例如创建"或构建并部署全部".如何创建一个 ant 文件来为所有这些文件调用正确的目标?

I saw this relevant question but my situation is different so asking this again. Basically, I have 12 ant files that I have to run in a specific sequence. For each ant file, I select a different target, such as "create" or "build and deploy all." How can I create an ant file that will call of the right targets for all of these files?

Pseudocode:

<Call antFile1, "clean">
<Call antFile1, "create">
<Call antFile2, "build">
        .
        .
        .
<Call antfile12, "build and deploy all">

推荐答案

在包含 ant 文件中可能有如下目标:

Maybe have a target like below in encompassing ant file:

<target name="all">
     <ant antfile="antFile1" target="clean" />
     <ant antfile="antFile2" target="create" />
     ...
</target>

请参考:http://ant.apache.org/manual/Tasks/ant.html

这篇关于创建一个 ant 文件来运行其他 ant 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆