ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: why do filters and properties work differently?
Date Thu, 11 Jan 2001 15:58:23 GMT
At 09:54  11/1/01 -0600, Tim Dawson wrote:
>Properties support values that contain references to other properties
>(through @foo@) when loading a properties file.
>Filters do not support this when using filterfile.
>
>The only workaround I've discovered is to define properties for the values
>you want and then do a filter based on that property, e.g.
>
> <property file="foobar.properties" />
> <filter token="foo" value="${foo}" />
>
>Where foobar.properties contains:
> foo = @bar@
> bar = Hello World
>
>Doing the specific filter/token/value hack works when you have only a few
>filters that need to do this, but it's a real pain when you really just want
>to define a filterfile and have it work, especially if you have a number of
>filters that rely on values specified in properties.  It uglies up the
>build.xml file and makes maintenance harder when you change things.
>
>Any ideas why filters are the way they are? Any reason not to change it?

I think it is that way because of evoultion - properties evolved faster
because are widely used and filters never caught up. Feel free to send
patches to ant-dev to correct this behaviour thou ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message