This tutorial guides you using the javadoc-template plugin.
The javadoc-template plugin offers templates for writing and using javadoc documents.
It offers templates for writing following javadoc documents:
Using the javadoc-template plugin helps you to have a consistent javadoc documentation within your project, and across your various projects.
The wizard page for selecting a javadoc template looks like the screen shot below:
Create an overview document for your java documentation.
Using the created overview file, configure javadoc to use the created overview file. If you have created an overview documentation, you have to tell javadoc to use your overview document. In Ant's build.xml augment the javadoc task by specifying the overview file, like:
<javadoc...
overview="${path-to-overview}/overview.html"...
>
Alternatively specify in your project Properties|Documenting the overview document in the field Additional javadoc options, like:
-overview=${basedir}/${src.dir}/overview.html
The javadoc tool accepts files named package.html automatically as package documentation. Thus no extra configuration is necessary for including the package documentation in the javadoc generated html pages.
Create an stylesheet document for your java documentation.
If you have created a javadoc style sheet, you have to tell javadoc to use your style sheet file. In Ant's build.xml augment the javadoc task by specifying the style sheet file, like:
<javadoc...
stylesheetfile="${path-to-javadoc-style sheet}/javadoc.css"
...
>
Alternatively specify in your project Properties|Documenting the style sheet file in the field Additional javadoc options, like:
-stylesheetfile=${basedir}/${src.dir}/stylesheet.css
Don't forget to exclude the javadoc files from copying into the build directory. Simply add them to field Exclude From Jar File in the project properties dialog Build|Packaging, like:
**/*.java,**/*.form,**/package.html,overview.html,javadoc.css
After running javadoc your java documentation has:
The package documentation looks like:
The class documentation looks like:
| javadoc-template-new.gif | ![]() |
15680 bytes |
| javadoc-templates-result-2.gif | ![]() |
16179 bytes |
| javadoc-templates-result.gif | ![]() |
17911 bytes |