Hi all,
We have a suite of Groovy scripts that we use an integration tests (they actually call out to our microservices and validate responses). I have a case where I need to execute a Groovy script as part of the integration-test phase instead of testCompile. The reason is we have some pre- and post-integration steps that setup 3rd party dependencies like Kafka, and when the script runs during testCompile those dependencies are not available.
Here is my plugin definition for gmavenplus-plugin. This is mostly verbatim from the sample, except I've added the <phase> tag, which doesn't seem to help.
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<testSources>
<testSource>
<directory>${project.basedir}/src/${test.base.dir}/groovy</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
</testSources>
</configuration>
</plugin>
Is it possible to only have this execute during integration-test phase? Everything I've tried still executes the scripts during compile which will always fail in my case.
Thanks!
Mike