Javadoc Formatter Plugin

The Javadoc Formatter plugin lets you format project Javadoc comments. The tool lets you generate:

  • Default @author tags to all classes.
  • Comment stubs to classes, fields, and methods.
  • Missing @Override annotations.
  • An XML representation of the Javadoc comments, which can be used by tools in order to index the Javadocs of the project.


To use the plugin, include it in your project’s root pom.xml file:


You can view an example POM containing the Javadoc Formatter configuration here.


The plugin adds one Maven goal to your project:

javadoc-formatter:formatRuns the Liferay Javadoc Formatter to format files.

Available Parameters

You can set the following parameters in the <configuration> section of the POM:

Parameter NameTypeDefault ValueDescription
authorString"Brian Wing Shun Chan"The value of the @author tag to add at class level if missing.
generateXmlbooleanfalseWhether to generate a XML representation of the Javadoc comments. The XML files are generated in the src/main/resources directory only if the Java files are contained in src/main/java.
initializeMissingJavadocsbooleanfalseWhether to add comment stubs at the class, field, and method levels. If false, only the class-level @author is added.
inputDirNameString"./"The root directory to begin searching for Java files to format.
limitsString[][]The Java file name patterns, relative to the working directory, to include when formatting Javadoc comments. The patterns must be specified without the .java file type suffix. If empty, all Java files are formatted.
outputFilePrefixString"javadocs"The file name prefix of the XML representation of the Javadoc comments. If generateXML is false, this property is not used.
updateJavadocsbooleanfalseWhether to fix existing comment blocks by adding missing tags.
« Deployment Helper PluginLang Builder Plugin »
Was this article helpful?
0 out of 0 found this helpful