Grails 2.0.0.RC1 错误 Spock 测试
我已将 grails 项目从 Grails 1.3.5 升级到 Grails 2.0.0.RC1,并将 Spock 插件从 0.5 升级到 0.6。现在在测试中出现此错误:
| Server running. Browse to http://localhost:8080/appName
| Server stopped
| Tests FAILED - view reports in target\test-reports
| Error Error executing script TestApp: java.lang.RuntimeException: Could
ad class in test type 'spock' (Use --stacktrace to see the full trace)
I've upgraded a grails project from Grails 1.3.5 to Grails 2.0.0.RC1 and the Spock plugin from 0.5 to 0.6. and now have this error in tests:
| Server running. Browse to http://localhost:8080/appName
| Server stopped
| Tests FAILED - view reports in target\test-reports
| Error Error executing script TestApp: java.lang.RuntimeException: Could
ad class in test type 'spock' (Use --stacktrace to see the full trace)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否将 Spock 插件升级到 spock:0.6-SNAPSHOT。有一个相关的 StackOverflow ,它引用了
提取的是这样的:
存储库部分中的以下内容:
以及以下插件依赖项定义
Did you upgrade your Spock plugin to spock:0.6-SNAPSHOT. There is a related StackOverflow and it references a JIRA.
Extracted is this:
The following in the repositories section:
And the following plugin dependency definition
尝试清除项目的本地 Grails 缓存。为此,
请进入 ~/.grails/2.0.0RC1/projects(其中 ~ 是您的主目录)并删除项目目录。
您可能还需要清理和构建,因为几天前需要最新版本的 Spock 所有 spock 测试都要重新编译。
Try clearing your local grails cache for the project. To do this,
go into ~/.grails/2.0.0RC1/projects (where ~ is your home directory) and delete the project directory.
You may also need to clean and build, as a latest build of Spock a couple of days ago required all spock tests to be recompiled.
0.7现已发布;对于 grails 2.1/2.0,您现在可以使用:
0.7 is released now; for grails 2.1/2.0 you can use now: