【发布时间】:2016-12-02 23:55:52
【问题描述】:
我有一个多模块项目。在父 pom(不是聚合器 POM)中,我使用的是maven-javadoc-plugin。它有两次执行,都在package 阶段,一次用于jar 目标,一次用于aggregate-jar 目标。
这很好地生成了构建中所有(非测试)类的完整聚合 Javadoc jar。
我需要做的是生成 两个 Javadoc jar,其中一个与现在生成的完全相同,但另一个涵盖一组有限的模块,并且可能不包括特定的包或类。
我认为这可能需要添加两个“执行”元素,都用于“聚合罐”任务,但具有不同的配置值。这似乎没有做任何事情。它只是为“所有”类生成了一个 Javadoc 树。我该如何完成这项工作?
这是我的尝试:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>module-javadoc-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<show>protected</show>
<detectLinks>true</detectLinks>
</configuration>
</execution>
<execution>
<id>aggregated-documentation-all</id>
<phase>package</phase>
<inherited>false</inherited>
<goals>
<goal>aggregate-jar</goal>
</goals>
<configuration>
<sourcepath>
../something-api:
../something-impl:
../something-else-api:
../something-else-impl:
</sourcepath>
<destDir>all</destDir>
<finalName>all</finalName>
<show>protected</show>
<detectLinks>true</detectLinks>
</configuration>
</execution>
<execution>
<id>aggregated-documentation-interface</id>
<phase>package</phase>
<inherited>false</inherited>
<goals>
<goal>aggregate-jar</goal>
</goals>
<configuration>
<sourcepath>
../something-api:
../something-else-api:
</sourcepath>
<destDir>interface</destDir>
<finalName>interface</finalName>
<show>protected</show>
<detectLinks>true</detectLinks>
</configuration>
</execution>
</executions>
</plugin>
【问题讨论】:
标签: maven javadoc maven-javadoc-plugin