IntelliJ 13 New Project No Grails option
Asked Answered
A

8

5

I'd like to create a new Grails project in IntelliJ 13.

I have IntelliJ 13. I have Grails.

I do not see a Grails option in the New Project Dialog.

How do I configure IntelliJ 13 so that the New Project Dialog has a Grails option?

IntelliJ 13 New Project Dialog without Grails option

When I select Groovy there's an error about a missing library. Grails was installed under my home directory in ~/.grails by GVM.

enter image description here

Alecto answered 22/9, 2014 at 4:53 Comment(0)
P
6

Please take a look in which edition of IntelliJ you are using. The Community edition supports Groovy, but don't support Grails; the Ultimate edition supports Grails and a lot of Frameworks

Putative answered 12/2, 2015 at 13:34 Comment(1)
IntelliJ IDEA Ultimate 14Alecto
D
1

You are selecting a wrong(java) option , you have to select groovy in left menu bar and then you will be shown grails option.

Dishonesty answered 22/9, 2014 at 6:9 Comment(2)
These instructions show a Grails option at the same level as Groovy: confluence.jetbrains.com/display/IntelliJIDEA/…Alecto
When I select Groovy, the dialog says that there's no library selected. I suspect that there is some configuration missing that links IntelliJ to my ~/.grails directory (created with GVM)Alecto
A
1

My IntelliJ New Project Dialog now has a Grails option, though I'm not sure exactly what caused it to appear.

Here are some things that I did:

On the command line, in an already existing Grails project I ran:

grails integrate-with --intellij

Then I opened the project (which involved migrating the legacy version IntelliJ project file that Grails created to IntelliJ 13)

There was a green box in the upper right corner of the project window that complained about the Grails SDK was not being configured. That box disappeared before I could click on the link inside of it to attempt to correct the problem.

I closed the project and re-opened it, in the hope of causing the green box to reappear. It did not. But a red box appeared that complained that the Java SDK was not configured properly.

In the Project Structure Dialog I configured a Java SDK.

I closed the Grails project, then I tried to create a new Grails project. This time there was a Grails option under the Groovy option.

IntelliJ New Project Dialog with Grails option

But I think there is still issue because the dialog shows No library selected for Groovy.

Groovy is included as part of Grails, so perhaps I should click the "Create..." button and choose some Groovy installation that is packaged in the Grails installation? But, this seems like something I would expect IntelliJ to configuration automatically when it is linked to the Grails installation.

Alecto answered 22/9, 2014 at 14:15 Comment(0)
M
1

Did you enable Grails plugin in IDE? Go to File>Settings>Plugin and check the grails option, restart IDE.

Marymarya answered 12/3, 2015 at 10:46 Comment(0)
S
1

Grails is only supported in the Ultimate version of IntelliJ IDEA. It isn't supported in the community edition.

You can try the Ultimate version for free for 30 days before it goes into a mode where you can only work 15 minutes until it has you stop/close whatever you're doing and reopen the IDE, I guess.

Sonde answered 13/7, 2016 at 5:27 Comment(0)
D
1

I guess you are using the community edition of IntelliJ IDEA, which does not provide any option to create a grails application. But that doesn't mean that you are not allowed to create a grails project.

Use the command line to create a new Grails project,

grails create-app YourAppName

this will create the grails app in your present working directory. Then simply run the app using the following command

grails run-app

this will resolve all the dependencies, and start your app.

Now open the IntelliJ IDEA and load this app from your present working directory, then proceed as instructed and that's it.

Only demerit of using this technique is that suggestions and auto-completion won't work, GSP pages will be unrecognized. If you want these features then go for Ultimate Edition of the IntelliJ IDEA.

Diplomatics answered 22/12, 2016 at 11:39 Comment(0)
L
0

You can create a grails project via terminal (grails create-app ... ) and just import (or new -> from existing sources) project from Idea. Than you should choose "import project from external model -> gradle (or maven)". And your project is ready! I think this will help you.

Lavella answered 22/1, 2016 at 9:58 Comment(1)
The OP clearly states that it should be created with IntelliJ, so while this approach probably works, it is not an answer to the question.Sinner
E
0

You need Ultimate version of IntelliJ not Community one in order to use Groovy/Grails.

Ethyne answered 9/8, 2017 at 16:4 Comment(1)
What does this add over the top answer that says the same thing?Confection

© 2022 - 2024 — McMap. All rights reserved.