views:

311

answers:

2

Hi,

I have groovy 1.7 beta 1 in my path and GROOVY_HOME pointing to same groovy 1.7 beta 1 directory. I have installed grails 1.2-M3, and set GRAILS_HOME to point to grails 1.2-M3.

I would like to try some groovy 1.7 features in my grails app, anonymous inner classes to be precise. I am receiving a compiler error even though this feature should be supported in groovy 1.7 beta 1.

I can see that grails includes groovy-all-1.6.4.jar in grails\lib directory. In my setup, with grails 1.2-M3 and GROOVY_HOME pointing to same groovy 1.7 beta 1 directory and with groovy 1.7 beta 1 in my path, what is the version of groovy that grails is running with? What is the purpose of groovy-all-1.6.4.jar in grails\lib directory?

Finally, as I already asked in title, Can I run grails 1.2-M3 with groovy 1.7 beta 1?

+1  A: 

groovy-all-1.6.4.jar in the grails/lib is the groovy version that grails is using, grails does not use the environment variable GROOVY_HOME....

I don't know if you can use groovy1.7 beta in grails 1.2-m3, you can try downloading groovy-all1.7-b1.jar (if exists) and put it in grails/lib....

I think it won't work.....but you can try it.....

jjchiw
startGrails.bat does check for GROOVY_HOME::check_GROOVY_HOME@rem Define GROOVY_HOME if not setif "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%..but now that you mention it, doesn't seem to make any use of it...
Dan
A: 

The documentation doesn't say you can't but also doesn't mention this groovy version. I would say it's a no-go unless you want to try it for a while and find a random incompatibility later.

dlamblin