How to check if an Ant task is available in the current JVM?

All our projects' build.xml files, designed to be run in Eclipse, contain invocations to the special <eclipse.refreshLocal depth="infinite" resource="/" /> defined only in Eclipse.

We must configure Ant to use the same JVM as the workspace in order for it to be run, otherwise we get an error.

In order to export the same build scripts to platforms such as Bamboo and Travis, how do I modify the invocation in order to be conditional? I mean, if the task is not found, just ignore it. If I run my Ant scripts in Bamboo I expect an error for sure!

链接地址: http://www.djcxy.com/p/44412.html

上一篇: 从Eclipse运行Ant脚本后缺少输出文件

下一篇: 如何检查当前JVM中是否有Ant任务?