Skip to content

Discovering Source Files

Ryan Heaton edited this page May 26, 2016 · 24 revisions

Discovering Source Files

When compiling documentation, Enunciate has to be selective about which Java source files to include in the compilation. If Enunciate included every source file found on the sourcepath, the compilation would fail more often than not because the sourcepath often includes files that reference classes that aren't on the classpath.

Source files that are to be compiled in the current project will always be included in the Enunciate compilation. However, Enunciate needs to be explicitly configured to include source files of classes that have already been compiled.

This is done using the api-classes configuration element:

<enunciate ...>
  ...
  <api-classes>
    <exclude pattern="com.mycompany.hide.**"/>
    <include pattern="com.mycompany.hide.ExceptThisClass"/>
    <exclude pattern="com.mycompany.api.MyClass"/>
  </api-classes>
  ...
</enunciate>

Note that this api-classes configuration element is also used to include/exclude aspects of the generated documentation. For more information, see Excluding Including Classes.

Clone this wiki locally