Java 无法在项目 smrr 上执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test): There are test failures

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25757539/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 01:04:27  来源:igfitidea点击:

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project smrr: There are test failures

javanetbeans-7maven-plugin

提问by Arr

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test) on project smrr: There are test failures.

Please refer to C:\Users\root\Downloads\smrr\target\surefire-reports for the individual test results. -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionCheck Maven network proxy...

====================================

无法在项目 smrr 上执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test (default-test): There are test failures。

请参阅 C:\Users\root\Downloads\smrr\target\surefire-reports 以获取个别测试结果。-> [帮助 1]

要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行 Maven。使用 -X 开关重新运行 Maven 以启用完整的调试日志记录。

有关错误和可能的解决方案的更多信息,请阅读以下文章: [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException检查 Maven 网络代理...

====================================

Anyone please solve this problem ?

有人请解决这个问题吗?

采纳答案by Pavan

Maven will try to install this plugin along with dependencies first time in .m2/repository folder, due proxy issues dependencies failing to download. so, Update the Maven project:

Maven 将尝试在 .m2/repository 文件夹中首次安装此插件和依赖项,因为代理问题依赖项无法下载。因此,更新 Maven 项目:

Steps:

脚步:

Right-click on "project" Go to "Maven" >> "Update" Wait for all the changes to be applied Commit the changes (if code is on repo) Run

右键单击“项目”转到“Maven”>>“更新”等待应用所有更改提交更改(如果代码在repo上)运行

Also check the artifactid, groupid, version of plugins along with dependencies.

还要检查 artifactid、groupid、插件版本以及依赖项。

回答by Srikar

I too got this error when I was running mvn test -Dtest=. This error occurred because name of the testclasswas incorrect. Once I fixed the name of the test class this error was fixed.

我在运行mvn test -Dtest=时也遇到了这个错误。出现此错误,因为名称识别TestClass是不正确的。一旦我修复了测试类的名称,这个错误就被修复了。

I feel this error occurs when the argument for -Dtest has no test cases to run.

我觉得当 -Dtest 的参数没有要运行的测试用例时会发生此错误。

I hope this helps you..

我希望这可以帮助你..