【问题标题】:Issue is using test maven, this error is displayed Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)问题是使用测试 maven,显示此错误 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)
【发布时间】:2019-10-30 06:12:38
【问题描述】:

当我尝试测试或安装我的 pom.xml 时,我收到了以下错误消息:

未能执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (默认测试)

我想说明没有任何帮助 Mvn clean、Update project、Clean 或我能做的与 maven 相关的任何其他事情,任何人都可以帮助我提出真正有助于解决问题的其他想法吗?

谢谢

【问题讨论】:

  • 您能否发布完整的错误输出以及您如何调用 Maven?
  • 我正在使用 Run As -> Maven install/test 测试运行:0,失败:0,错误:0,跳过:0 [INFO] BUILD FAILURE [INFO] 总时间:01:14 分钟[INFO] 完成于:2019-06-17T08:21:24+03:00 [错误] 未能执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)在项目 [] 上:执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test 的默认测试失败:分叉的 VM 在没有正确告别的情况下终止。 VM 崩溃或 System.exit 调用? -> [帮助 1]

标签: java maven selenium-webdriver


【解决方案1】:

如果以下信息对您有帮助,请告诉我!

  • 试用最新稳定版的surefire-plugin (2.22.2)
  • 其他选项可能是内存管理
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
   <version>2.21.0</version>
  <configuration>
  <testFailureIgnore>true</testFailureIgnore>
    <reuseForks>true</reuseForks>
    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
  </configuration>
</plugin>

【讨论】:

  • 非常感谢您的回答,但对我不起作用,同样的错误
  • 可以提供 pom.xml 吗?
  • POM 包含的字符太多我无法放入评论中
  • pom.xml 和 TestNG.xml 都会很有用。我认为它也与 testNG xml 有关,所以只想交叉检查。
  • docs.google.com/document/d/… [] 仅用于删除重要信息
猜你喜欢
  • 1970-01-01
  • 2017-01-23
  • 2015-07-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-11-20
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多