Bug 24431 - XML Logger marks compile-errors as warnings
Summary: XML Logger marks compile-errors as warnings
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.5.3
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2003-11-05 12:28 UTC by Christian Paetzold
Modified: 2008-11-24 03:58 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Paetzold 2003-11-05 12:28:56 UTC

I use Cruise Control (CC) for continuous integration. CC uses Ant-XMLLogger. The 
CC-Webapp parses the the output of the logging to display compile-errors and 
warnings in the browser.
I want to seperate compile errors and warnings but there is no way to see 
differences between javac errors and warnings in the xml-output:
All looks like:
<message priority="warn">...</message>
(cruise control output and commandline output looks the same)

What I expect is:
<message priority="error">...</message> for errors

The compile is delegated to another build script:
build.xml --> compile.xml (<javac>-Task in there)
(Maybe some important hint)

Output of a test-project:
<message priority="warn">
\de\sparkasseninformatik\thunderbird\sk\hallo\HalloBegruesser.java:12: ';' 
<message priority="warn">
<![CDATA[        return "Hallo, " + input]]>
<message priority="warn">
<![CDATA[                                ^]]></message>
<message priority="warn">
<![CDATA[1 error]]>

Comment 1 Stefan Bodewig 2003-11-05 16:32:04 UTC
The problem is, that Ant doesn't know what javac is talking about.

What you see in Ant's logfile is the literal System.err (or .out, can't remember)
of javac and there is no way for Ant to tell warnings from errors (given
the pluggable compiler implementations, things are even more complicated).
Comment 2 Dominique Devienne 2003-11-05 16:48:46 UTC
I've also wished Ant (and thus the XML logger) would be able to differentiate 
between warning (like deprecations), and real errors. We currently have 
projects with tons of deprecation warning, so finding the one or two errors 
among them is a real chore.

Even though there is the pluggeable compiler architecture, error messages that 
contain the word warning after a line number should be doable, controlled by a 
new attribute of course. Not that I'm volunteering of course ;-) --DD
Comment 3 Stefan Bodewig 2003-11-05 16:56:20 UTC
Well, you know that warnings a span multiple lines, don't you?
Comment 4 Dominique Devienne 2003-11-05 17:22:54 UTC
True, but you can negate the search, and at least put the first line of every 
error (no warning string follows the filename.java:123: pattern) on stderr, and 
hopefully they could then latter be styled differently...

I know, it's a little farfetch though. --DD