You can specify an exclusion pattern to -Dtest
option by prefixing it with an !
(exclamation mark). E.g.,
mvn -Dtest=\!FlakyTest* install
Found it in here and verified to be working. E.g., I was able to skip this flaky Jenkins test by using:
mvn -Dtest=\!CronTabTest* package