I have a sample springboot java application. This is my pom file
<groupId>com.sample.this</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
</parent>
<profiles>
<profile>
<id>profile1</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>id1</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
When I run mvn verify -Pprofile1, the failsafe plugin runs twice.
Here are the logs -
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (default) @ junit.example ---
.
.
.
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---
When I remove springboot starter parent pom, then the failsafe plugin runs once as expected. Here is that log -
[INFO] --- maven-failsafe-plugin:2.22.1:integration-test (id1) @ junit.example ---
So, springboot runs its default failsafe plugin in integration-test phase if it doesnt find one in my pom.
I cant add a default execution step in my failsafe plugin declaration. How do I stop springboot to stop running its failsafe plugin ?
I can add this in my pom to make it work -
<execution>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipITs>true</skipITs>
</configuration>
</execution>
But this doesnt look intuitive .
Is there any other way around ?
I dont want to add springboot plugin in my pom file