Hi Björn,

I'm sure you've already resolved your problem, but I had the similar
requirement and I've resolved it in that way:


def webXmlTemplateName = 'WEB-INF/web.xml.template'
def webXmlTemplate = file("$webAppDir/$webXmlTemplateName")
def generatedWebXmlFile = file("$buildDir/web.xml")

processResources << {
        def engine = new groovy.text.SimpleTemplateEngine()
        generatedWebXmlFile.withWriter { w ->
                w <<
engine.createTemplate(webXmlTemplate).make(System.getProperties()).toString()
        }
}

war {
        excludes = [webXmlTemplateName]
        webXml = generatedWebXmlFile
}


in this case properties to resolve are provided from JVM properties.


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/war-plugin-Manipulate-web-xml-on-the-fly-tp5151767p5709928.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