Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added a redeploy command to tomcat script. #1

Open
wants to merge 1 commit into from

2 participants

@pokerjocke70

We use the grails plugin a lot in our company and it would be really nice to be able to redeploy a war file without having to first undeploy in a separate step then deploy it.

@pokerjocke70 pokerjocke70 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.
a25c27e
@rdmueller

Would be a nice feature... and would solve this feature request: GPTOMCAT-1

@rdmueller

just tested the code - works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 13, 2012
  1. @pokerjocke70

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

    pokerjocke70 authored
    …o a server that already has that one deployed without having to undeploy it first.
This page is out of date. Refresh to see the latest.
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':
Something went wrong with that request. Please try again.