ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Doyle <>
Subject compile error output
Date Wed, 11 Jun 2003 08:22:03 GMT

I am trying to capture a compile error (forced for the sake of testing)
which occurs when running ant.
I am invoking ant using a javabean (running on tomcat) which creates an
instance of as below

File buildFile = new File("build.xml");
ProjectHelper.configureProject(project, buildFile);
DefaultLogger logger = new DefaultLogger();

FileOutputStream fo = new FileOutputStream(new File("build.log"));
logger.setOutputPrintStream(new PrintStream(fo));
logger.setErrorPrintStream(new PrintStream(fo));

When this build completes successfully, everything is logged ok to build.log
(i.e. it tells me about all the tasks and what they did).
However, if there is a compile error, then I don't get the actual compile
error added to the log.
The log simply says this...

    [javac] Compiling 1 source file to C:\Source\java\com\myStuff
but tomcat prints out...

C:\Source\java\com\ invalid method declaration; return type
1 error

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



This electronic transmission is strictly confidential and intended solely
for the addressee. It may contain information which is covered by legal,
professional or other privilege. If you are not the intended addressee,
you must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error, 
please notify the sender as soon as possible.

This footnote also confirms that this message has been swept
for computer viruses.

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

View raw message