A newbie question on Maven - Surefire - Eclipse - JUnit
I have configured the maven-surefire-plugin in the pom file of my project to pass some additional JVM argumen
Eclipse JUnit Launcher (choose Run As -> JUnit Test
) is a independent test runner which has its own pre-defined build and running life cycle and has nothing to do with Maven, it will not pick up your pom magically and read in the surefire configuration and use them to drive the test running.
If your project is imported as an existing Maven project, use Maven (choose Run as -> Maven test
) launch your JUnit test which will pick up and use the surefire configuration. This is exactly same as running mvn test
from commandline, it only output run log in console and you will not able to use the nice red & green JUnit UI window.
Hope this make sense.