I have a question with respect to compiling java codes and building a jar file on Eclipse platform. I would like to know if the Create JAR
option on eclipse from a .jardesc
file will still create a JAR file inspite of errors in the compiled Java codes? If yes, how can i enable this option in my Ant build xml?
If you edit your .jardesc
in Eclipse (Open With – JAR Export Wizard), you can modify the behavior regarding errors/warnings on page two of the wizard:
.
This apparently toggles the attributes exportErrors
and exportWarnings
, respectively, at XPath /jardesc/options
in the .jardesc
file.
As far as the behavior of a corresponding Ant build file is concerned, you should probably take a look at the failonerror
parameter of the Javac Task.