I just installed the plugin m2e for the first time on Eclipse.
I wrote a simple JUnit (version 4) test. I can run it from Eclipse, but not from the pom.xml (alt-clic
Add this to your pom.xml
<project>
[...]
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
[...]
</project>
run maven with clean test
you can run Junit 4 with Maven. You just need the Junit 4 dependency in your pom. You also need the surefire plugin to execute the tests.
See: http://maven.apache.org/plugins/maven-surefire-plugin/
Hint: By default surefire looks for files with *Test.java
naming to find tests.