首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spock框架与Grails 1.3.8中的其他插件冲突

Spock框架与Grails 1.3.8中的其他插件冲突
EN

Stack Overflow用户
提问于 2012-06-05 00:40:38
回答 1查看 1.9K关注 0票数 1

我已经在Grails 1.3.8应用程序上安装了Spock。它在运行测试应用程序后失败。它似乎与我的其他插件有一些冲突,但我无法解决这个问题。我已经安装了超过20个插件。

错误是:

代码语言:javascript
复制
     org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
     Could not instantiate global transform class  
     org.spockframework.compiler.SpockTransform specified at jar:file:
     /C:/Documents%20and%20Settings/xxxxxxx/.ivy2/cache/org.spock
     framework/spock-core/jars/spock-core-0.6-groovy-1.8.jar!/META-INF/services  
     /org.codehaus.groovy.transform.ASTTransformation  because of exception 
     org.spockframework.util.IncompatibleGroovyVersionException: The Spock 
     compiler plugin cannot execute because Spock 0.6.0-groovy-1.8 is not compatible  
     with Groovy 1.7.8. For  more information,see http://versioninfo.spockframework.org
     Spock location: file:/C:/Documents%20and%20Settings/xxxxxx/.ivy2/cache
     /org.spockframework
     /spock-core/jars/spock-core-0.6-groovy-1.8.jar
     Groovy location: file:/C:/dev/Grails/grails-1.3.8/lib/groovy-all-1.7.8.jar

这是我的buildConfig:

代码语言:javascript
复制
dependencies {
    test "org.spockframework:spock-grails-support:0.6-groovy-1.7"
}
plugins {
    compile ":joda-time:1.4"
    compile ":excel-import:0.9.6"
    compile ":export:1.3"

    test(":spock:0.6") {
      exclude "spock-grails-support"
  }
}

如果我不安装任何插件,我可以运行spock测试而没有任何问题。我不确定是不是某个插件有什么特别之处,或者Spock有什么特别之处,或者我做错了什么。

附加信息:我发现由于某种原因,一个或多个插件会阻止Grails下载

spock-grails-support:0.6-groovy-1.7

使用我的插件,Grails只下载spock-grails-support:0.6-groovy-1.8,而不是1.3.8所需的1.7。所以现在我不确定是什么阻止了Grails下载依赖项。

谢谢你的建议

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-11 10:49:31

Joda-time插件似乎依赖于Spock,尽管它在插件中将export设置为false,但它强制Grails在我的应用程序中下载spock-grails-support:0.6-groovy-1.8。我让它排除了spock,到目前为止,它似乎是有效的。

代码语言:javascript
复制
compile (":joda-time:1.4") { exclude "spock" } 
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10884865

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档