java - Javac: Treat warnings as errors -
I have an ant file that compiles my program, when I receive a notification of any warning by the compiler, I want to fail Any clues on how to do this?
Use
-wire
flag this -help
is not listed in the output, but it works.
I found it in my own code (ant with netbans) and checked it. The output was:
MyClass.java:38: WARNING: [serial] Serializable class, there is no definition of a kind of mailclass. VNUIID public class Mykles has expanded to JakomNennet {1 warning bullet has failed (total time: 3 seconds)
Note that this is only Java 6, though.
Edit : An example of specifying it in the ant build file:
& lt; Javac srcdir = "$ {src.dir}" destdir = "$ {classes.dir}" classpathref = "classpath" & gt; & Lt; Compilerarg value = "- existent: all" /> & Lt; Compilerarg value = "- panic" /> & Lt; / Javac & gt;
Comments
Post a Comment