Maven的故障安全插件失败,“无法找到万无一失的,足球运动员”(Maven failsafe pl

2019-09-20 17:57发布

我们的Maven构建在詹金斯突然失败截至8月2日。 我们无法解释为什么行家故障安全不能访问它的依赖“足球运动员”插件。

有没有人看到了同样的事情?

[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)

Answer 1:

该问题仅限于Maven的故障安全2.12.1该目录从Apache回购上市显示被释放后8月1日。

解决方法是在你的POM解决您的版本到earier 2.12或者你可能也想尝试更高版本,如2.12.2或2.12.3(其发布日期这个答案)。 我还没有尝试过这些更高版本以及“2.12”是为我工作的版本字符串。

只需添加在插件的POM宣布获选的版本。

这大概是因为作品只有2.12.1有问题(这是确诊,AFAICT)



Answer 2:

我跑进使用Maven 2.切换到Maven 3解决了我的问题,这一问题。 还增加了Maven的万无一失,插件西蒙的回答与Maven 2的工作。



文章来源: Maven failsafe plugin fails with “Unable to locate surefire-booter”