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:
<filterset>
<filter token="TOKEN1" value=${TOKEN1value}"/>
</filterset>
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:
TOKEN1=${TOKEN1value}
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:
<filterchain>
<tokenfilter>
<replaceregex pattern="\@(.*)\@" replace="${\1}" flags="gi"/>
</tokenfilter>
<expandproperties/>
</filterchain>
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
Ant-contrib-1.0b2
Thanks
-Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]