Two possibilities:
- a <fail> would exit the build immediately, but with state "failed"
- set a property "skip-rest" and add a condition 'unless="skip-rest"' on the 
targets

Jan 

>-----Ursprüngliche Nachricht-----
>Von: NR031 [mailto:nataraja...@cognizant.com] 
>Gesendet: Freitag, 6. März 2009 11:05
>An: user@ant.apache.org
>Betreff: How to skip the rest of execution
>
>
>Hi,
>
>   Ho to exit from executing the rest of targets if some conditions get
>failed.
>
>This is what I expect :
>
><target name="nested">
><if>
>                <equals arg1="abc" arg2="def"/>
>            <then>
>                <echo>success</echo>
>                <property name="letter" value="abc" />
>                <echo>${letter}</echo>
>            </then>
>            <else>
>                <echo>Not equal</echo>
>                  *******Code For Exit**********
>            </else>
>        </if>
></nested>
>
><target name="callnested" depends="nested">
>         <echo>I don't want to see this message in the command 
>prompt</echo>
></target>
>
>
>
>If I execute the target callnested then I shouldn't see the message of
>callnested ("I don't want to see this message in the command prompt").
>-- 
>View this message in context: 
>http://www.nabble.com/How-to-skip-the-rest-of-execution-tp22369
239p22369239.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>For additional commands, e-mail: user-h...@ant.apache.org
>
>

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

Reply via email to