jeudi 20 février 2020

Maven install is running failsafe

I am attempting to have my integration tests separated from the usual lifecycle, meaning that I do not want them to be executed during a mvn install. I have the following configuration:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
            <excludes>
                <exclude>**/*IT.java</exclude>
            </excludes>
        </configuration>
    </plugin>

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
            <includes>
                <include>**/*IT.java</include>
            </includes>
        </configuration>
        <goals>
           <goal>integration-test</goal>
        </goals>
    </plugin>

And my integration tests are all suffixed with IT. I was able to confirm that surefire does exclude the *IT.java tests, however it seems that failsafe is being triggered during mvn install anyway. What am I missing?

Thank you for your help

Aucun commentaire:

Enregistrer un commentaire