【发布时间】:2011-04-24 22:49:06
【问题描述】:
我刚开始玩 Play!框架,并偶然发现了这样的问题:在测试模式下运行应用程序时,作为依赖项添加的模块无法编译。 到目前为止,错误的模式重复了 2/2 次。属于失败的测试套件的引用类无法解析为类型。
我的 dependencies.yml 文件如下所示:
require:
- play 1.2
- secure
- crud
- play -> cobertura 2.1
- play -> paginate head
- play -> messages 1.0
- play -> i18ntools 1.0.1
# - play -> scaffold head
如您所见,我已经禁用了scaffold 模块,但下一行是paginate。第一次请求后出现的错误如下:
Compilation error
The file {module:paginate-head}/test/play/modules/paginate/MappedPaginatorTest.java could not be compiled. Error raised is : MockModel cannot be resolved to a type
In {module:paginate-head}/test/play/modules/paginate/MappedPaginatorTest.java (around line 16)
12:
13: public class MappedPaginatorTest {
14: @Test
15: public void testPaginateByKey() {
16: Map<String, MockModel> models = new HashMap<String, MockModel>();
17: List<String> keys = new ArrayList<String>();
18:
MockModel 类与MappedPaginatorTest 放在同一目录中。 (scaffold 模块也是如此。)
我使用 Eclipse 在两种模式下运行应用程序,但在命令行使用 play test 运行时出现相同的错误。
我不坚持修复模块以启用它们的测试。但如果这是我能忍受的唯一方式。
【问题讨论】:
标签: playframework