9.0 Beta: Change grails SDK on existing project?

I'm using IDEA 9.0 Beta. Grails support is great, except for one thing: I have not found a way to change the grails SDK for a grails application after the initial creation in IDEA. Is there a way to do this?

At the moment I'm forced to open my projects in IDEA 8, change the grails SDK, and import them anew into 9. Surely this is not the most elegant of all possible solutions.

4 comments
Comment actions Permalink

Solution:

The way to do this is to close the project on which you want to change grails SDK and select "New project" from the menu. Choose "Import Grails application from existing source" and navigate to your project. You will be asked, ".idea project files already exist in that folder. Allow overwriting?" (or something equivalent); say "Yes".
Next you will be asked for the grails SDK you want to use. Careful: ALWAYS manually choose the installation path of your grails SDK, even if IDEA already suggested that very same path. I don't know why this is neccessary, but somehow the grails library will not load into your project if you don't go through the folders yourself and select the correct installation directory. (This issue has been submitted to IDEA before and I gather that a fix is being worked out. Hopefully in the full release this bug will be fixed.)

When your project opens you should be prompted on whether you would like your grails library to be inserted as a project or global library. If this prompt does not come up before your project has even loaded then, well, something went wrong. Close the project and repeat above steps in detail.



I hope to help others with the same problem with this post.

1
Comment actions Permalink

Is this the only way to update the Grails SDK for a existing project? I mean this will be official?!

Doesn't seems like an intellij wake, looks like a workaround.

0
Comment actions Permalink

It is the only way to do it in the Beta that I have found or heard anybody else talk of. I agree it's not very intuitive or elegant.
I don't know whether they're planning to implement a more convenient method but if you find out let me know.

0
Comment actions Permalink

I don't know whether they're planning to implement a more convenient method but if you find out let me know.

We are planning to do this, thank you for your feedback!

0

Please sign in to leave a comment.