1.Javadoc打包部署
1.1 javadoc插件配置如下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>install</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<charset>UTF-8</charset>
</configuration>
<show>private</show>
</plugin>
1.2 jdk1.7和jdk1.8
1.2.1 jdk1.7一下使用maven的javadoc插件執(zhí)行 javadoc:jar deploy 即可巍膘。
1.2.2 jdk1.8對(duì)javadoc的要求比較嚴(yán)格汇在,注釋必須是按照一定要求編寫,不符合規(guī)則會(huì)報(bào)錯(cuò)和警告蓖墅,可能導(dǎo)致生成javadoc失敗桐磁,解決思路如下:
- 【推薦】根據(jù)提示更改注釋士复,到符合jdk8的要求
- 更改插件配置炭懊,使其忽略jdk8對(duì)javadoc的標(biāo)準(zhǔn)要求,配置如下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>install</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<charset>UTF-8</charset>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
<show>private</show>
</configuration>
</plugin>
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者