To preface the problem, I have read the responses regarding "OutOfMemoryError: GC overhead limit exceeded" and other useful responses, so the focus of the question is not on the OutOfMemory error, but why ant failonerror="true"
appears to not be trapping the failure?
<java fork="true" dir="${deployDir}/jspc" classname="weblogic.appc" classpathref="appc.classpath" failonerror="true" >
<jvmarg line="-Xms1024M -Xmx1636M"/>
<arg line="-forceGeneration -verbose -deprecation ${sourceDir}/html"/>
</java>
The logs show:
[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] at com.bea.core.repackaged.jdt.internal.compiler.flow.FlowContext.checkExceptionHandlers(FlowContext.java:206)
...
[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] <May 16, 2013 4:48:54 AM UTC> <Info> <J2EE> <BEA-160220> <Compilation completed successfully>
And ant appears to happily carry on executing the build instructions. Any suggestions to why ant is not failing the building? How to cause ant to bail?
Thanks