ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Norvell <928572...@cox.net>
Subject Re: return early from a macrodef?
Date Fri, 10 Nov 2006 21:52:35 GMT
https://sourceforge.net/projects/antcontrib/ extension library has the 
<if> task that uses conditions.   Would you be able to use that?

-J

Jacob Kjome wrote:
> 
> In a macrodef, if I check a condition and that condition is true, I'd like to
> return early from the macrodef and not run any of the rest of its contents.  Is
> it possible using a <scriptdef> to write a script that can force an early return
> from the <sequential> part of the macrodef if the condition is met?  This is
> kind of akin to an if/unless on a target.  I'm not quite seeing where I would
> be able to hook into Ant to do such a thing.  Is it impossible?  I hope not.
> 
> BTW, I'm not talking about <fail/>.  I don't want the build to end when the
> condition is met.  I just want to skip the rest of the <macrodef> contents and
> continue processing.
> 
> 
> Jake
> 
> ---------------------------------------------------------------------
> 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