Programming Guy
Programming Guy

Reputation: 7441

How can I stop a default plugin execution?

I'm using a javascript maven plugin. I like the war-package goal and want to use it.

However it also comes with a jsunit goal bound to the test phase. This part of the plugin isn't great so I want to just turn it off. How can I do this?

Plugin xml is below.

Edit : Have tried adding executions with phase none, but the goals still run.

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

Upvotes: 1

Views: 353

Answers (1)

Maksim Sorokin
Maksim Sorokin

Reputation: 2404

A similar question was already asked here. You may just specify execution phase to none on the specific plugin.

Upvotes: 0

Related Questions