ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Multiple IFs, or IFs on tasks
Date Fri, 24 Jun 2005 05:04:55 GMT
Common pattern:

<target name="do" depends="-do.check" if="do.condition">
    <echo>All conditions set</echo>

<target name="-do.check">
    <condition property="do.condition">


>-----Urspr√ľngliche Nachricht-----
>Von: Frank W. Zammetti [] 
>Gesendet: Donnerstag, 23. Juni 2005 17:42
>An: Ant Users List
>Cc: Ant Users List
>Betreff: Re: Multiple IFs, or IFs on tasks
>Ah, thank you Ninju!  I wasn't aware of the <condition> task, 
>I think that will do the trick.  One extra step, but not a hassle.
>By the way, your name is only one letter off from ultimate 
>coolness, but I'm sure you know that already :)
>Frank W. Zammetti
>Founder and Chief Software Architect
>Omnytex Technologies
>On Thu, June 23, 2005 11:38 am, Ninju Bohra said:
>> Correct on both counts,
>> For the first one, you may want to use a <condition> task to 
>> all the individual flags into one property which you use in the if=""
>> attribute.
>> As for the second, it is touch-and-go as to which tasks have an 
>> if/unless attribute (i.e. some have them and some don't).  The fail 
>> task is one that comes to mind that has both but these 
>attributes are 
>> not "generic" to all tasks (there have numerous discussion on this 
>> already, but to no avail :-(
>> "Frank W. Zammetti" <> wrote:
>> Hi all... I'm trying to solve a problem and one of the following two 
>> approaches would work, and although it doesn't seem possible from my 
>> testing, I wanted to run it by you guys...
>> First, is it possible to do if checks on a target against multiple 
>> properties? I tried simply have two if attributes, but that threw an 
>> error, and I tried a comma-separated list within a single 
>if, but that 
>> resulted in the task not executing.
>> Second, I might be missing it, but there doesn't seem to be an if 
>> attribute on a task (like copy for instance), is that correct?
>> Thanks all!
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: For 
>> commands, e-mail:
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around 
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message