I am working on a project with Maven and Surefire plugin v. 2.11.
To run single tests I am using -Dtest=TestClass#testMethod
and -DforkMode=never
(without DforkMode=never
I can't run tests because of lack of space for object heap). I got used to it and it was working for me fine.
So I am running:
mvn -Dtest=TestClass#testMethod test -DforkMode=never
and test is run fine.
But when I am running
mvn -Dtest=TestClass#testMethod -Dmaven.surefire.debug test -DforkMode=never
it just skips debug "waiting" part and the test is being executed (I am unable to connect using IDE).
mvn -Dmaven.surefire.debug test
works for me fine with other project (where I don't need to care about fork mode).
Any ideas why the combination of forkMode=never
and -Dmaven.surefire.debug
doesn't work as expected?