2012-06-04 62 views
1

我已經在Grails 1.3.8應用程序上安裝了Spock。運行測試應用程序後失敗。它似乎與我的其他插件有一些衝突,但我無法弄清楚。我有超過20個插件安裝。Spock框架與Grails 1.3.8中的其他插件有衝突

的錯誤是:

 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:

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的內容,甚至是我做錯了什麼。

附加信息: 我發現,由於某種原因,一個/多個插件的防止Grails的從網上下載的

斯波克,Grails的支持:0.6 - 常規 - 1.7

隨着我的插件,Grails的只下載spock-grails-support:1.3-1.8所需的0.6-groovy-1.8不是1.7。 因此,現在我不確定是什麼阻止Grails下載依賴項。

感謝您的任何意見

回答

1

看來,喬達時間插件對斯波克的依賴,雖然它已設置導出到虛假的插件,它迫使Grails的下載斯波克,grails-支持:0.6-groovy-1.8在我的應用程序中。我已經把它排除在外,並且到目前爲止它似乎在工作。

compile (":joda-time:1.4") { exclude "spock" }