I had the same problem, but with gradle.
I fixed it by enabling "Debug all Gradle tasks on the execution graph" in the Run Options config.
There might be a similar option when running Maven tasks?