Community
Participate
Working Groups
The batch compiler used by the JDT Ant compiler adapter has a special option to log compile errors to a log file if the "verbose" option is used. The current implementation stops logging to the error PrintWriter defined in the constructor of the batch compiler (org.eclipse.jdt.internal.compiler.batch.Main) as soon as a log file is specified (verbose option is used). The disadvantage is that compile warnings and errors are logged only to the file and not to the Ant console. If a logger is attached to the Ant console it will never recognize compilation errors. Example: The CruiseControl build system logs Ant builds to XML files (using Ant XML logger). After this the XML file is used to detect failed builds (builds containing compile errors) and it is transformed vie XSL into nice HTML pages. This doesn't work with the JDT compiler adapter reporting compile errors to a log file. The easiest solution would be to replace the error PrintWriter specified in the constructor with a "combined" PrintWriter that writes to the console and to the log file.
Indeed, this would be a good suggestion.
I will change it.
Created attachment 13566 [details] Patch to apply on HEAD This patch enables the err output in the log and in the console.
Fixed and released in HEAD.