Monday, April 27, 2009

Getting started with Grails 1.1.1-SNAPSHOT on Google App Engine/J

Official Grails support for Google App Engine/J is coming with Grails 1.1.1 that is set to be released this week according to a recent Twitter post from Grails project lead Graeme Rocher.

I'm really looking forward to this release - the combination of Grails (high productivity) and GAE/J (high scalability) is a very nice match.

If you're eager to get going before the official Grails 1.1.1 release - follow this small guide to build Grails 1.1.1-SNAPSHOT from source and deploy your first Grails GAE/J application.

# Step 1: Fetch and build Grails 1.1.1-SNAPSHOT
cd
mkdir grails-1.1.1-build
cd grails-1.1.1-build
git clone git://github.com/grails/grails.git
cd grails/grails
export ANT_OPTS="-Xmx512m"
ant jar
export GRAILS_HOME="$(pwd)"
export PATH="${GRAILS_HOME}/bin:${PATH}"
grails
# Version string should show "Grails 1.1.1-SNAPSHOT"

# Step 2: Create Grails-GAE/J application
grails create-app gaetest
cd gaetest
grails uninstall-plugin hibernate
emacs grails-app/conf/BuildConfig.groovy
# Add: google.appengine.sdk="/path/to/appengine-java-sdk-1.2.0"
grails install-plugin app-engine
# Fix a bug in the app-engine plugin.
emacs ~/.grails/1.1.1-SNAPSHOT/projects/gaetest/plugins/app-engine-0.5/scripts/_Events.groovy
# Add <sessions-enabled>true</sessions-enabled> after <version>${appVersion}</version>
grails install-templates
emacs src/templates/war/web.xml
# Remove the <welcome-file-list> definition
grails app-engine run
# Now browse to http://localhost:8080/

# Step 3: Deploy Grails-GAE/J application
grails set-version 1
emacs grails-app/conf/Config.groovy
# Add: google.appengine.application="app-id"
grails app-engine deploy
# The app should now be deployed at http://app-id.appspot.com/

5 comments:

  1. Hi there! I just would like to give a huge thumbs up for the nice info you will have right here on this post. I will likely be coming again to your weblog for extra soon.
    Commodity tips
    Stock Market
    Share Market
    Nse Tips
    Bse Tips

    ReplyDelete
  2. I was working and suddenly I visits your site frequently and recommended it to me to read also. The writing style is superior and the content is relevant. Thanks for the insight you provide the readers!
    Intraday Nifty Future Tips

    ReplyDelete
  3. Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Buy Property

    ReplyDelete
  4. This is a magnificent post Getting started with Grails 1.1.1-SNAPSHOT on Google App Engine/J . I benefit from the knowledge lot. I will bookmark this page. show gratitude’s for sharing this knowledge.

    Science Dissertation examples

    ReplyDelete
  5. You have done a great job,The post is very informative and it contributed to my knowledge
    Nursing Essays

    ReplyDelete