Hi Neil,
you needn't define a new task. you just have to augment the
processResources task. try this:
processResources {
filter ReplaceTokens, tokens: [
timestamp: new Date().dateTimeString,
url: "http://localhost:8080/myapp "
]
}
regards,
René
Am 04.02.11 23:36, schrieb Neil Chaudhuri:
> I am an experienced Java developer and Maven user, and I am evaluating Gradle
> for a possible transition. So far I have my multi-module project building
> nicely and quite cleanly, and I have figured out how to get my configuration
> files to be filtered via the ReplaceTokens filter as follows:
>
> task filter(type: Copy) {
> from 'src/main/resources'
> into 'build/classes/main'
> filter ReplaceTokens, tokens: [
> timestamp: new Date().dateTimeString,
> url: "http://localhost:8080/myapp ",
> .
> .
> .
> ]
> }
>
> Things work just fine when I call filter directly, but calling build doesn't
> call filter. As a result, the project is built with the files unfiltered. Can
> you provide some insight on the configuration I need to add to make sure my
> filter task is called as part of the build task?
>
> Thanks.
>
--
------------------------------------
Rene Groeschke
[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email