ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: How do I get rid of the "Compile failed..." message from Ant when the javac task reports erros?
Date Sat, 01 Jun 2002 20:53:18 GMT
----- Original Message -----
From: "Shorn Tolley" <shorn_tolley@hotmail.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Saturday, June 01, 2002 4:22 PM
Subject: Re: How do I get rid of the "Compile failed..." message from Ant
when the javac task reports erros?


> So, it's not an effect of the javac task, but an effect of the way tasks
> communicate with the main Ant engine?
> (that is, task has problem, prints info about problem, throws exception to
> Ant to let it know task failed, Ant prints info about exception thrown?)

Thats pretty much it. Actually the task does not even print the info in this
case, it throws a BuildException with the message in the exception.  The
engine prints it, along with the line number info.

> Would it not be feasible to turn off _the reporting_ of the fact that the
> exception was thrown?

You can set failonerror="false" on <javac>, which causes the message to be
logged, but no line number info, but then the build continues, which is not
usually very desirable after compilation fails.

> This is not a whinge (much), I would actually be prepared to go and play
> with the code to make this happen, it's been bugging me for aaaaages.

Have at it!  :)

I'm not quite sure how this change should be made - perhaps a command-line
switch that tells Ant not to print the line number information or something
like that?  Again, such a change would affect all tasks, not just <javac>.

    Erik



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message