本文介绍了Maven故障安全插件失败,并显示“无法找到surefire-booter".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自8月2日起,我们的Maven版本在詹金斯(Jenkins)突然失败.我们无法解释为什么Maven故障保护无法访问其依赖的启动程序"插件.

Our Maven build is suddenly failing in Jenkins as of August 2nd. We cannot explain why maven failsafe cannot access it's dependent "booter" plugin.

有人见过同样的东西吗?

Has anyone seen the same thing?

[INFO] [failsafe:integration-test {execution: run-integration-tests}]
[INFO] Failsafe report directory: /var/lib/jenkins/workspace/Foo/integration-tests/target/failsafe-reports
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to locate surefire-booter in the list of plugin artifacts
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException: Unable to locate surefire-booter in the list of plugin artifacts
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration(AbstractSurefireMojo.java:1152)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:655)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:647)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:606)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:569)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

推荐答案

问题仅限于Maven Failsafe 2.12.1,而来自Apache存储库显示的目录列表已于8月1日发布.

The problem is confined to Maven Failsafe 2.12.1 which a directory listing from the Apache repo shows was released late on August 1st.

解决方法是将您的POM中的版本修复为较早的2.12,或者您可能还想尝试更高的版本,例如2.12.2或2.12.3(将其发布于此答案之后).我没有尝试过这些更高版本,"2.12"是对我有用的版本字符串.

The workaround is to fix your version in your POM to the earier 2.12 or you might also want to try later versions such as 2.12.2 or 2.12.3 (which post date this answer). I have not tried these later versions and "2.12" is the version string that worked for me.

只需添加所选版本,即可在POM中声明插件.

Just add chosen version where the plugin is declared in the POM.

之所以可行,是因为只有2.12.1出现了问题(AFAICT,这是未经诊断的)

Presumably this works because only 2.12.1 has the problem (which is undiagnosed, AFAICT)

这篇关于Maven故障安全插件失败,并显示“无法找到surefire-booter".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 21:47