Jan-Olav wrote:
>
> Still struggling with this.... The configuration below runs all my tests
> in both phases. Nothing is exluded or included :-( As far as I can see,
> this config is the same as the one recommended on
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion
> -exclusion.html, where inclusion and exclusion patterns are reversed in
> the two phases. Any insight greatly appreciated.
>
>
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <executions>
> <execution>
> <id>integration-test</id>
> <phase>integration-test</phase>
> <configuration>
> <excludes>
> <exclude>**/Test*.java</exclude>
> </excludes>
> <includes>
> <include>
> **/TestIntegration.java
> </include>
> </includes>
> </configuration>
> </execution>
> <execution>
> <id>test</id>
> <phase>test</phase>
> <configuration>
> <includes>
> <include>**/Test*.java</include>
> </includes>
> <excludes>
> <exclude>
> **/TestIntegration.java
> </exclude>
> </excludes>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
Good day to you, Jan-Olav,
For the first execution, try removing the <excludes> part. I think
What are the tests you are tryiing to include and excludes? I think surefire
plugin processes the includes first, and the excludes second. if so, you
would have excluded **/TestIntegration.java as well.
As for the second one. If you only want to run Test.java, you can simply do
<includes>
<include>**/Test.java</include>
</includes>
And remove the exclude as well :-)
Cheers,
Franz
--
View this message in context:
http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7069340
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]