我正在使用 javascript maven 插件。我喜欢 war 包目标并想使用它。
但是它还附带了一个绑定(bind)到测试阶段的 jsunit 目标。插件的这一部分不太好,所以我想将其关闭。我怎样才能做到这一点?
插件 xml 如下。
编辑:已尝试添加无阶段执行,但目标仍然运行。
<plugin>
<groupId>org.codehaus.mojo.javascript</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>copyDependenciesForJasmine</id>
<phase>compile</phase>
<goals>
<goal>war-package</goal>
</goals>
<configuration>
<webappDirectory>${project.build.directory}/javascript</webappDirectory>
<scriptsDirectory>src</scriptsDirectory>
<libsDirectory>../dependencies</libsDirectory>
</configuration>
</execution>
<execution>
<id>jsunit</id>
<phase>none</phase>
</execution>
<execution>
<id>prepare-tests</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
最佳答案
已经提出了类似的问题 here 。您可以在特定插件上将执行阶段指定为none
。
关于javascript - 如何停止默认插件执行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6938642/