通常,您只能使用技巧来禁用执行:
将执行阶段设置为不存在阶段(
dont-execute)。但是请注意,您必须使用两个不同的执行ID才能分别关闭两个目标:
<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>
子模块:
<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>
当然,在您的特定情况下,您当然也可以
skipXtend在每次执行中使用configuration属性来不跳过执行,而只是阻止插件执行任何操作:
<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>



