Ant target execution(Just execute, not wait to com

2019-08-29 16:39发布

Currently I have one build file like

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

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)。

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

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.

标签: ant wait target
2条回答
我想做一个坏孩纸
2楼-- · 2019-08-29 17:08

ANT has a parallel task which can be used to run tasks in the background. You might have to restructure your build logic to make use of this.

查看更多
狗以群分
3楼-- · 2019-08-29 17:28

Maybe the forget task of antcontrib is useful :

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.

查看更多
登录 后发表回答