Hi Jesse,

On Wed, Mar 24, 2010 at 8:18 AM, Jesse Eichar
<[email protected]>wrote:

> Hi,
>
> I want to do the ant filter:
>
> ant.copy (todir: "$buildDir/webappSource") {
>     fileset(dir: "src/main/filtered-webapp")
>     filterset (begintoken: '@', endtoken: '@'){
>         filtersfile(file:
> "${project(':proxy:config').projectDir}/filters/global-resource.filter")
>     }
> }
>
> I can see from the API how to do this if the filters are in memory.
>  Something like:
>
> task copyTask(type: Copy) {
>     from 'src/main/webapp'
>     into 'build/explodedWar'
>
>     filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
> }
>
> Should I use ReplaceTokens and simply pass the Properties object to the
> method?  Or is there a cleaner way?
>

The above is the supposed way of doing it.

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


> Thank you Jesse
>

Reply via email to