Skip to content
Browse files

Added new redeploy task that makes it possible to upload a war file t…

…o a server that already has that one deployed without having to undeploy it first.
  • Loading branch information...
1 parent 0504d23 commit a25c27e8b49837503683adda0437b632f67703e1 @pokerjocke70 committed Jan 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 scripts/Tomcat.groovy
View
6 scripts/Tomcat.groovy
@@ -10,6 +10,7 @@ target(main: '''\
Script used to interact with remote Tomcat. The following subcommands are available:
grails tomcat deploy - Deploy to a tomcat server
+grails tomcat redeploy - Update/Deploy to a tomcat server
grails tomcat undeploy - Undeploy from a tomcat server
''') {
depends(parseArguments, compile,createConfig)
@@ -19,16 +20,19 @@ grails tomcat undeploy - Undeploy from a tomcat server
def user = config.tomcat.deploy.username ?: 'manager'
def pass = config.tomcat.deploy.password ?: 'secret'
def url = config.tomcat.deploy.url ?: 'http://localhost:8080/manager'
+ def update = (cmd == 'redeploy')
switch(cmd) {
case 'deploy':
+ case 'redeploy':
war()
println "Deploying application $serverContextPath to Tomcat"
deploy(war:warName,
url:url,
path:serverContextPath,
username:user,
- password:pass)
+ password:pass,
+ update: update)
break
case 'list':

0 comments on commit a25c27e

Please sign in to comment.
Something went wrong with that request. Please try again.