There is no built-in mechanism for that. 
If a task fails - the build fails.

You could try something with conditional targets and AntContrib:

<target name="targetA">
    <antcontrib:trycatch>
        ...
        <ac:catch>
            <property name="failed" value=""   description="A Failure 
somewhere"/>
            <property name="failed.A" value="" description="A Failure in 'A'. 
Just set the prop, value doesnt matter"/>
</target>
<target name="targetB">
    ...same...
</target>
<target name="onErrorTargetATarget" if="failed">
    <echo>Some targets failed.</echo>
    <echo>- TargetA: ${failed.A}</echo>
</target>
<target name="mainTarget" depends="targetA, targetB, targetC, 
onErrorTargetATarget" >
    ...



Jan

> -----Ursprüngliche Nachricht-----
> Von: Carlos Ortiz [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 13. Mai 2008 08:06
> An: [email protected]
> Betreff: On error Redo some TasK
> 
> 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
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to