I have a groovy script in src/it/first/ver.groovy
If I use the exec-maven-plugin
I can run it, but if I use the maven-invoker-plugin
I cannot. I would prefer to use the invoker...
Example of config using exec-maven-plugin
:
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>1.5.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>src/it/first/ver.groovy</executable>
</configuration>
</execution>
</executions>
</plugin>
Example of config using maven-invoker-plugin
:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<debug>true</debug>
<projectsDirectory>src/it/first</projectsDirectory>
<postBuildHookScript>ver.groovy</postBuildHookScript>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
and the output is
[INFO] --- maven-invoker-plugin:3.1.0:run (integration-test) @ demo ---
[INFO] No projects were selected for execution.