无法执行目标 org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli): 常量池中的无效字节标记:18

Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli): Invalid byte tag in constant pool: 18

由于我不是 maven 专家,所以我在这里有点迷路。我们的项目因以下错误而失败

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli) on project xxxx: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.7:site failed: Invalid byte tag in constant pool: 18 -> [Help 1]

执行此命令时

mvn site:site site-deploy -e -U

发生这种情况是因为我们切换到 java 8,据我所知,它与 Java 8 and BCEL. However the message in the bug report 有某种关系,但并不完全相同,所以我不确定我必须如何配置或配置什么攻克难关。

这里是关于我们如何在父 pom 中配置站点插件的基本信息:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
<configuration>
    <locales>en</locales>
</configuration>
<dependencies>
    <dependency>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>${wagon.webdav.version}</version>
    </dependency>
</dependencies>

实际上是一个相当愚蠢的错误。问题出在使用过的 clirr 上,它是 2.3

08:26:16 [INFO] <<< clirr-maven-plugin:2.3:clirr < compile @ xxxxx <<<

实际上 clirr 在父 pom 中配置为使用 2.8

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>clirr-maven-plugin</artifactId>
    <version>2.8</version>
</plugin>

但是,在本地 maven 存储库中仍然有一个过时的父 pom,它引用 2.3 而不是 2.8。从本地 repo 中删除父 pom 强制重新下载父 pom,现在我们使用正确的配置