ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Replace Task "propertyFile" syntax
Date Tue, 04 Jun 2002 00:18:22 GMT
--- Max Clark <max.clark@ussearch.com> wrote:
> So are the files mutually exclusive?

If you have a:
  foo=bar
in your properties file, and a:
  foo=foobar
in your 'replacefilterfile', then the word "foo" will be replaced with the
word "foobar". For why, read on...

> It seems that I could accomplish everything that I need using the
> "replacefilterfile". Where would a user want to use one vs. the other?

Using 'propertyfile' lets you reference any property defined in that file
in a <replacefilter> element. Any properties in the file specified by
'propertyfile' that aren't referenced in a <replacefilter> won't have any
affect. If my text file had:

This foo is totally baz. But this !goober! is even better.

I could have specified 'token="!goober!"' in the <replacefilter> element,
and the word "foo" wouldn't be replaced, but "!goober!" would be, with the
value of ${foo} (ie., "bar").

Anything defined in the 'replacefilterfile', however, will automatically
act as replacement values without having to do anything else. IOW, if I
hadn't had a <replacefilter>, then "foo"  (or whatever I'd specified as
the token) wouldn't have been replaced by "bar", but "baz" would always be
replaced with "blat".

Make sense?

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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