ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: Replace task - getting *tokens* from a properties file?
Date Wed, 13 Jun 2001 17:39:05 GMT
> As fas as I understand your problem description, the 
> filtering mechanism of the
> copy task should help you. Just define tokens to be filtered 
> like this:
> <filter token="Version" value="${build.vers}"/>
> ...
> and copy your source template file into your source tree 
> before compiling with:
> <copy tofile="mysrc.java" filtering="on" file="mysrc.java.templ"/>
> 
> Have you been looking for this?

Not really - the point is that I'd like to keep my token names in a
properties file - there will be quite a few of them, and they vary
between different tasks. I'd rather not have to have the string
"Version" in the build file at all.

I'll probably end up extending Replace instead. Thanks for your input
though.

Jon

Mime
View raw message