The Javadoc Plugin generates javadocs using the Javadoc tool. The following examples describe the basic usage of the Plugin.
To generate javadocs as part of the site generation, you must configure the following in the <reporting> section of your pom:
<project> ... <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> </plugins> ... </reporting> ... </project>
When you execute mvn site , the javadocs will be generated and included in the generated site. A link to the javadocs will be added in the Project Reports menu.
To generate standalone javadocs for the project, you can execute any of the following commands:
mvn javadoc:javadoc
or
mvn javadoc:jar
For mvn javadoc:jar , the javadocs are first generated and then packaged into a jar file.
The Javadoc Plugin supports a large number of configuration parameters. Each configuration parameter turns into a tag name.
Please see the Javadoc Package Summary for a listing of these parameters. Most of these parameters are passed directly to the Javadoc tool itself.