Apache的Ant构建循环 [英] Apache ant buildfile looping

查看:298
本文介绍了Apache的Ant构建循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里所有初学者主。

我试图使目标在重新启动本身,当它达到一定的条件的build.xml文件。我已经搜查高和低,我不能拿出一个解决方案,以使目标......好循环。
我坚持就这个问题和它的驾驶我疯了,所以任何帮助表示欢迎。

I'm trying to make a target in a build.xml that restarts itself when it meets a certain condition. I've searched high and low and I can't come up with a solution to make the target...well...loop. I'm stuck on this and it's driving me crazy, so any help is welcomed.

编辑:
这就是我要循环目标:

This is the target I want to loop:

<target name="prog" description="executes program">
            <parallel>      
                <daemons>       
                 <exec executable="mch" />
                </daemons>
            </parallel> 
    <exec executable="calculator" inputstring="$var">
        <redirector output="log.txt" />
    </exec>
    <delete file="log.txt" />
</target>

可执行创建一个文件时,它会关闭没有完成。因此,如果该文件存在与否我的循环条件是。

The executable creates a file when it closes without finishing. So my loop condition would be if that file exists or not.

推荐答案

使用重复,从羚羊一个额外的任务,解决了这一问题。

Solved the issue by using Repeat, an additional task from Antelope.

http://antelope.tigris.org/nonav/docs/manual/ bk03ch24.html

这篇关于Apache的Ant构建循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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