控制台中运行mvn clean test提示
build success
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
但是在eclipse中run as maven build ,输入goals:clean test,点击OK,运行出错
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ helloworld ---
[WARNING] The POM for org.apache.maven.surefire:surefire-booter:jar:2.7.1 is missing, no dependency information available
[WARNING] The POM for org.apache.maven.surefire:maven-surefire-common:jar:2.7.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.875s
[INFO] Finished at: Thu Sep 06 23:16:52 CST 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test) on project helloworld: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.7.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:surefire-booter:jar:2.7.1, org.apache.maven.surefire:maven-surefire-common:jar:2.7.1: Failure to find org.apache.maven.surefire:surefire-booter:jar:2.7.1 in http://maven.xx.cn/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
[ERROR]
而且控制台和eclipse里面运行的时候提示都不同,version和platform encoding,如图:
[img]http://dl.iteye.com/upload/attachment/0073/4547/e7ff9062-1121-3f4b-8104-0471e2981e43.png[/img]
[img]http://dl.iteye.com/upload/attachment/0073/4549/5b040283-68a1-3d86-af83-0ea9f80dd54f.png[/img]
求指点!