For some reason the Maven Grails integration fails to run Spock (integration phase)* tests
The tests are executed fine with the normal grails command grails test-app,
but the Maven version mvn grails:test-app fails. I've followed this example in the setup.
My grails BuildConfig.groovy has the following
dependencies {
// ... irrelevant dependencies omitted
test 'org.spockframework:spock-grails-support:0.7-groovy-2.0'
}
plugins {
// ... irrelevant plugins omitted
test(":spock:0.7") { exclude "spock-grails-support"
}
And the Maven pom.xml
<dependencies>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>${spock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<configuration>
<fork>true</fork>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.spockframework</groupId>
<artifactId>spock-maven</artifactId>
<version>${spock.version}</version>
<executions>
<execution>
<goals>
<goal>find-specs</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
where Grails version is 2.2.4 and Spock version is 0.7-groovy-2.0
The bottom line is that the Spock tests just don't get executed at all. What's up with that?
* So far only have written integration phase tests with Spock