Getting Groovy working on the Google App Engine required a few tweaks, thankfully the SpringSource Groovy and Google App Engine Java teams stepped up and worked together on various details including the area of constrained and strict security manager policies, to ensure development on the Java platform can take advantage of Groovy as a dynamic language. An updated Groovy 1.6.1 version is ready and by adding the “groovy-all” JAR in your WEB-INF/lib directory you can get start writing your applications in Groovy.
Following on from my previous post on Google App Engine I thought I’d have a stab at getting a Groovy application up and running with the App Engine plaform myself! I followed Guillaume Laforge’s excellent blog: “write your Google App Engine applications in Groovy!”.
After following Guillaume Laforge’s mini tutorial I tried to get the test project working within my Eclipse Google App Engine environment – this wasn’t as straightforward as I would have expected. I kept getting the following exception when trying to launch the application locally (this appears to be a local environment issue only):
java.security.AccessControlException: access denied
(groovy.security.GroovyCodeSourcePermission /groovy/shell)
After a bit of playing around and searching I found I wasn’t the only one with this problem, and a bug has been raised concerning this.
To get the application working locally I needed to add the groovy-all-1.6.1.jar to the libraries in the Java Build Path – although this allowed me to run the application I have been unable to make changes to any Groovy code (that requires a compilation) without a restart – updates to GSPs and Groovlets seem to be fine.
One of the things that I have come to really appreciate about the .NET platform, coming from a Java background, is the increased productivity you get with such an integrated IDE and the runtime – no need to archive up artefacts and deploy to a container (in the Java sense that is, I know .NET has assemblies). The ‘feed-back loop’ is greatly reduced and by this I mean the amount of time between making a change in code and seeing the results in the execution of your application on the screen.
