Question

This is what I'm trying to do:

[...]
<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>

My custom <execution> has to run all JSF-related tests in the container. Unfortunately it doesn't find any tests. Looks like <includes> doesn't work. While <excludes> effectively exclude these tests during phase test. What's wrong here?

Was it helpful?

Solution

Check this out on how to do both integration testing and testing in the same project.

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

My preference is the maven-failsafe-plugin

OTHER TIPS

More as a note to self: ;-)

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

An empty excludes doesn't work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top