Ant目标执行(仅执行,不等待完成) [英] Ant target execution(Just execute, not wait to complete)

查看:164
本文介绍了Ant目标执行(仅执行,不等待完成)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我有一个构建文件,例如

Currently I have one build file like

 <target name="test1">
    </target>
    <target name="test2">
    </target>
    ....
    <target name="test" depends="test1,test2">
    </target>

有一个问题,当运行目标"test1"时,ant总是超时(与Dev确认,ant正在等待运行时完成的某些后端任务,这是正确的).

There is one problem, when run target "test1", ant always timeout(Confirm with Dev, ant is waiting for some back-end task completed in Runtime, this is correct)。

但是基于此,整个test的执行将被test1的失败所破坏,而test2的执行将不会被执行.

But based on that, the whole ant execution will be interruppted by the failure of test1, test2 will not be executed.

所以问题是有什么办法告诉蚂蚁,对于test1,您只执行它,而不等待它完成,然后您就可以直接转到test2目标.

So question is is there any way to tell ant, for test1, you only to execute it, not to wait it completed, then you can go to test2 target directly.

推荐答案

也许 antcontrib 的忘记任务很有用:

Maybe the forget task of antcontrib is useful :

忘记"任务将按顺序执行一组任务 后台线程.
一旦启动线程,就返回控件 到调用目标.这对于能够启动
后台服务器进程,例如Web服务器.这使您不 必须使用并行任务来启动服务器进程.

The Forget task will execute a set of tasks sequentially as a background thread.
Once the thread is started, control is returned to the calling target. This is useful in being able to kick
off a background server process, such as a webserver. This allows you to not have to use the parallel task to start server processes.

这篇关于Ant目标执行(仅执行,不等待完成)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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