ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: AW: How to check wheather a taks completed successfully
Date Mon, 09 Aug 2004 12:59:28 GMT
You need to use trycatch from ant-contrib:

<project default="test" xmlns:ac="antlib:net.sf.antcontrib">
  <target name="test">
    <ac:trycatch>
      <ac:try>
        <fail>This fails</fail>
      </ac:try>
      <ac:catch>
        <echo>The try block failed</echo>
      </ac:catch>
    </ac:trycatch>
  </target>
</project>

Peter

Rajesh wrote:

> Hai Jan
>
> but i want to check inside next task wheather the previous task 
> succeded or not
>
> AND i need to forward to another task ;-) meaning i need to move 
> controle dynamically to perticular task.
>
> Rajesh
>
> Jan.Materne@rzf.fin-nrw.de wrote:
>
>> never tried that, but sounds for -k:
>>
>> ant -h
>>
>> ant [options] [target [target2 [target3] ...]]
>> Options:
>>  -keep-going, -k        execute all targets that do not depend
>>                         on failed target(s)
>>
>>
>> Jan
>>
>>
>>  
>>
>>> -----Urspr√ľngliche Nachricht-----
>>> Von: Rajesh [mailto:rajesh@gkbcinc.com]
>>> Gesendet am: Montag, 9. August 2004 14:24
>>> An: user@ant.apache.org
>>> Betreff: How to check wheather a taks completed successfully
>>>
>>> Hai all
>>>
>>> i want to know how to find a task complete successfully
>>>
>>>
>>> normally if a tasks fails ant stops all the tasks
>>> is there a way to over come this.
>>>
>>> i want to make to go out by the flow if a tasks fails and if task2 
>>> checks for task1 success or failure if success to to task3 or go to 
>>> task 4
>>>
>>> how it is possible
>>>
>>> anybody give me code snippet
>>>
>>> Rajesh
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>   
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>


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


Mime
View raw message