Grails + Intellijj + spock

时间:2015-07-29 16:00:09

标签: unit-testing grails intellij-idea groovy spock

我正在使用spock为grails app控制器编写一些单元测试。当我运行规范时,我得到以下错误。 所有这些错误都出现在.java文件中。我是grails和spock的新手。任何帮助将不胜感激。 我使用的是jdk 1.8,grails 2.4.3

Error:(14, 10) java: annotations are not supported in -source 1.3
  (use -source 5 or higher to enable annotations)

Error:(14, 10) java: annotations are not supported in -source 1.3
  (use -source 5 or higher to enable annotations)

Error:(14, 10) java: annotations are not supported in -source 1.3
  (use -source 5 or higher to enable annotations)
Error:(34, 23) java: generics are not supported in -source 1.3
  (use -source 5 or higher to enable generics)
Error:(79, 31) java: enhanced for loops are not supported in -source 1.3
  (use -source 5 or higher to enable for-each loops)
Error:(133, 41) java: ';' expected

Error:(171, 9) java: illegal start of expression

0 个答案:

没有答案