ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Berman <noe...@yahoo.com>
Subject Filtering and FilterChain/ExpandProperties
Date Thu, 11 Jul 2002 00:00:18 GMT
Hi all,

I'm interested in using ${...} property references in
a filter file such that the filter file can supply a
${...} string in the token replcement process and then
the ${...} gets replaced with the value of the
property.  It looks like I can't quite get there from
here.

My first attempt was as follows:
  <copy file="file1" tofile="file2">
    <filterset>
      <filtersfile file="filters"/>
    </filterset>
    <filterchain>
      <expandproperties/>
    </filterchain>
  </copy>

However, the ExpandProperties substitutions occur
before the filtering token replacement so I end up
with ${...} in my file2.

It seems that the FilterChain way to do this would be
to:
1) extend the ReplaceTokens FilterChain to have a
filtersfile option
2) put the ReplaceTokens filter in the chain before
ExpandProperties
3) stop using the <filterset>

Is there something else I should be considering? 
Particularly something that is already supported?  If
not, I'll have a whack at extending the ReplaceTokens
FilterReader or look for something else to extend.

Thanks,
  Rick

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message