2

这就是我想要做的:

[...]
<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。这里有什么问题?

4

2 回答 2

2

更多作为自我说明:;-)

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

空的排除不起作用。

于 2011-07-19T09:34:56.627 回答
1

查看如何在同一个项目中进行集成测试和测试。

http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing

我的偏好是maven-failsafe-plugin

于 2010-12-03T07:25:49.850 回答