ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: Replace task - getting *tokens* from a properties file?
Date Wed, 13 Jun 2001 17:44:11 GMT
Maybe I'm missing something, but why don't you just use the filtersfile
attribute of the filter task?  This allows you to keep your replacement
filters in the normal property file.

Seems to be what you're asking for.

Jon Skeet wrote:
> 
> > 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

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message