从IntelliJ IDEA内部运行“test-app”目标时,从grails 2.2.4升级到grails 2.3.1后,出现多个“无法解析类”错误编译单元测试:Grails错误编译单元测试 - 无法解析应用类
| Error Compilation error compiling [unit] tests: startup failed:
/mnt/hgfs/Projekte/javandry/minigolf-webapp/test/unit/de/javandry/minigolf/webapp/controller/BallControllerTests.groovy: 3: unable to resolve class de.javandry.minigolf.webapp.Ball
@ line 3, column 1.
import de.javandry.minigolf.webapp.Ball
^
它看起来像应用程序本身的所有类在单元测试中是不可见的。当我从命令行运行目标时,一切都很好。
我已经尝试过:
- 删除
$USER_HOME/.grails/2.3.1/projects
目录 - 设置
grails.project.work.dir = "target"
在BuildConfig.groovy
- 删除
$PROJECT_HOME/target
目录 - 运行 “干净” 和 “干净所有” 目标之前“ test-app“
- 禁用”test-app“的分叉执行
错误仍然出现。
现在,我用尽了什么我可以尝试的想法。
有什么想法吗?