My project has a few JUnit
tests that I rarely want to run. To do so I put them in a @Category
and then I did this:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Run all but the inject tests -->
<configuration>
<groups>!be.test.InjectTests</groups>
</configuration>
</plugin>
I'd like to override the configuration in the command-line to run the Inject tests like this:
mvn clean install -Dgroups=be.test.InjectTests
But that doesnt work, the -Dgroups gets ignored by Maven.
If I don't put the the command works fine.
groups
is assigned to whatever I pass on the command line, but the relevant@Tag
test is still ignored and not executed – Stereoscope