Nina
Nina

Reputation: 701

Skip gatling tests when building release

We have a module for gatling tests and want to build a release.

We use a gatling maven plugin so we can execute tests on the command line with "mvn gatling:execute":

<plugin>    
    <groupId>io.gatling</groupId>
    <artifactId>gatling-maven-plugin</artifactId>
    <version>${gatling-plugin.version}</version>
    <executions>
        <execution>
            <goals>
                <goal>execute</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Is there a way how to deactivate the plugin for building releases without deactivating the command line execution feature?

I first tried to change "testSourceDirectory" to "sourceDirectory" and "testResources" to "resources", but that didn't change the behaviour.

I found -Dgatling.skip to work for "mvn clean install" but not for building releases.

Upvotes: 1

Views: 1810

Answers (2)

Nina
Nina

Reputation: 701

I just found that I can delete the part:

<executions>
    <execution>
        <goals>
            <goal>execute</goal>
        </goals>
    </execution>
</executions>

Because this is the part that executes the gatling tests during the build.

Without it, "mvn gatling:execute" will still work.

Upvotes: 2

Nickname0222022022
Nickname0222022022

Reputation: 616

http://maven.apache.org/guides/introduction/introduction-to-profiles.html
Use profiles to manage which plugins should run
Disable maven plugins when using a specific profile - looks like same issue ;)

Upvotes: 2

Related Questions