我试图将 src/test/java 的一些 .java 文件排除在 Maven 构建中。我的 pom.xml 是:
plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<configuration>
< test Excludes >
<exclude>**/Test1.java</exclude>
<exclude>**/Test2.java</exclude>
<exclude>**/Test3.java</exclude>
<exclude>**/Test4.java</exclude>
<exclude>**/Test5.java</exclude>
</testExcludes>
</configuration>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
enter code here
但是当我试图运行从构建中排除的测试类时,会给出 ClassNotFoundException。
请指导我..