Maven フェイルセーフ プラグインを使用して統合テストを実行すると、問題が発生しました。私は 2 つのクラスを持っています。1 つは TestUnitTest.java で、もう 1 つは TestIntegrationIT.java です。pom.xml では、次のように構成します。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>unit-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
mvn:integration-test を実行すると両方のテストが実行され、mvn failsafe:integration-test を実行すると "TestIntegrationIT" のみが実行されます。異なる結果を出力するのはなぜですか?