Bug 70717 - Batch compiler should report compilation errors to console
Summary: Batch compiler should report compilation errors to console
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-23 06:57 EDT by Gunnar Wagenknecht CLA
Modified: 2005-01-11 11:03 EST (History)
0 users

See Also:


Attachments
Patch to apply on HEAD (12.04 KB, patch)
2004-07-23 12:08 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2004-07-23 06:57:57 EDT
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.
Comment 1 Philipe Mulet CLA 2004-07-23 09:10:39 EDT
Indeed, this would be a good suggestion.
Comment 2 Olivier Thomann CLA 2004-07-23 11:10:38 EDT
I will change it.
Comment 3 Olivier Thomann CLA 2004-07-23 12:08:59 EDT
Created attachment 13566 [details]
Patch to apply on HEAD

This patch enables the err output in the log and in the console.
Comment 4 Olivier Thomann CLA 2004-07-23 12:17:57 EDT
Fixed and released in HEAD.