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.
Support for the Grails framework is not bundled with IntelliJ IDEA. You can install the Grails plugin from the JetBrains repository as described in Install plugins. The latest compatible version of IntelliJ IDEA is 2021.3. You can find the documentation for Grails support in earlier versions of IntelliJ IDEA Help.
I right clicked on the application and went to Grails -> Change SDK Version. I chose the version I wanted, then IDEA asked me if I wanted to upgrade the application. Clicked yes and all was good.
With Intellij 16 right click on your project in the right hand project pane. Choose Grails->Configure Grails SDK. If you're using the grails wrapper I would point to that SDK: Click em Create, select the folder, who contain the Grails 2, and Voila.
From the main menu, select Ctrl+Shift+Alt+S. On the panel on the left, locate the Project Settings section and select Project. From the Project SDK list, select another SDK or SDK version. If the necessary SDK is not defined in IntelliJ IDEA yet, click New and specify its home directory.
Creating a New Project will actually not overwrite any existing code; just point it at your existing project directory, select Grails and open it up. Your project will now complain that there is no Grails SDK; just point it at your Grails dist and you are good to go.
IntelliJ IDEA supports: To view the list of available SDKs, choose File | Project Structure from the main menu Ctrl+Alt+Shift+S. Python SDKs can be configured on the following levels: To easily tell them from each other, enter different names in the Name field. See SDKs for more information about SDK configuration.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With