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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…