ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: strange behaviour
Date Mon, 24 Jun 2002 09:07:27 GMT
On Mon, 24 Jun 2002, Dmitry Trunikov <tda@quasarlabs.com> wrote:

> (i.e. attribute "if" is resolving _after_ resolving "depends")

This is correct, and it is so with a reason.

It is a rather common pattern to set properties in the targets of the
depends list, something like

<target name="check">
  <availible property="library.available" ... />
</target>

<target name="do-it-with-lib" depends="check" if="library.available">
  <task that requires library />
</target>

<target name="do-it-without-lib" depends="check" unless="library.available">
  <task that does the same without library" />
</target>

<target name="do-it"
        depends="do-it-with-library,do-it-without-library" />

See also:

<http://jakarta.apache.org/ant/faq.html#stop-dependency>

Stefan

--
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