如何解决正确的maven-javadoc-plugin 3.2.0配置以生成所有子模块的根javadoc
对于单个模块,我可以做到以下几点:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<show>private</show>
</configuration>
</plugin>
</plugins>
</build>
在具有与上述相同配置的 multi 模块项目的其他工作区中,但是为每个模块生成了Javadoc。
我需要的全部都合并到了根项目中。我读了以下内容:
- Aggregating Javadocs For Multi-Projects(
Version: 3.2.0
-Last Published: 2020-03-12
)
因此我添加了:
<reportSets>
<reportSet>
<id>aggregate</id>
<inherited>false</inherited>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
观察是强制性的,将插件从<build>
移至<reporting>
,否则会出现错误
因此:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<source>1.8.</source>
<target>1.8</target>
<show>private</show>
</configuration>
<reportSets>
<reportSet>
<id>aggregate</id>
<inherited>false</inherited>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
但是,发生的行为与单个模块相同。
那么如何完成我的请求?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。