ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dawson <>
Subject why do filters and properties work differently?
Date Thu, 11 Jan 2001 15:54:00 GMT
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="" />
 <filter token="foo" value="${foo}" />

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



View raw message