ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Getting status from javac
Date Wed, 07 Mar 2007 06:22:09 GMT
On 3/6/07, euge <m4euge@gmail.com> wrote:
> How would someone solve the following problem?
>
> I have an ant build script which builds a number of projects. If one of the
> projects does not compile then the build fails (since javac fails). I can
> put failonerror="false", but then I dont know which project has failed (it's
> a nightly build and I dont want to parse logs later). How to get the status
> from javac in ant script, that it's finished compiling project successfully
> or unsuccessfully? I know that I cannot put javac in condition and set
> property that would be nice. I dont know why developers did not provide that
> option, since I think it's not that dificult to do. I have wrote the java
> class which allows to do that, but may be I did not see other easier
> solution.

You're right, <javac> does not have an errorproperty attribute to be
set on errors (when it does not fail the build, with
failonerror="false"), like some other tasks. But you can use
Ant-Contrib's <trycatch> around <javac> to set it yourself. --DD

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


Mime
View raw message