ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: On error Redo some TasK
Date Tue, 13 May 2008 19:50:50 GMT
Ant usually fails on a failed task. There are certain tasks where this
rule could be overturned "those with a "failson" parameter, but most
of the time, if something fails, you really want to stop the build
process.

However, there is a special task in the AntContrib directory that I've
used before called <trycatch>. This task will execute a particular set
of tasks, then if there is an error, you can catch it and do something
else:

On Tue, May 13, 2008 at 2:06 AM, Carlos Ortiz <chrono.dark@gmail.com> wrote:
> Hi,Here is my question, how do i redo or execute some task's when another
>  fail
>
>  for example , if targetA fail go to onErrorTargetATarget...
>
>   <target name="targetA" >
>         ....
>     </target>
>
>   <target name="onErrorTargetATarget" >
>         ....
>  <delete ..... />
>     </target>
>
>  been the main mainTarget
>
>
>   <target name="mainTarget" depends="targetA, targetB, targetC" >
>         ....
>     </target>
>
>  thks in advance
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message