4

Is there a way to stop a headless eclipse build for java using the apt compiler if an error has occurred?

A bit of background:

I am trying to build my java project from the command line using C:\eclipse\eclipsec -nosplash -application org.eclipse.jdt.apt.core.aptBuild -data "../.." -build JavaMain

However, I have recently noticed this compiles my binary even when there are errors in the project such as missing files or missing variables.

I have tried adding -Declipse.exitOnError or removing the -nosplash but it still continues on like a runaway freight train. I have looked for documentation on eclipse apt but all I can find is two pages in their help index which shows me the exact same command I am already using. I checked some other stack overflow questions such as Build Eclipse Java Project from Command Line which recommend the same command.

I know that eclipse builds can be done using ant but I was kind of hoping to keep it my project simple with a single command. I know I have to be missing something, there has to be a way for a compiler to report errors.

Also please do not hesitate to correct me on anything I have forgotten to add to this question, this is my first stack overflow post so I am bound to have missed something.

0 Answers0