简体   繁体   English

Eclipse中的Grails 2.2.0支持

[英]Grails 2.2.0 Support in Eclipse

I am trying to create a grails 2.2.0 project using eclipse-jee-juno. 我正在尝试使用eclipse-jee-juno创建一个grails 2.2.0项目。 It gives me an error 它给了我一个错误

Groovy compiler level expected by the project does not match workspace compiler level. 项目预期的Groovy编译器级别与工作区编译器级别不匹配。 Project compiler level is: 1.8.X Workspace compiler level is 1.7.X Go to Project properties -> Groovy compiler to set the Groovy compiler level for this project. 项目编译器级别为:1.8.X Workspace编译器级别为1.7.X转到项目属性 - > Groovy编译器为此项目设置Groovy编译器级别。

Background : I have installed grails 2.2.0 and I am able to create and run a sample project/controller by using the command line (not eclipse) 背景 :我已经安装了grails 2.2.0并且我能够使用命令行(而不是eclipse)创建和运行示例项目/控制器

Grails 2.x need groovy 1.8+ to work. Grails 2.x需要常规1.8+才能工作。 In eclipse, right click your project, select 'properties' from menu and go to Groovy compiler, select groovy version 1.8.xxxx. 在eclipse中,右键单击您的项目,从菜单中选择“properties”并转到Groovy编译器,选择groovy版本1.8.xxxx。 Or you can go to 'preference' menu and change the global setting for groovy compiler version. 或者,您可以转到“首选项”菜单并更改groovy编译器版本的全局设置。

Here are the steps that enabled me to run the application on grails 2.2.0. 以下是使我能够在grails 2.2.0上运行应用程序的步骤。

  1. Install JDK 7 安装JDK 7
  2. Install Grails 2.2.0 安装Grails 2.2.0
  3. Install eclipse-jee-juno or GGTS 安装eclipse-jee-junoGGTS
  4. Download grails-2.2.0.RC4 下载grails-2.2.0.RC4
  5. Under GRAILS_HOME\\lib , Create a directory com.springsource.springloaded with a subdirectory springloaded-core GRAILS_HOME \\ lib下 ,使用子目录 springloaded -core创建一个com.springsource.springloaded 目录
  6. Copied contents of RC4\\lib\\org.springsource.springloaded into com.springsource.springloaded RC4 \\ lib \\ org.springsource.springloaded的内容复制到com.springsource.springloaded中

Restart GGTS or Eclipse. 重启 GGTS或Eclipse。 Your GRAILS app should be up and running! 您的GRAILS应用程序应该正常运行!

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

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