[spock] GradleでSpock動かそうとしたらエラー
Gradleのバージョン
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
build.gradle
apply plugin: 'java' apply plugin: 'groovy' repositories{ mavenCentral() } dependencies{ compile 'org.yaml:snakeyaml:1.12' groovy 'org.codehaus.groovy:groovy-all:2.0.0' testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' }
gradle test したら、以下のエラー。
:compileJava UP-TO-DATE :compileGroovy UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :compileTestJava UP-TO-DATE :compileTestGroovy FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':testCompile'. > Could not find group:junit, module:junit-dep, version:4.10. Required by: :SnakeJenkinsConfig:unspecified > org.spockframework:spock-core:0.7-groovy-2.0 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 9.204 secs
build.gradle を以下のように修正したら、うまくいった。
apply plugin: 'java' apply plugin: 'groovy' repositories{ mavenCentral() } dependencies{ compile 'org.yaml:snakeyaml:1.12' groovy 'org.codehaus.groovy:groovy-all:2.0.0' testCompile module('org.spockframework:spock-core:0.7-groovy-2.0'){ dependency('junit:junit:4.11') } }
Gradleのバージョンが古いせいだろうか