ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: use <replace/> to replace token with file contents
Date Wed, 27 Feb 2002 22:02:30 GMT
--- "Hunter, Bryan" <> wrote:
> I need to replace a token in a text file with the contents of another
> text file.
> Is there an Ant provided task for this (<replace/> doesn't allow this)
> or does anyone know of an add-on task that could accomplish this?
> I'm trying not to have to write a custom task myself if I can reuse what
> someone else already has.

There's the new <loadfile> task, which loads a property with the contents
of a given file -- so you could load the "another text file" into a
property, then use that property as the replacement value.

Don't know if the task is autonomous (ie., doesn't require any other
latest-CVS stuff), but if it is, you could just pick up that class file
and <taskdef> it to use it, if you want to stick with using a release.



Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!

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

View raw message