I have a multi-module project, and I have the fault tolerance defined in the root pump, for example:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.19</version> <configuration> <includes> <include>**/*IntegrationTest.java</include> <include>**/*JourneyTest.java</include> <include>**/*CucumberFeatureTest.java</include> </includes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19</version> <configuration> <excludes> <exclude>**/*IntegrationTest.java</exclude> <exclude>**/*JourneyTest.java</exclude> <exclude>**/*CucumberFeatureTest.java</exclude> </excludes> </configuration> </plugin>
Failsafe is not defined anywhere else in my other references. If I run mvn verify , it skips integration tests (it runs unit tests). But if I run mvn test-compile failsafe:integration-test , it runs integration tests.
I suggest that fault tolerance should be implemented in both of these situations. So why doesn't it start when I type mvn verify ?
UPDATE Just noticed that it was wrapped around these tags:
<build> <pluginManagement> <plugins> <plugin>
It seems to me that this explains the reason, but I'm not sure why unit tests still work, as you would expect with mvn verify and mvn test . Why does surefire work differently from failover in this regard?
source share