我主要使用本教程配置了Maven和Junit:http: //maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
我有一个测试类,当我执行"mvn test"时,这个测试类被Maven捕获,但是Maven没有检查它(结果应该是FAIL).
C:\Users\User\git\example\example>mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building passport 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ passport -
--
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ passport ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pa
ssport ---
[WARNING] Using platform …Run Code Online (Sandbox Code Playgroud)