【问题标题】:How can I stop a default plugin execution?如何停止默认插件执行?
【发布时间】:2011-10-19 19:11:22
【问题描述】:

我正在使用 javascript maven 插件。我喜欢 war-package 目标并想使用它。

不过,它还附带了一个绑定到测试阶段的 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>

【问题讨论】:

标签: javascript maven maven-plugin


【解决方案1】:

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

【讨论】:

  • 我尝试添加无相。目标仍在运行。在问题中更新。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-27
  • 1970-01-01
  • 2020-09-26
  • 2010-11-07
  • 2015-03-11
  • 2012-08-30
相关资源
最近更新 更多