Fixing Javadoc Comments

When developers write code, they could forget to create (or update) the Javadoc comments. The fix and test-fix goals are interactive goals (i.e. used generally in command line) to fix the actual Javadoc comments in your classes.

Important Note: Since the changes are done directly in the source code, we recommend strongly the use of a SCM, so you could always do a revert if a problem occurs. You could always add -DoutputDirectory=/path/to/dir to specify a target directory where classes will be generated.

Features Summary

The user could skip the class/field/method Javadoc fixing using specific parameters, i.e. <fixClassComment/>. Also, the user could specify a <level/>, i.e. public, to fix only class/field/method with the given level.

These goals could fix dynamically all Javadoc tags (by default, see <fixTags/>) or selective tags like author, version... Also, the user could specify default value for some tags, i.e. <defaultAuthor/>.

The javadoc:fix goal could use Clirr ( via the clirr-maven-plugin, a tool that checks Java libraries for binary and source compatibility with older releases. So, the @since tags will be dynamically added for the current project version. You need to add the comparisonVersion parameter (see below).

Finally, the user could process specific Java files using the includes/excludes parameters.

Current limitations

The fix and test-fix goals use intensively Qdox to extract class/interface/method Javadoc from source files. Unfortunately, Qdox has some known issues.

Using Clirr Integration

Note: a previous artifact should be deployed firstly.

Comparing against a specific version

By default, the goals compare the current code against the latest released version, which is lower than the current version. If you want to use another version, you need to specify it similar to the Maven Clirr Plugin: