Ant:如何禁用所有非错误消息?

时间:2010-05-19 11:03:26

标签: command-line ant build-process warnings

在我的Netbeans项目中从命令行运行ant时,我收到以下消息数百次,这非常烦人:

Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:depend
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:nbjpdastart
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:debug
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/1:java

根据项目的类型,可以有更多这样的线。

这是 -q-quiet选项。

任何想法,如何禁用此消息?

谢谢!

1 个答案:

答案 0 :(得分:2)

有点像黑客攻击,但是如果你使用类似unix的系统,也许可以:

alias ant="ant | grep -v 'Trying to override old definition of task'"