java.lang.NoSuchMethodError:'void org.apache.maven.doxia.sink.Sink.verbatim()'

问题描述 投票:0回答:1

这是我的

pom.xml
运行命令
mvn site

的报告部分
  <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <outputDirectory>target/javadoc</outputDirectory>
                    <reportOutputDirectory>target/javadoc</reportOutputDirectory>
                    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>3.6.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>3.5.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <outputDirectory>target/reports/checkstyle</outputDirectory>
                    <configLocation>google_checks.xml</configLocation>
                    <outputFileFormat>xml</outputFileFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>4.8.6.5</version>
                <configuration>
                    <outputDirectory>target/reports/findbugs</outputDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>11.1.0</version>
                <configuration>
                    <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                    <formats>
                        <format>html</format>
                    </formats>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <tags>
                                    <tag>
                                        <matchString>todo</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.8.0</version>
            </plugin>
        </plugins>
    </reporting>

运行

mvn site
命令时,我面临很多:

An issue has occurred with maven-project-info-reports-plugin:3.8.0:dependency-info report, skipping LinkageError 'void org.apache.maven.doxia.sink.Sink.verbatim()', please report an issue to Maven dev team.
java.lang.NoSuchMethodError: 'void org.apache.maven.doxia.sink.Sink.verbatim()'

通过多个插件观察到此堆栈跟踪。我将使用 [plugin1、plugin2、pluginN],因为堆栈跟踪的其余部分是相同的:

 An issue has occurred with [maven-surefire-report-plugin:3.5.2:report, maven-project-info-reports-plugin:3.8.0:ci-management, maven-project-info-reports-plugin:3.8.0:dependency-info, maven-project-info-reports-plugin:3.8.0:issue-management, maven-project-info-reports-plugin:3.8.0:licenses, maven-project-info-reports-plugin:3.8.0:scm] report, skipping LinkageError 'void org.apache.maven.doxia.sink.Sink.verbatim()', please report an issue to Maven dev team.
java.lang.NoSuchMethodError: 'void org.apache.maven.doxia.sink.Sink.verbatim()'
    at org.apache.maven.reporting.AbstractMavenReportRenderer.verbatimText (AbstractMavenReportRenderer.java:346)
    at org.apache.maven.report.projectinfo.DependencyInformationReport$DependencyInformationRenderer.renderDependencyInfo (DependencyInformationReport.java:217)
    at org.apache.maven.report.projectinfo.DependencyInformationReport$DependencyInformationRenderer.renderMavenDependencyCoordinates (DependencyInformationReport.java:170)
    at org.apache.maven.report.projectinfo.DependencyInformationReport$DependencyInformationRenderer.renderBody (DependencyInformationReport.java:137)
    at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:76)
    at org.apache.maven.report.projectinfo.DependencyInformationReport.executeReport (DependencyInformationReport.java:87)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:358)
    at org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument (ReportDocumentRenderer.java:226)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render (DefaultSiteRenderer.java:348)
    at org.apache.maven.plugins.site.render.SiteMojo.renderLocale (SiteMojo.java:194)
    at org.apache.maven.plugins.site.render.SiteMojo.execute (SiteMojo.java:143)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)

我尝试更改站点插件的版本、java jdk 版本、maven,但没有运气,总是得到这个。

还提到“请向 Maven 开发团队报告问题”,但无法打开 GitHub 问题,或发送邮件。

请问如何解决这个问题?

maven maven-3 maven-plugin maven-site-plugin
1个回答
0
投票

我在 Maven 项目信息报告插件上提交了一个错误,这对我来说是问题的根源,但我被告知修复方法是更新站点插件。

https://issues.apache.org/jira/browse/MPIR-471

您可以尝试一下这个方法,看看它是否也解决了您的问题: 添加到 POM 中

<plugins>
部分的
<build>
子部分。

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-site-plugin</artifactId>
 <version>3.21.0</version>
</plugin>
© www.soinside.com 2019 - 2024. All rights reserved.