ant 使用trycatch

http://ant-contrib.sourceforge.net/

下载和配置

使用方法参考下面

   1: <trycatch property="error.message">
   2:   <try>
   3:     <echo message="Run integration test..."/>
   4:     <echo message="Start process"/>
   5:     <antcall target="launchTests"/>
   6:   </try>
   7:  
   8:   <catch>
   9:     <echo message="Integration test failed"/>
  10:   </catch>
  11:  
  12:   <finally>
  13:     <echo message="Kill the process"/>
  14:     <exec executable="kill -9 ..."/>
  15:   </finally>
  16: </trycatch>
posted @ 2013-04-04 11:21  atskyline  阅读(591)  评论(0编辑  收藏  举报