Intellij-idea – IntelliJ 11 – Grails SDK is not configured

grailsintellij-idea

I have recently upgraded my IntelliJ 10 to the latest 11.0.1 version. I am writing grails app and until I was using the older version of IntelliJ everything was fine, however 11 doesn't allow me to successfully add Grails SDK (2.0.0) – I was trying to add the framework support, this however doesn't seem to be persisted (after adding Groovy and then choosing Grails – nothing happens). I have tried to follow those steps as well: IntelliJ IDEA 9.0 – unable to select project SDK for Grails application

I would be grateful if someone would be able to point me how to configure Grails SDK – or what could be wrong in my configuration.

Thanks,


This is exactly the way that I have my global library defined and still I was having exactly the same issue.

I followed OverZealous advice and created a new Grails project named exactly the same as the original one and boom everything is fine now! Thanks for help.

Best Answer

You don't need both Groovy and Grails for Grails project, just use Grails SDK. When creating a new Grails project there is an option to add new SDK, select the home path of your Grails installation and it will be configured automatically as a Global Library and this library will be added as a dependency to your module.

Grails library configuration contains all the jars from GRAILS_HOME\dist and GRAILS_HOME\lib, plus all the jars from the src directory.

grails global library

grails dependency


In other words, it's not configured as a framework, it's just a library with all the jars from Grails distribution added to the module dependencies.