maven-javadoc-plugin 3.X版本 javadoc 检查报错

  Maven默认的javadoc插件都会进行格式校验,正常情况下,很容易报错(MavenReportException: Error while generating Javadoc:),需要禁用其对应的格式检查。网上很多内容都写需要配置additionalparam参数为Xdoclint:none,但是其实3.X的插件参数名称已经发生了变化。

additionalparam需要替换成additionalJOption

也即是:

           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <aggregate>true</aggregate>
                    <charset>UTF-8</charset>
                    <docencoding>UTF-8</docencoding>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                          <!-- <additionalparam>-Xdoclint:none</additionalparam>  -->
                          <additionalJOption>-Xdoclint:none</additionalJOption>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
    原文作者:至南易
    原文地址: https://www.jianshu.com/p/3e40d3b4a39c
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞