The approach you show below is "approved."

-Matt

--- "Rosenbaum, Thomas"
<[EMAIL PROTECTED]> wrote:

> Hello,
> 
> I am using Ant 1.6.5 - can multiple properties be
> specified in the "if"
> or "unless" attributes of a given target?  
>     
>       <available file="file.ext" property="prop1"/>
>       <available file="file2.ext" property="prop2"/>
>       <available file="file3.ext" property="prop3"/>
>       <available file="file4.ext" property="prop4"/>
> 
>       <target name="blah" if="prop1,prop2"> ... </target>
>       <target name="blahblah" unless="prop3,prop4"> ...
> </target>
> 
> If so, is the relationship an "or" or an "and"?
> 
> If this is not possible, what is the best practice
> for executing a
> target if multiple conditions are met?  I could do
> the following, but I
> end up creating all kinds of extra/throw-away
> properties:
> 
>       <condition property="exec-target1">
>         <and>
>           <available file="file.ext" property="prop1"/>
>           <available file="file2.ext" property="prop2"/>
>         </and>
>       </condition>
>       <condition property="do-not-exec-target1">
>         <and>
>           <available file="file3.ext" property="prop3"/>
>           <available file="file4.ext" property="prop4"/>
>         </and>
>       </condition>
>       <target name="blah" if="exec-target1"> ...
> </target>
>       <target name="blahblah"
> unless="do-not-exec-target1"> ...
> </target>
> 
> Can anyone help clear this up for me?
> Many thanks!
> - Tom
> 
> 



                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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

Reply via email to