My code contained a small error. Here is the correct version:

war { 
    war.setArchiveName("${contextName}-${targetEnv}-${config.version}.war" 
    classpath("config/props/$targetEnv") 
} 

war.doFirst { 
     // war task is getting executed, so complete the configuration now 
    webInf {
        from 'config/WEB-INF' 
        filter(ReplaceTokens, tokens: [ 
            token1 : config.variable1, 
            token2 : encrypt(config.variable2), 
            .... several tokens.... 
            tokenX : config.variableX, 
        ]) 
    }
} 

The filtering is performed at execution time (as part of running the war
task), not at configuration time.

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Founder, Spock Framework
http://spockframework.org

-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Is-there-a-variable-list-with-all-task-names-that-will-be-executed-tp3369891p3374797.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to