ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: compile error output
Date Wed, 11 Jun 2003 10:54:38 GMT
On Wed, 11 Jun 2003 06:22 pm, Peter Doyle wrote:
> Hi,
> Does anyone know why I am not getting the compile error returned in the log
> and how I might achieve this?
> I have tried different levels of debug for the Build Listener

The easiest way to get the message into the log will be to fork the <javac> 
task. When the <javac> task is run normally it runs the Sun javac class in 
the Ant VM, or the Tomcat VM, in your case. This class writes directly to 
System.out and System.err. When Ant is run from the command line, Ant's Main 
class replaces System.out/System.err with a special OutputStream that, among 
other things, will redirect output back into Ant's log. Obviously you can't 
do that in a servlet engine. BTW it is good that you have used Project as 
your integration point. Due to the replacement of System.out, using Main, as 
some people are tempted to do, would not be a good idea.

When you fork javac, the output is in an external process and should be 
captured by Ant's stream handling code which will put the output into the log 
for you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message