ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Feature question- expression in target if+unless
Date Wed, 13 Dec 2000 14:54:29 GMT
Jay Walters <> wrote:

> It appears to me that ANT supports only properties which are set or
> unset.

This is correct.

> What is the recommended way to handle something like a property with
> 3 values where the build process needs to run different sets of
> tasks, or targets, depending on the value of the property?

If property X can have values A, B, C

<property name="test.${X}" value="foo" />

will make

<target if="test.A">

the same as if="X holds value A".

The cleanest solution would be some type of preprocessor though.


View raw message