你可以使用Trycatch任务从Antcontrib
<trycatch property="error.message">
<try>
<echo message="Run integration test..."/>
<echo message="Start process"/>
<antcall target="launchTests"/>
</try>
<catch>
<echo message="Integration test failed"/>
</catch>
<finally>
<echo message="Kill the process"/>
<exec executable="kill -9 ..."/>
</finally>
</trycatch>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4420 次 |
| 最近记录: |