1.3.7 -> 2.0.4 に最近アップグレードした古い grails アプリケーションがあります。2.1.1 にアップグレードした後も同じことが起こります。
GGTS から test-app を実行しようとすると、次のようになります。
| Error Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (Use --stacktrace to see the full trace)
SSサイトでも4月に同様の報告がありました。
また、grails 1.3.7 の同様の例外について多くの質問があることもわかりましたが、これは 2.0.4 に影響する問題です。
編集:OK、実際にはコマンドラインでも発生しますが、少なくとも動作させることができます。残念ながら、再起動するとまた壊れます。
これがコンソールで修正するために行うことです。基本的には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