ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Conditionals
Date Thu, 23 Aug 2001 05:41:32 GMT
On Wed, 22 Aug 2001, Jack Woehr <jax@purematrix.com> wrote:

> I'd like to do <if testproperty="some.prop" testvalue="doIt"
> trueantcall="some_target" falseantcall="another_target"/>
> 
> What's the closes thing I can do to this in Ant?

<target name="check">
  <condition property="testprop">
    <equals arg1="${some.prop}" arg2="doIt" />
  </condition>
</target>

<target name="some_target" depends="check" if="testprop" />
<target name="another_target" depends="check" unless="testprop" />

<target name="call-this" depends="some_target,another_target" />

Stefan

Mime
View raw message