0%

maven生成javadoc文档出错

maven生成javadoc文档出错

由于写的注释不规范,使用maven-javadoc-plugin插件生成javadoc时会出现报错

1
2
3
4
5
6
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.5.0:jar (attach-javadocs) on project tools-util: MavenReportException: Error while generating Javadoc: 
Exit code: 1
/Users/zhanghe/Desktop/user/myself/GitProject/tools-java/tools-util/src/main/java/com/zhanghe/tools/codec/AesUtils.java:24: 警告: @param 没有说明
* @param content
^

在插件中添加参数<doclint>none</doclint>就不会报错了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!-- Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>

<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<!-- 忽略注释错误 -->
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>

欢迎关注我的其它发布渠道