Project documentation in Maven

We know that javadoc tool can be used to create the documentation for a project. Maven provides one plugin that can be used to create project documentation using javadoc tool. You need to use below section in POM.xml to use maven javadoc plugin.
 
<build>
<plugins>
 <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-javadoc-plugin</artifactId>
     <version>2.10.4</version>
 </plugin>
</plugins>
</build>
Then you can invoke below maven goal to generate the Java API documentation for your project.

mvn javadoc:javadoc

After this goal is executed, documentation is generated under target/site/apidocs directory.
Complex problems, Simple Solutions