You can't do the wildcard thing, but in the meantime, you can specify an
old version as a property and replace that with a new one (you probably
wouldn't hard-code the property values in the build.xml -- this is just an
example):
<target name="repl">
<property name="project.oldver" value="1.0"/>
<property name="project.version" value="2.0"/>
<filter token="Version: ${project.oldver}"
value="@Version: ${project.version}@"/>
<copy file="foo.txt" tofile="bar.txt" filtering="on"/>
<replace token="@Version: ${project.oldver}@"
value="@Version: ${project.version}@"
file="foo.txt"/>
</target>
Diane
--- Will Stranathan <[EMAIL PROTECTED]> wrote:
> I'm sure I'm not the only one who would like to see this feature, but it
> doesn't SEEM as though it's yet available...
>
> Do the <replace> and <filter> tasks allow patterns that might look like
> this:
>
> <replace token="@Version:*@" value="Version: ${project.version}"
> dir="${srcdir}" />
>
> So it would replace strings like:
> /* @Version: 1.0@ */
>
> with:
> /* @Version: 2.0@ */
>
> Similar to the way CVS replaces $Id$ tags and such? I've taken a gander
> over the documentation, but it doesn't seem to do that. Does anybody
> have
> any recommended workaround? Or did I just get myself on the hook for it
> by
> asking?
>
> Thanks for a REALLY good product!
> Will Stranathan
>
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/