Search code examples
mavenmaven-javadoc-plugin

Maven javadoc plugin: is it possible to show private selectively for certain packages


I am interested in showing private members in javadoc for only certain packages. For the all other packages only show public and protected members in javadoc. The show tag is for configuration, but not for the group.

Thank You


Solution

  • According to Apache Maven Javadoc Plugin it uses javadoc - The Java API Documentation Generator. I'm not aware of an option in javadoc for changing access modifiers for indivdual packages with the standard doclet. You could write your own doclet, of course.

    I can also imagine the following hack:

    • create a "main" JavaDoc with a certain access modifier and assign the desired packages
    • create a second JavaDoc with a different access modifier and assign the desired packages
    • create a third ...
      Now the hacker's part:
    • merge the second JavaDocs' allclasses-[frame|noframe].html (All Classes) into main's allclasses-[frame|noframe].html
    • merge the second JavaDocs' overview-frame.html (Packages) into main's overview-frame.html
    • merge the third ...
    • merge the third ...