javascript - 如何停止默认插件执行?

标签 javascript maven maven-plugin

我正在使用 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/

相关文章:

javascript - highChart打印 'noData'消息

java - 如何在 Intellij 中获取文件?

maven - 使用 maven-exec-plugin 运行命令行

java.sql.SQLException :No suitable driver found for jdbc:mysql://localhost/myDB 异常

web-services - WSIT、Maven 和 wsimport——它们可以一起工作吗?

java - Pojo 到 json 模式 v4,反之亦然,通过 maven

javascript - 如何跳过转换元素文本

php - 以 HTML 形式将文件存储在 MySQL 数据库中

javascript - 更新大量值的更快方法

java - 从打包的 war 文件中排除本地 WEB-INF/lib jar