Search code examples
javamavenjavadocmaven-javadoc-plugin

Maven: how configure javadoc to generate all the private and package too


I am working with Maven 3.6.3, for a project based in one module, about the generation of the javadoc in the pom.xml file I have:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven.javadoc.plugin.version}</version>
        <configuration>
            <source>${jdk.version}</source>
        </configuration>
    </plugin>

Where maven.javadoc.plugin.version is 3.2.0.

The plugin works how is expected:

  • it generates by default all the public and protected methods and classes

Now, for developing purposes I need include all about the private and package (methods, classes) too. What is the correct extra configuration?. It is possible in Gradle, so I am assuming it is possible in Maven too.


Solution

  • Add

    <show>private</show>
    

    to your <configuration/>.