------ Usage ------ Vincent Siveton Maria Odea Ching ------ 2009-09-11 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Usage The Javadoc Plugin generates javadocs using the Javadoc tool. The following examples describe the basic usage of the Plugin. * Generate Javadocs As Part Of Project Reports To generate javadocs as part of the site generation, you should add the Javadoc Plugin in the \ section of your pom: +-----+ ... org.apache.maven.plugins maven-javadoc-plugin ${project.version} ... ... ... +-----+ When you execute <<>>, the javadocs will be generated and included in the generated site. A link to the javadocs will be added in the Project Reports menu. * Generate Standalone Javadocs To generate standalone javadocs for the project, you could add the Javadoc Plugin in the \ section of your pom (if no configuration defined, the plugin uses default values): +-----+ ... org.apache.maven.plugins maven-javadoc-plugin ${project.version} ... ... ... +-----+ And execute any of the following commands: +-----+ mvn javadoc:javadoc mvn javadoc:jar mvn javadoc:aggregate mvn javadoc:aggregate-jar mvn javadoc:test-javadoc mvn javadoc:test-jar mvn javadoc:test-aggregate mvn javadoc:test-aggregate-jar +-----+ For all <<>> goals, the javadocs are first generated and then packaged into a jar file. * Javadoc Configuration The Javadoc Plugin supports a large number of configuration parameters. Each configuration parameter turns into a tag name. Please refer to the {{{../javadoc-mojo.html}Javadoc Plugin Documentation}} for a listing of these parameters. Most of these parameters are passed directly to the Javadoc tool itself. <>: configuring the Javadoc plugin in the \ or \ elements in the pom have <> the same behavior as described in the {{{http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_reporting_Tag_VS_build_Tag}Guide to Configuring Plug-ins}}. For instance, if you have the following snippet: +-----+ org.apache.maven.plugins maven-javadoc-plugin ${project.version} private true org.apache.maven.plugins maven-javadoc-plugin ${project.version} ${basedir}/src/main/javadoc/stylesheet.css public +-----+ [<<>>] It will generate the Javadoc for public members (defined in \) using the given stylesheet (defined in \), and with an help page (default value for {{{../javadoc-mojo.html#nohelp}nohelp}} is true). [<<>>] It will generate the Javadoc for private members (defined in \) using the stylesheet (defined in \), and with no help page (defined in \). []