ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: if, unless problems
Date Fri, 08 Dec 2000 09:01:20 GMT
Alexander V. Gorlov <ales@vis.infotel.ru> wrote:

> I use successfully next code:
> 
>      <property name="Version1" value="true"/>
>      <property name="false" value="false"/>
> <target ...>
> <copy ...>
>       <fileset dir="${dir}">
>         <include name="**/*.xml" if="${Version1}"/>
>         <include name="**/*.xsl" if="${Version1}"/>
>       </fileset>
> </copy>
> but code like don`t work
> <target ... if="${Version1}">
> 'if' in the target work only when I use if="constant".
> This is design features or I do something wrong?

Two notes: (1) if/unless expect the _name_ of a property, so it is
if="Version1" instead of ${Version1} and (2) they test for the
existance of a property, not its value - setting the property to true
or false doesn't make any difference.

Stefan

Mime
View raw message