Re: When running Ant on command line, how to not-show its WARNING messages and only show ERROR messa

Discussion in 'Java' started by John B. Matthews, Dec 9, 2011.

  1. In article
    <>,
    www <> wrote:

    > Hi:
    >
    > I am running Ant on command line, there are many, many WARNING
    > messages, cluttering my screen:
    >
    > [javac] xx.java:48: warning: [unchecked] unchecked call to
    > <K1,V1>build(com.google.common.cache.CacheLoader<? super K1,V1>) as a
    > member of the raw type com.google.common.cache.CacheBuilder
    > [javac] return builder.build(new
    > CacheLoader<LocationAndDataTypeIdentifier, IdentifierZipFileHandler>()
    > [javac] ^
    > [javac] www.java:48: warning: [unchecked] unchecked conversion
    > [javac] found : com.google.common.cache.Cache
    > [javac] required: com.google.common.cache.Cache ...
    >
    > ...
    >
    > [javac] 1 error
    > [javac] 52 warnings
    >
    > BUILD FAILED
    > /a/b/c/build.xml:106: Compile failed; see the compiler error output
    > for details.
    >
    > I hope to make these warning message go away.


    I see in the documentation that the build.compiler.warnings command line
    option is deprecated, but the javac nowarn attribute is available.

    <http://ant.apache.org/manual/Tasks/javac.html>

    Why not suppress the warnings with an annotation? Comment on the
    provably correct ones and mark the others TODO.

    > I cannot see the compiler error either. There is no a output file.
    > Should the error be on the screen?


    Did you re-direct stderr?

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Dec 9, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roedy Green
    Replies:
    5
    Views:
    2,299
    Gene Wirchenko
    Dec 13, 2011
  2. Lew
    Replies:
    0
    Views:
    673
  3. thunk
    Replies:
    1
    Views:
    307
    thunk
    Mar 30, 2010
  4. thunk
    Replies:
    0
    Views:
    472
    thunk
    Apr 1, 2010
  5. zyng
    Replies:
    34
    Views:
    3,915
    Gene Wirchenko
    May 7, 2012
Loading...

Share This Page