如何防止Ant在命令窗口中显示[java]?

时间:2013-10-22 03:16:12

标签: java ant

当您通过Ant运行Java文件时,所有输出前面都有[java] - 标记。

你如何删除它?

示例:

 [java]            |            *
 [java]            | :irc.cs472.cs.drexel.edu
 [java]            | 372 test :- *    Welcome
 [java]            | on our new IRC server, ru
 [java]            | nning on:  *
 [java]            | :irc.cs472.cs.drexel.edu
 [java]            | 372 test :- *    Debian G
 [java]            | NU/Linux (www.debian.org)
 [java]            |            *
 [java]            | :irc.cs472.cs.drexel.edu
 [java]            | 372 test :- *************
 [java]            | *************************
 [java]            | ************
 [java]            | QUIT
 [java] Type \m to | :irc.cs472.cs.drexel.edu
 [java]  bring up  | NOTICE test :Connection s
 [java] the menu a | tatistics: client 0.1 kb,
 [java] t any time |  server 1.6 kb.
 [java] ___________________________________
 [java] Please enter your choice :

BUILD SUCCESSFUL
Total time: 1 minute 39 seconds

2 个答案:

答案 0 :(得分:1)

只需使用emacs参数运行ant即可摆脱装饰,例如。 :

ant -emacs -f build.xml

请参阅ant manual command line options

答案 1 :(得分:0)

您可以使用sed。将ant输出传送到...

sed " s/^\[JAVA\] //"