1つのプロファイルに2つの確実な実行があります-それらは異なる構成を必要とします。-Dtest = ...を実行すると、一致するテストが2回実行されます(実行ごとに1回)。
テストを1回だけ実行するにはどうすればよいですか?それ以上に、どうすれば確実にフォローを含めるか除外することができますか?(1回の実行で0回のテストが実行されます。-DfailIfNoTest= falseを使用します。)
<profile>
<id>clustering.integration.tests.profile</id>
<activation>
<property>
<name>clustering.integration.tests</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions combine.children="append">
<!-- Disable default-test execution. -->
<execution>
<id>default-test</id>
<goals><goal>test</goal></goals>
<phase>none</phase>
</execution>
<!-- Single node clustering tests. -->
<execution>
<id>tests-clustering-single-node.surefire</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<includes>
<include>org/jboss/as/test/clustering/single/**/*TestCase.java</include>
</includes>
</configuration>
</execution>
<!-- Multi node clustering tests. -->
<execution>
<id>tests-clustering-multi-node.surefire</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<includes>
<include>org/jboss/as/test/clustering/cluster/**/*TestCase.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>