作为爆炸式战争,将Grails 2.1.1应用程序部署到Tomcat? [英] Deploy a Grails 2.1.1 application to Tomcat as an exploded war?
问题描述
我正在OpenShift上部署一个Grails应用程序,我试图避免每一次更改都会在网上推送一个50MB的文件。
我创建一个项目在〜/ dev / apps / grails / test
进行测试
根据这个答案,我添加了
grails.war.exploded = true
到 grails-app / conf / BuildConfig .groovy
,导致该文件夹被创建:
/home/sas/.grails/ 2.1.1 / projects / test / stage
我如何告诉它创建爆炸战争在〜/ dev / apps / grails / test / target / test-0.1
?
<复制文件夹如下:
cp -r /home/sas/.grails/2.1.1/projects/test/stage 〜/ dev / tomcat / webapps / test-0.1
可以正常工作,整个过程拿出一个quic关于OpenShift的kstart脚本。
刚刚看过grails / scripts / _GrailsWarPlugin.groovy的源代码
只需添加
grails.project.war.exploded.dir = target / $ {appName} - $ {appVersion}
grails.war.exploded = true
to grails-app / conf / BuildConfig.groovy
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.
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
这篇关于作为爆炸式战争,将Grails 2.1.1应用程序部署到Tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!