nant.onsuccess / nant.onfailure的Ant等价物 [英] Ant equivalent of nant.onsuccess / nant.onfailure

查看:162
本文介绍了nant.onsuccess / nant.onfailure的Ant等价物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

楠有两个<一个href=\"http://nant.sourceforge.net/release/latest/help/fundamentals/properties.html#built-in-properties\"相对=nofollow>内置属性, nant.onsuccess nant.onfailure ,为指定任务分别成功和失败的运行。

NAnt has two built-in properties, nant.onsuccess and nant.onfailure, for specifying tasks to run on success and failure respectively.

是否有蚂蚁等效?

推荐答案

我不认为有一只蚂蚁等价的,但你可以使用的 trycatch (蚂蚁的contrib部分)

I don't think there's an ant equivalent but you could use trycatch (part of ant-contrib)

<trycatch>
  <try>
    <!-- Your code here -->
    <!-- Success message -->
  </try>
  <catch>
    <!-- Fail message -->
  </catch>
</trycatch>

希望这有助于

这篇关于nant.onsuccess / nant.onfailure的Ant等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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