views:

42

answers:

4

How do I make a Groovy Google App Engine project in Eclipse? I have both the Groovy and the App Engine plugins installed.

I'm already able to successfully make an App Engine or a Groovy project separately, but how do I make a project that is both?

I tried just making an App Engine project and then adding a Groovy class to it, but I get this error when I click Finish on the "Create a new Groovy class" dialogue:

Creation of element failed. Reason: groovytest does not exist

A: 

good tutorial here

http://blog.springsource.com/2009/04/07/write-your-google-app-engine-applications-in-groovy/

Aaron Saunders
That tutorial showed how to get GAE + Groovy working, but didn't mention how to get it all working in an Eclipse project.
Kyle
A: 

Put the groovy-all-1.7.X.jar in the war/WEB-INF/lib folder

traneHead
A: 

Here is how I got it to work:

I created a Google App Engine project in Eclipse, then I right clicked on it in package explorer, and went to configure->Convert to Groovy Project.

Kyle
+1  A: 

I did it recently according to this sequence:

  1. Download Eclipse 3.5

  2. Download Google App Engine

  3. Install Groovy plugin for IDE

  4. Install GAE plugin

  5. In Eclipse choose New -> Web Application Project (uncheck "Use Google Web Toolkit" if you are not going to use it)

  6. Right click on the new project Configure -> Convert to Groovy Project

  7. Download Groovy GAE project template, unzip it

  8. Right click on the project Import... -> General -> File System, browse to template project folder, check "Overwrite existing resources without warning"

  9. Open war/WEB-INF/appengine-web.xml and change an application name to yours

  10. Copy groovy-all.jar from Groovy Libraries to war/WEB-INF/lib

  11. Right click on the build.groovy, Run As -> Web Application

  12. Go to http://localhost:8888

  13. To deploy choose Google -> Deploy to App Engine from a project context menu

FYI: GAE project template contains the hello.groovy file which is a kind of Groovlet.

Vitalii Fedorenko