2

I need disable surefire (default-test of spring) because I'm course and they did the Integrations-Test through failsafe.

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*IT.java</include>
                    </includes>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${basedir}/target/classes</additionalClasspathElement>
                    </additionalClasspathElements>
                    <parallel>none</parallel>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>

                    </execution>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

I tried to do with this but did't work

                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </execution>

when I run the test this is the result, the test is execute in org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test

enter image description here

  • Why would you need to disable the other one for that? You should simply exclude the integration tests from the surefire plugin, not totally exclude it. The failures seem regular failures which you should be fixing in the first place (not ignore them). – M. Deinum May 13 '20 at 15:16
  • because in the course they did with Failsafe, I just want to know how, – Javier Marin May 13 '20 at 18:03

0 Answers0