I have a setup where most of my projects require the xtend plugin to be run both for the compile and testCompile goals. I describe it in a pluginManagement section:
Generally, you can only disables executions with a trick:
Set the executions phase to non existant phase (dont-execute
). Note however, that you have to use two different execution ids to allow both goals to be individually turned off:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>xtend-compile</id>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
<execution>
<id>xtend-testCompile</id>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
Submodule:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>xtend-testCompile</id>
<phase>dont-execute</phase>
</execution>
</executions>
</plugin>
In your specific case, you could, of course, also use the skipXtend
configuration property in each execution to not skip the execution, but only prevent the plugin from doing anything:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>xtend-testCompile</id>
<configuration>
<skipXtend>xtend-testCompile</skipXtend>
</configuration>
</execution>
</executions>
</plugin>