我創建使用Grails 1.3.7一個簡單的Hello World的Grails應用程序:無法安裝到斯波克的Grails 1.3.7項目
grails create-app hello
grails create-controller hello
然後我嘗試使用安裝斯波克插件:
grails install-plugin spock
而且我得到以下幾點:
Error loading event script from file [/Users/wholladay/.grails/1.3.7/projects/hello/plugins/spock-0.6/scripts/_Events.groovy] startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at jar:file:/Users/wholladay/.ivy2/cache/org.spockframework/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:/Users/wholladay/.ivy2/cache/org.spockframework/spock-core/jars/spock-core-0.6-groovy-1.8.jar
Groovy location: file:/usr/local/Cellar/grails/current/lib/groovy-all-1.7.8.jar
所以我去了:http://versioninfo.spockframework.org,發現有一個版本0.6 groovy- Spock 1.7。所以,我想:
grails install-plugin spock 0.6-groovy-1.7
但後來我得到了以下錯誤:
Error resolving plugin [name:spock, group:org.grails.plugins, version:0.6-groovy-1.7].
插件沒有發現名稱[斯波克]和版本[0.6 Groovy的1.7
任何想法?
哇!我所要做的只是閱讀文檔?!這真是太棒了,謝謝你將這引起我的注意。它像一個魅力。 – wholladay 2012-08-01 18:19:46