如何停止默认插件执行?

时间:2011-08-04 08:57:57

标签: javascript maven maven-plugin

我正在使用javascript maven插件。我喜欢战争套餐的目标并希望使用它。

然而,它还附带了一个与测试阶段绑定的jsunit目标。插件的这部分不是很好,所以我想把它关掉。我怎么能这样做?

插件xml在下面。

编辑:尝试添加阶段为none的执行,但目标仍在运行。

<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>

1 个答案:

答案 0 :(得分:0)

已经问过类似的问题here。您可以在特定插件上将执行阶段指定为none