Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: When running Ant on command line, how to not-show its WARNING messages and only show ERROR message? Date: Fri, 9 Dec 2011 17:46:13 -0800 (PST) Organization: http://groups.google.com Lines: 56 Message-ID: <8577219.1484.1323481573410.JavaMail.geo-discussion-forums@prez15> References: <769dffa0-4077-4a3a-ad9a-57c5f5028cd8@l19g2000yqc.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 2620:0:1000:2404:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1323481657 1811 127.0.0.1 (10 Dec 2011 01:47:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 10 Dec 2011 01:47:37 +0000 (UTC) In-Reply-To: <769dffa0-4077-4a3a-ad9a-57c5f5028cd8@l19g2000yqc.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:2404:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10636 www wrote: > I am running Ant on command line, there are many, many WARNING > messages, cluttering my screen: That's because there are many, many bad code idioms cluttering up your prog= ram. > [javac] xx.java:48: warning: [unchecked] unchecked call to > build(com.google.common.cache.CacheLoader) as a > member of the raw type com.google.common.cache.CacheBuilder > [javac] return builder.build(new > CacheLoader() > [javac] ^ > [javac] www.java:48: warning: [unchecked] unchecked conversion ... such as improper generic conversions. I'm guessing there's a type relationship problem between the 'CacheLoader' = reference you showed us and the return type of the method, which you declin= ed to show us. > [javac] found : com.google.common.cache.Cache > [javac] required: > com.google.common.cache.Cache >=20 > ... >=20 > [javac] 1 error > [javac] 52 warnings >=20 > BUILD FAILED > /a/b/c/build.xml:106: Compile failed; see the compiler error output > for details. >=20 > I hope to make these warning message go away. I cannot see the > compiler error either. There is no a output file. Should the error be > on the screen? You show us some of the error messages that you say "clutter up your screen= ". Doesn't that count as "on the screen"? What do you mean "no a output file"? Ant reports all javac output in its output. Since you show us some of your= output, I conclude that the thing you want to see is in your output, just = not in the part you deigned to share. I've used Ant lots of times to compile, build and run Java programs. The o= utput shows up on the screen just as you showed it, every time, unless redi= rected. The output is the literal output of the 'javac' compiler, in the c= ase of compilation, and therefore contains all the information you can get = to track down your many, many bugs. --=20 Lew