Using (multi lexeme) grails targets in gant scripts
Question
I have a gant script in my grails project.
I would like to do something just like this:
includeTargets << new File ( "${grailsHome}/scripts/War.groovy" )
war()
But for the deploy target in the script provided by the tomcat plugin.
Specifically, I would like to invoke this target:
grails prod tomcat deploy
how would that happen?
Solution
Honestly, I did not really understand your usecase. I assume you wanted to execute tomcat deploy from within your application's gant script. If so, here's the way to go:
includeTargets << new File ( "${grailsHome}/scripts/Init.groovy" )
includeTargets << new File("${pluginsHome}/tomcat-${grailsVersion}/scripts/Tomcat.groovy")
target(default: "convert csv files into properties files") {
list() // should implicitly call "grails tomcat list"
}
~
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow