I'm using Eclipse Oxygen for Java developers on Mac OS. I have imported my Maven projects into the IDE. Normally, at the command line, when I run a test, I'll run something like
mvn test -Dtest=UserServiceTest
In addition to running the "test" goal, this will also execute some custom code I have in the "process-resources" and "test-compile" goals. However, when I run my test in the Eclipse IDE (by right clicking on the class name in the package explorer, selecting "Run" and then selecting "JUnit Test"), I notice these other goals aren't run.
Is there a way to globally set up my project so that when I run a JUnit test, it automatically behaves like typing the command above? I realize I could individually edit the run configuration for each test, but since I have hundreds, this would take a lot of work and I'd have to do it each time I crated a new test. It would be great if there were some global way to set up Eclipse to do ti for me.