How import grails project to Intellij 13.1 IDEA?

匿名 (未验证) 提交于 2019-12-03 10:24:21

问题:

I need to import a grails project to IntelliJ IDEA.

(I am very new to IntelliJ, grails, groovy).

When I try to build the project, the following error is obtained for each of the modules: Error:Cannot compile Groovy files: no Groovy library is defined for module ''

Would you know how I can fix this - how to correctly import the project - since I believe a Grails installation contains a Groovy library.

When I import into GGTS (as a Grails project), the project builds ok.

回答1:

Prerequisite: you need the Ultimate Edition of IntelliJ IDEA to get Grails support (see Frameworks and Technologies in the community/ultimate edition comparison)

With the Ultimate Edition you..

  1. use File/Open.. to open the project
  2. click the Configure SDK link in the green popup that appears on the top right (Grails SDK not found: Module 'import' has no Grails SDK. Configure SDK)
  3. create the Grails SDK
  4. if the green pop up is not visible anymore you can open the Event Log (bottom right). There you will find the message from the pop up and you can continue at 3.


回答2:

In Intellij 14 I have clicked right mouse button on project and choose Open Module Settings, then Modules. I have grails added before, I needed to add groovy, so Add/Library and choose directory with groovy.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!