我的 Maven Failsafe 插件有问题,它不执行我的测试。测试存储在文件夹中\src\test\java\
,其名称Test1IT.java
格式正确。另外我必须在 Maven 编译器插件中排除这个测试,因为这个测试依赖于码头运行。这是 pom.xml
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<configuration>
<testExcludes>
<exclude>**/*.java</exclude>
</testExcludes>
</configuration>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
如果执行mvn verify
它构建一切,启动码头并返回
[INFO] --- maven-failsafe-plugin:2.19:integration-test (integration-test) @ application ---
[INFO] No tests to run.
问题是什么?