ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Logging javac error output
Date Thu, 19 Oct 2000 09:40:22 GMT
>>>>> "rm" == r merkle <r.merkle@siep.shell.com> writes:

 rm> A workaround appears to be using: <property name="build.compiler"
 rm> value="classic"/> Then the messages are correct and logged
 rm> correctly to the logfile.

This one finally pushed me into the right direction.

When doing a "classic" compile, Ant hands the compiler a OutputStream
to write its messages to (sun.tools.javac.Main has a constructor
taking an OutputStream argument).

Unfortunately this functionality (writing to a user supplied stream)
doesn't exist in the modern compiler, at least a quick reflection test
of all constructors and methods of com.sun.tools.javac.Main doesn't
provide anything useful.

The only workaround I see is to change System.err and System.out prior
to invoking the compiler and resetting it afterwards, but maybe
somebody with access to the source of the modern compiler knows a
better way to achieve this?

Stefan

Mime
View raw message