Deploy a Grails 2.1.1 application to Tomcat as an exploded war?

此生再无相见时 提交于 2019-12-06 04:47:20

问题


I'm trying to deploy a Grails app on OpenShift, and I'm trying to avoid pushing a 50MB file across the web for every change.

I created a project at ~/dev/apps/grails/test to test it

Based on this answer on SO, I added

grails.war.exploded=true

to grails-app/conf/BuildConfig.groovy, which caused this folder to be created:

/home/sas/.grails/2.1.1/projects/test/stage

how can I tell it to create the exploded war at ~/dev/apps/grails/test/target/test-0.1?

copying the folder like this:

cp -r /home/sas/.grails/2.1.1/projects/test/stage ~/dev/tomcat/webapps/test-0.1 

works ok, but I'm trying to automate the whole process to come up with a quickstart script for OpenShift.


回答1:


Just had a look at the source code at grails/scripts/_GrailsWarPlugin.groovy

Just had to add

grails.project.war.exploded.dir = "target/${appName}-${appVersion}"
grails.war.exploded=true

to grails-app/conf/BuildConfig.groovy



来源:https://stackoverflow.com/questions/13782770/deploy-a-grails-2-1-1-application-to-tomcat-as-an-exploded-war

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!