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

发布于 2024-09-02 14:20:08 字数 666 浏览 6 评论 0原文

当我在 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 选项。

知道如何禁用此消息吗?

谢谢你!

When running ant from command line on my Netbeans projects, I get the following messages hundreds of times, which is very annoying:

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

Depending of the kind of the project, there can be much more of such lines.

And this is with the -q or -quiet option.

Any idea, how to disable this message?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪意 2024-09-09 14:20:08

有点 hack,但如果你使用的是类 UNIX 系统,也许可以这样做:

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

A bit of a hack, but if you are on a unix like system, perhaps do:

alias ant="ant | grep -v 'Trying to override old definition of task'" 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文