1

I have a multi-module maven project and I am wanting to aggregate a javadoc that combines all the methods (public and private) into a whole javadoc. It seems simple, I am following the instructions here: https://maven.apache.org/plugins/maven-javadoc-plugin/examples/aggregate.html

And I am combining that with the configuration/show/private set up:

...
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.1</version>
                <reportSets>
                    <reportSet>
                        <id>aggregate</id>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <show>private</show>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

And then I run mvn clean javadoc:aggregate javadoc:aggregate-jar

But, the resulting javadoc only contains my public methods.

I am trying to keep things as simple as possible. I have specified <show>private</show> and it isn't working. I highly doubt this is a bug because something like this would have been found long before v3.x however I think the instructions for how to properly show private in multi-module maven set ups may not be full?

I have tried many variations, putting the configuration instructions in different areas or putting the maven-javadoc-plugin declaration in the build section, reporting section, etc. Nothing is producing my private javadoc methods.

E.S.
  • 2,733
  • 6
  • 36
  • 71
  • Does it work for individual modules and the non-aggregate `javadoc` goal? – Rob Spoor Feb 03 '22 at 19:18
  • @RobSpoor - actually yes. Since posting this, I got the individual modules to show private javadoc, but not the full aggregate. – E.S. Feb 03 '22 at 22:14
  • 1
    Then this could very well be a bug that nobody found yet. The plugin is not flawless; I found another bug in version 3.3.0 and up that duplicates classes in the overview list for Java 8. I'd check https://issues.apache.org/jira/projects/MNG/issues/ to see if there's already an issue reported about this. – Rob Spoor Feb 04 '22 at 08:22

0 Answers0