ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: if javac fails
Date Sat, 14 Jun 2003 15:49:57 GMT

If there were a way for javac to set a property upon failure, this would be 
easy because then you'd also set failOnError="false" and could then either 
just do a <fail if="myfailproperty" message="javac failed"/> or have the 
designated non-functional fail target as part of the dependency tree so 
that when the target with <javac> gets called and sets or doesn't set the 
property, the non-functional fail target can have if="myfailproperty" and 
then <fail> the build there and/or the other targets can say 

This may be true for Ant-1.6 in CVS, but I don't see that it is possible in least not with the stock Ant.  You could always try 
ant-contrib <if>, <try> and/or <throw> tasks.


At 09:45 AM 6/14/2003 +0000, you wrote:
>hi i am new to this mailing list. i 've a genuine doubt. is there any way 
>to perform an otherwise non-functional task/target, only if the javc 
>compilation fails. ie, this target should be for only handling compilation 
>failure. one way is to detect if the compiled class file is there or not. 
>but this looks silly.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message