java - 如何将 maven-surefire-plugin 执行拆分为两个单独的执行?

标签 java maven surefire

这就是我正在尝试做的事情:

[...]
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.5</version>
  <configuration>
    <excludes>
      <exclude>**/*JSFTest.java</exclude>
    </excludes>
    <executions>
      <execution>
        <phase>integration-test</phase>
        <goals>
          <goal>test</goal>
        </goals>
        <configuration>
          <excludes>
            <!-- intentionally empty to override configuration above -->
          </excludes>
          <includes>
            <include>**/*JSFTest.java</include>
          </includes>
        </configuration>
      </execution>
    </executions>
  </plugin>

我的定制<execution>必须在容器中运行所有与 JSF 相关的测试。不幸的是它没有找到任何测试。看起来像<includes>不起作用。而<excludes>在阶段有效地排除这些测试 test 。这里出了什么问题?

最佳答案

更多作为 self 注释:;-)

<excludes>
    <exclude>none</exclude>
<excludes>

空的排除不起作用。

关于java - 如何将 maven-surefire-plugin 执行拆分为两个单独的执行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4343167/

相关文章:

Java BufferedWriter 关闭()

java - Cucumber Java - ExtentReports - 不兼容的类更改错误 : Implementing class

java - 无法将属性从 Maven 配置文件传递到 Maven 故障安全插件

java - Surefire 按顺序运行某些测试,并行运行其他测试

Java:正则表达式识别句子中的标点符号并删除它们

java - jetty guice 非法访问错误

java - edittext 中的输入文本恢复为可扩展 ListView 中的预设文本

java - 向 JAXB 生成的 POJO 添加解码方法

maven - 在 Surefire Maven 插件中 fork : is it safe to use forking?

java - JUnit 测试在 Eclipse 中通过但在 Maven Surefire 中失败