【问题标题】:Java - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2 (or 2.12.4 or 2.16):testJava - 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.7.2 (or 2.12.4 or 2.16):test
【发布时间】:2014-02-26 14:46:17
【问题描述】:

我正在尝试使用Maven-3.0.4jdk 1.6.0_45 构建应用程序。为了成功构建应用程序,我需要执行六项任务,其中三项成功,第四项反复失败。

任务(连同状态)是:-

[INFO] Eureka! Clinical Analytics ........................ SUCCESS [15.788s]
[INFO] Eureka Common ..................................... SUCCESS [4:45.548s]
[INFO] Eureka WebApp ..................................... SUCCESS [6:46.893s]
[INFO] Eureka Services ................................... FAILURE [8:59.532s]
[INFO] Eureka Protempa ETL ............................... SKIPPED
[INFO] Eureka EAR ........................................ SKIPPED

它需要 'maven-surefire-pluginin order to succeed at theEureka Services` 任务,因为要完成某些测试。

我尝试过使用maven-surefire-plugin:2.7.2\2.12.4\2.16版本的插件,但错误总是一样的,如下:-

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2 (or 2.12.4 or 2.16):test (default-test) on project eureka-services: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/user/eureka-1.8.2/eureka-services/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command

我现在不明白该怎么做。请指教。

注意:- 我是在终端上做的,因为我对 Eclipse 了解不多。

【问题讨论】:

  • 查看 /home/user/eureka-1.8.2/eureka-services/target/surefire-reports 以获取各个测试结果。
  • 我有,但我不知道我要寻找什么。
  • 可能有测试失败。测试结果在指定目录中。
  • 在您给出的输出之前,必须有一行说明哪些测试失败或错误。然后在surefire-reports 目录中,您将找到每个测试类的文本文件,其中包含详细的测试输出
  • @Gorkk 是的,就是这样。

标签: java maven


【解决方案1】:

你必须解决 Eureka Services 包的测试。

您可以在 /home/user/eureka-1.8.2/eureka-services/target/surefire-reports 找到日志。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-08
    • 2016-07-25
    • 1970-01-01
    相关资源
    最近更新 更多