ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Property value check
Date Thu, 26 Jul 2001 06:02:59 GMT
On Wed, 25 Jul 2001, <> wrote:

> Is there any way to do an if with a property, to see if it has a
> certain value set?

To compare it with arbitrary values, you'll have to use a task (or
script) of your own, at least for now.

If you want to test for specific values, you can try the following
trick (first shown by Jose Alberto Fernandez IIRC).

<property name="bastian.${fantastica}" value="dont-care" />
<target name="atreyu" if="bastian.bux" ...>

The target "atreyu" will only be executed if the property "fantastica"
contained the value "bux" (as the property "bastian.bux" wouldn't be
defined otherwise).


View raw message