I intend on annotating some of my JUnit4 tests with an @Category annotation. I would then like to exclude that category of tests from running on my Maven builds.
I see from the Maven documentation that it is possible to specify a category of tests to run. I want to know how to specify a category of tests not to run.
Thanks!
You can do this as follows:
Your pom.xml should contain the following setup.
If you want regex support just use
http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
If you want to use Category annotation, you need to do the following:
In your maven configuration, you can have something like this