Introduction
Maven is a management tool for managing Java projects. It makes the task of creating documentation for a project, adding plugins and dependencies for a project, and version control for a Java project simple, fast and clean.
It is based on the concept of a Project Object Model (POM), which is an XML file holding all the information about the configuration details, plugin details, and goals of a project. Creating documentation for an API (Application Programming Interface) is important but the task of creating the documentation is a boring and tedious job.
To make this task easier every latest version of JDK (Java Development Kit) has an inbuilt tool name Javadoc that can be used to generate Java API documentation from the comments present in the Java code. This functionality of JDK can be used from the command line also, but Maven’s Javadoc plugin functionality makes the task of using Javadoc much easier and error-free.

In this article, we will discuss how to use the Javadoc plugin in Maven. We will also discuss how to disable this plugin.
What is Javadoc?
Javadoc is a Java tool in all the latest versions of JDK (Java Development Kit). It generates the documentation for a Java API in the form of an HTML page. It takes the comments in the Java code and creates an HTML document.
The comments should be written in the same manner as the multi-line comments, but the only difference is that there should be an extra ‘*’ (asterisk) sign at the start.
Example -
/* Comment line 1
* Comment line 2
*/
The above lines of comment are regular comments.
/** Comment line 1
Comment line 2
*/
In the above lines of comments, you can see that there is an extra ‘*’ sign, this extra ‘*’ sign makes it a Javadoc-style comment.
Now that we have understood what Javadoc is, let’s understand how Maven uses this Javadoc tool to generate documentation.