2013-05-27 48 views
2

我有一个遗留的grails应用程序,我recentyl升级1.3.7 - > 2.0.4 同样的事情发生后,我升级到2.1.1Grails 2.0.4/2.1.1测试应用程序抛出ClassNotFoundException(GrailsS​​pecTestType)

当我尝试从GGTS运行测试程序,我得到:

| Error Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (Use --stacktrace to see the full trace) 

有一个从四月SS site一个类似的报告。

我也看到有很多关于grails 1.3.7的类似异常的问题 - 但这是一个影响2.0.4的问题。

编辑:好的,它实际上也发生在命令行,但至少我可以得到它的工作。 不幸的是,重新启动后,它再次中断。

这是我做些什么来解决它的控制台,基本上我升级到0.7降级到0.5 Groovy的1.7

grails> clean 
| Application cleaned. 
grails> refresh-dependencies 
| Dependencies refreshed. 
grails> test-app 
| Compiling 73 source files 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
| Compiling 119 source files 

| Compiling 119 source files. 
| Error Error running script test-app : java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (U 
se --stacktrace to see the full trace) 
grails> install-plugin spock 
| Resolving plugin spock. Please wait... 
> You currently already have a version of the plugin installed [spock-0.5-groovy-1.7]. Do you want to update to [spock-0 
.7]? [y,n] y 
| Plugin installed. 
grails> clean 
| Application cleaned. 
grails> refresh-dependencies 
| Application cleaned..... 
> You currently already have a version of the plugin installed [spock-0.7]. Do you want to update to [spock-0.5-groovy-1 
.7]? [y,n] n 
| Dependencies refreshed. 
grails> test-app 
> You currently already have a version of the plugin installed [spock-0.7]. Do you want to update to [spock-0.5-groovy-1 
.7]? [y,n] n 
| Compiling 73 source files 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
| Compiling 119 source files 

| Compiling 119 source files. 
| Error Error running script test-app : java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (U 
se --stacktrace to see the full trace) 
grails> install-plugin spock 
| Plugin 'spock' with version '0.7' is already installed 
| Plugin not installed. 
grails> uninstall-plugin spock 
| Uninstalled plugin [spock] 
grails> clean 
| Application cleaned. 
grails> refresh-dependencies 
| Dependencies refreshed. 
grails> test-app 
| Compiling 73 source files 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
| Compiling 119 source files  
| Running 8 unit tests... 5 of 8 

回答

1

因此,这被一些行为不端的插件导出它的斯波克的依赖性显然引起的。 示例解决办法,如果你的麻烦制造者是GWT:

compile(':gwt:0.8') { 
exclude 'spock' 
} 

由于Nathan Dunn

相关问题