2

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.

Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158

1 Answers1

3

Add

<show>private</show>

to your <configuration/>.

Allen D. Ball
  • 1,916
  • 1
  • 9
  • 16
  • What about for non-exported packages in a single-module project? I tried `private` but it still only shows packages that have been exported in module-info.java. – UrbenLegend Aug 11 '20 at 02:05
  • I don't have direct experience yet (I'm in the process of migrating my Taglet library) but it looks like the `--show-types` replaces `--show` and `--show-module-contents` and `--show-packages` have been added. Likely add `--show-module-contents all` and `--show-packages all` as arguments to javadoc with ``. – Allen D. Ball Aug 11 '20 at 02:16
  • I tried `--show-module-contents all --show-packages all --show-types private` but it is still not showing non-exported packages. I also tried with `` which gave me a syntax error. Do let me know if you ever get a chance to mess around with it a little bit more. I am at my wits end with trying to generate Javadocs for my module. I don't think I should have to export all my packages out just to get Javadocs. – UrbenLegend Aug 11 '20 at 03:54