Grails on Google App Engine
- groovy-1.6.3
http://groovy.codehaus.org/Download - grails-1.1.1
http://www.grails.org/Download - grails-app-engine-0.8.3 plugin
http://grails.org/plugin/app-engine
- 设置系统环境变量:
GROOVY_HOME
GRAILS_HOME
Path: %GROOVY_HOME%\bin;%GRAILS_HOME%\bin
- 创建应用
grails create-app hook-hub
- 更改配置
在renli-resource/grails-app/conf/Config.groovy中添加如下行:google.appengine.application="hook-hub" - 安装AppEngine plugin
cd hook-hub
grails uninstall-plugin hibernate
grails install-plugin app-engine - 运行AppEngine
grails create-domain-class com.vickcy.Book grails install-plugin hibernategrails generate-all com.vickcy.Bookgrails uninstall-plugin hibernate - Delete : target/war/WEB-INF/datastore-indexes.xml
- 运行AppEnginegrails app-engine run
- 向GAE部署应用* 部署时应用名必须与注册的GAE应用名一致
grails set-version 1
grails app-engine package
%APPENGINE_HOME%/bin/appcfg.cmd update target/war
- Eclipse3.4 plugin
・Google App Engine plugin
- update site: http://dl.google.com/eclipse/plugin/3.4
・TestNG plugin - Groovy plugin 的前提
- update site: http://beust.com/eclipse
・Groovy plugin
- update site: http://dist.groovy.codehaus.org/distributions/update/
- Eclipse Project Setting
Project -> Properties -> Java Build Path -> Libraries -> Edit ->Variable -> New
Name: GRAILS_HOME
Path: Grails根目录