ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Filter task feels wrong
Date Mon, 12 Mar 2001 23:53:40 GMT

At 11:21  8/3/01 +1030, Barrie Treloar wrote:

This is a big TODO ;)

>    <copy    todir="${build.classes}" 
>             overwrite="true"
>             filtering="on">
>      <filter id="ant.tokens">
>          <token="VERSION" value="${version}" />
>          <token="DATE" value="${TODAY}" />
>          <token="TIME" value="${TSTAMP}" />
>      </filter>
>      <fileset dir="${java.dir}">
>        <include name="**/version.txt" />
>        <include name="**/defaultManifest.mf" />
>      </fileset>
>    </copy>

I would prefer to see it 

    <copy    todir="${build.classes}" 
             overwrite="true"
             filtering="on">
      <filterset>
          <filter token="VERSION" value="${version}" />
          <filter token="DATE" value="${TODAY}" />
          <filter token="TIME" value="${TSTAMP}" />
      </filterset>
      <include name="**/version.txt" />
      <include name="**/defaultManifest.mf" />
    </copy>

Thou your syntax brings up another possibility that we could consider if we
genericised the mapping. Namely that filters are just another type of
mapper ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org


Mime
View raw message