ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Using multiple if on target element
Date Tue, 15 Mar 2005 10:22:13 GMT
>     I need to check whether two properties are set before executing a
> task. I could check for one property using if attribute of target. How
> to check for 2 properties are set ?.
>     I dont want to write another target to check this condition. 

Inside core ant you have to

<target name="myTarget.check">
    <condition property="myTarget.do">
        <and>
            <isset property="prop1"/>
            <isset property="prop1"/>
        </and>
    </condition>
</target>

<target name="myTarget" depends="myTarget.check" if="myTarget.do">
   ...
</target>


otherwise you have to do nearly the same using AntContribs <if>...


Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message