ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Meakin" <>
Subject filtersets problem
Date Thu, 01 Sep 2005 14:39:36 GMT
Hi all, 
Hoping someone can help me with this frustrating problem.

I have:
1) a file to be copied with a @TOKEN1@ in it, 
2) a property: <property name="TOKEN1value" value="foo"/> , and
3) a filter to connect them:
  <filter token="TOKEN1" value=${TOKEN1value}"/>

Hey presto it works, and @TOKEN1@ gets replaces with foo

However, Im trying to use a filterset as defined in a file, i.e.
<filtersfile> with entries such as:


This doesn't work, @TOKEN1@ merely gets replaces with '${TOKEN1value}'
(literally), and the subsequent replace with the property value does not
happen. I didn't expect this but thought ok, maybe nobody's thought of
this. (Properties files work fine with in-file replacing, but Filters
files seem not to)

I then looked into filterchains, and set up a filterchain composed of:

          <replaceregex pattern="\@(.*)\@" replace="${\1}" flags="gi"/>

This doesn't work either.- the expandproperties gets ignored, despite
this is what filterchains were invented for..

I've tried using the recurse param on a filterset, I've tried just about
everything, and cant get a @TOKEN@ to be replaced with a property value,
if the filter token comes from a file.

Any help from someone who has solved this would be great, just about
tearing my hair out (:-) I have about 50 billion tokens to replace, and
would prefer them to be in a file rather than build.xml as build.xml is
not an appropriate place for them. Some of these tokens should be
replaced with the value of a property at runtime. 

Ant 1.6.5


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

View raw message