maven-surefire-report-plugin 2.8错误:org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown

发布于 2024-10-22 04:37:53 字数 5172 浏览 4 评论 0原文

自从我将 maven-surefire-report-plugin 更新到版本 2.8 后,我的项目在执行 mvn site:site 期间开始失败,该版本只是 大约一周前发布

这是例外情况:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown(Ljava/lang/String;[Ljava/lang/Object;Lorg/apache/maven/doxia/sink/SinkEventAttributes;)V
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AbstractMethodError: org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown(Ljava/lang/String;[Ljava/lang/Object;Lorg/apache/maven/doxia/sink/SinkEventAttributes;)V
    at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:76)
    at org.apache.maven.plugins.surefire.report.SurefireReportMojo.executeReport(SurefireReportMojo.java:200)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:144)
    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 hudson.maven.agent.ComponentInterceptor.invoke(ComponentInterceptor.java:47)
    at hudson.maven.agent.PluginManagerInterceptor$3.invoke(PluginManagerInterceptor.java:229)
    at $Proxy7.generate(Unknown Source)
    at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
    at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
    at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    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.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
    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 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 hudson.maven.agent.Main.launch(Main.java:165)
    at hudson.maven.MavenBuilder.call(MavenBuilder.java:165)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:744)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688)
    at hudson.remoting.UserRequest.perform(UserRequest.java:114)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:270)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

这是我的 pom 文件的相关部分:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-report-plugin</artifactId>
  <version>2.8/version>
  <configuration>
    <argLine>-Xmx512m</argLine>
  </configuration>
</plugin>

切换回版本 2.7.2 结果没有错误。有人知道更多吗?谢谢。

My project started to fail during the execution of mvn site:site since I updated the maven-surefire-report-plugin to version 2.8, which was just released a week or so ago.

Here is the exception:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown(Ljava/lang/String;[Ljava/lang/Object;Lorg/apache/maven/doxia/sink/SinkEventAttributes;)V
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AbstractMethodError: org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown(Ljava/lang/String;[Ljava/lang/Object;Lorg/apache/maven/doxia/sink/SinkEventAttributes;)V
    at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:76)
    at org.apache.maven.plugins.surefire.report.SurefireReportMojo.executeReport(SurefireReportMojo.java:200)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
    at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:144)
    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 hudson.maven.agent.ComponentInterceptor.invoke(ComponentInterceptor.java:47)
    at hudson.maven.agent.PluginManagerInterceptor$3.invoke(PluginManagerInterceptor.java:229)
    at $Proxy7.generate(Unknown Source)
    at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
    at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
    at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    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.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
    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 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 hudson.maven.agent.Main.launch(Main.java:165)
    at hudson.maven.MavenBuilder.call(MavenBuilder.java:165)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:744)
    at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688)
    at hudson.remoting.UserRequest.perform(UserRequest.java:114)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:270)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

Here is the relevant section of my pom file:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-report-plugin</artifactId>
  <version>2.8/version>
  <configuration>
    <argLine>-Xmx512m</argLine>
  </configuration>
</plugin>

Switching back to version 2.7.2 results in no error. Anyone knows more about this? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清醇 2024-10-29 04:37:53

来自 http://jira.codehaus.org/browse/SUREFIRE-714

可以看出
http://maven.apache.org/plugins/maven-surefire-report-插件/

“注意:从版本 2.8 开始此插件
需要 Maven 站点插件 2.1 或
更高才能正常工作。版本2.7.2
和更旧的仍然兼容
新的 Surefire 版本,所以混合是
有可能。”

出于所有实际目的,您可以
只要您愿意,就可以继续使用 2.7.2,
由于 xml 格式用于
交换将保持落后
兼容(较新的 Surefire 版本
可以使用旧的
Surefire-报告-插件)。你会的,
当然,会错过错误修复
如果您选择不升级,请报告
报告插件/网站。

如果您的 pom 中没有提到 maven-site-plugin,它将不会提取最新版本。按照 http://maven.apache.org/ 中的指定添加它插件/maven-site-plugin/plugin-info.html

From http://jira.codehaus.org/browse/SUREFIRE-714

As can be seen from
http://maven.apache.org/plugins/maven-surefire-report-plugin/

"Note: As of version 2.8 this plugin
requires Maven Site Plugin 2.1 or
higher to work properly. Version 2.7.2
and older are still compatible with
newer surefire versions, so mixing is
possible."

For all practical purposes you can
stay on 2.7.2 as long as you want,
since the xml format used for
interchange will stay backward
compatible (newer surefire versions
can use older
surefire-report-plugins). You will, of
course, be missing out on bugfixes in
reporting if you choose to not upgrade
reporting-plugin/site.

If you don't have the maven-site-plugin mentioned in your pom it won't pull in the latest version. Add it as specified in http://maven.apache.org/plugins/maven-site-plugin/plugin-info.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文