ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Conditional processing in Ant
Date Mon, 01 Jul 2002 23:08:22 GMT
--- Vineet Chaoji <chaoji@roguewave.com> 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 org.apache.tools.ant.taskdefs.condition.Os 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
${os.name} (see "Built-in Properties" in "Using Ant").

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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