ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Filters and token values
Date Fri, 04 May 2001 20:20:50 GMT
--- "M.A.Dunphy" <> wrote:
> When you setup filter tokens via a filterfile, is it possible to access
> a token and it's value as if it was a property. This if I had this in
> the file:
> VERSION =1.0
> Then could I reference it like ${ant.token.VERSION}
> Doing it this way, the file drives the whole process. I know I could use
> a standard properties file and thus would get properties, but then I'd
> have to explicitly code the <filter token value>

Maybe I'm not understanding what you need to do (since I can't think of
why you'd need to reference a filter-token). You can use the same file for
both filters and properties. Just read the file in twice -- once using
<property> and again using <filter>. Eg., put those tasks in an "init"

  <target name="init">
    <property file=""/>
    <filter filtersfile=""/>

Now, any filtered copying you do, just set filtering="true" (or yes|on),
and you should be good to go, without having to do any addition <filter>
tasks, and you can still reference things as normal properties where you
need to.



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message