ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Multiple Properties for the "unless" Attribute
Date Tue, 14 May 2002 17:48:05 GMT
If you want to run a target only if all of some set of files are
available, just <and> all your <available>'s in a single <condition> --
the property specified in the <condition> will only get set if all the
files are found. Then 'if' on that property (not 'unless') in the target
you want to conditionally run:

  <target name="runit" depends="checkit" if="allthere">
    <echo>hi there</echo>
  </target>

  <target name="checkit" >
    <condition property="allthere" value="true">
      <and>
        <available file="foo.txt"/>
        <available file="bar.txt"/>
        <available file="baz.txt"/>
      </and>
    </condition>
  </target>

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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


Mime
View raw message