【问题标题】:Running multiple ant builds sequentially from batch file从批处理文件顺序运行多个 ant 构建
【发布时间】:2014-11-11 18:40:12
【问题描述】:

我正在尝试找到一种从命令行按顺序运行多个 Ant 构建的方法。我无法直接编辑构建文件。这是我所拥有的:

@echo off
cd c:\my\first\buildfile\dir
ant -buildfile build1.xml target1 target2
cd c:\my\second\buildfile\dir
ant -buildfile build2.xml target1 target2 target3

我希望能够在多个项目中使用与此类似的东西。但是,它目前只运行第一个构建(它似乎构建了两个目标),然后停止,并且不会继续下一个。我确信这个问题的解决方案可能很明显,但这是我第一次从命令行使用 Ant。我通常从 Eclipse 内部运行它。如果可能的话,我将如何从一个批处理文件中运行多个 ant 构建?

【问题讨论】:

标签: batch-file ant build sequential


【解决方案1】:

您可以尝试以下方法:

@echo off
cd c:\my\first\buildfile\dir
call ant -buildfile build1.xml target1 target2
cd c:\my\second\buildfile\dir
call ant -buildfile build2.xml target1 target2 target3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-12-18
    • 1970-01-01
    • 1970-01-01
    • 2011-07-25
    • 1970-01-01
    • 1970-01-01
    • 2011-05-22
    相关资源
    最近更新 更多