简体   繁体   English

如何将grails项目导入Intellij 13.1 IDEA?

[英]How import grails project to Intellij 13.1 IDEA?

I need to import a grails project to IntelliJ IDEA. 我需要将grails项目导入IntelliJ IDEA。

(I am very new to IntelliJ, grails, groovy). (我对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 '' 当我尝试构建项目时,每个模块都会收到以下错误:错误:无法编译Groovy文件:未为模块定义Groovy库”

Would you know how I can fix this - how to correctly import the project - since I believe a Grails installation contains a Groovy library. 您是否知道我该如何解决-如何正确导入项目-因为我相信Grails安装中包含Groovy库。

When I import into GGTS (as a Grails project), the project builds ok. 当我导入GGTS(作为Grails项目)时,该项目就可以正常构建了。

Prerequisite: you need the Ultimate Edition of IntelliJ IDEA to get Grails support (see Frameworks and Technologies in the community/ultimate edition comparison ) 先决条件:您需要IntelliJ IDEA Ultimate Edition才能获得Grails支持(请参阅社区/最终版本比较中的Frameworks and Technologies)。

With the Ultimate Edition you.. 有了Ultimate Edition,您可以..

  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 ) 单击右上角出现的绿色弹出窗口中的Configure SDK链接( 未找到Grails SDK:模块“导入”没有Grails SDK。Configure SDK
  3. create the Grails SDK 创建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. 在那里,您会从弹出窗口中找到消息,然后可以继续执行3。

In Intellij 14 I have clicked right mouse button on project and choose Open Module Settings , then Modules . 14的IntelliJ我点击了项目鼠标右键,然后选择打开模块设置 ,然后模块 I have grails added before, I needed to add groovy, so Add/Library and choose directory with groovy . 我之前已添加grails,我需要添加groovy,因此添加/库并选择带有groovy的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM