Search code examples
groovygradlespockgeb

Geb + Spock + groovy setup


So I've been attempting to get these tools running together, but I can't seem to get things setup properly. Each time I am presented with the following error:

The project was not built since its build path is incomplete. Cannot find the class file for org.spockframework.mock.MockController. Fix the build path then try building this project.

I've created this gist. When I run gradle chrome test I get the following output:

 gradle chrome test
 :compileJava UP-TO-DATE
 :compileGroovy UP-TO-DATE
 :processResources UP-TO-DATE
 :classes UP-TO-DATE
 :compileTestJava UP-TO-DATE
 :compileTestGroovy FAILED

 FAILURE: Build failed with an exception.
 * What went wrong:
 Execution failed for task ':compileTestGroovy'.
 > org/spockframework/mock/MockController

 * Try:
 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 BUILD FAILED

I'm using gradle 1.3, geb 0.7.2 and spock 0.7-groovy-2.0. I've also tried updating geb to utilize 0.9.0-RC-1. The gist above should have everything needed to see this same error.


Solution

  • This is what you get when you run Spock 0.7 with Geb versions lower than 0.9.0-RC-1 (which aren't compatible with Spock 0.7). Double check your setup and perform a clean build.