ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Conditional processing in Ant
Date Mon, 01 Jul 2002 23:08:22 GMT
--- Vineet Chaoji <> wrote:
> I want to set a variable based on some conditions.
> <! This is the default -->
> <property name="os" value="windows"/>
> <condition property="os" value="sun"> <os name="SunOS"/> </condition>

> This does not seem to work. I get the error 
> Class doesn't support the
> "name" attribute.
> Why should this happen when the Ant manual says that name attribute is
> supported?

Because you're not looking at the doc for the same version of Ant you're
running. Your Ant installation comes with a documentation set -- you
should refer to it, rather than the documentation available from Ant's
home page, unless you're running the same version of Ant that the doc from
the web page is for.

> Is there a workaround?

Is upgrading to 1.5 an option? If not, you'll need to check the value of
${} (see "Built-in Properties" in "Using Ant").



Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message