------ Generating Test Javadocs ------ Vincent Siveton ------ 2009-08-19 ------ ~~ 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 Generating Test Javadocs Here is a typical project used by the Maven Javadoc plugin: +-----+ yourproject |-- src |-- main | |-- java | | |-- org | | |-- apache | | |-- myapp | | `-- App.java | |-- javadoc | `-- overview.html | |-- org | |-- apache | |-- myapp | `-- package.html | |-- doc-files | `-- app.png |-- test |-- java | |-- org | |-- apache | |-- myapp | `-- AppTest.java |-- javadoc `-- overview.html |-- org |-- apache |-- myapp `-- package.html |-- doc-files `-- app.png +-----+ * Using the goal You need to configure the Maven Javadoc plugin in your pom.xml, for instance: +-----+ ... org.apache.maven.plugins maven-javadoc-plugin ${project.version} My API for \${project.name} \${project.version} My API for \${project.name} \${project.version} My Test API for \${project.name} \${project.version} My Test API for \${project.name} \${project.version} ... ... +-----+ You could call or . See {{{../test-javadoc-mojo.html}javadoc:test-javadoc parameters}} for more informations. <>: [[1]] If you don't set \ or \ parameters, the Test Javadoc report use the same configuration (i.e. \ or \ parameters) that Javadoc report (backward compatible reasons). [[2]] To run the reports selectively, you need to include only the reports that you prefer. Read the {{{./selective-javadocs-report.html}Selective Javadocs Reports}} part for more information. [[3]] To allow the copy of resources, you need to add the \ parameter. Read the {{{./javadoc-resources.html}Using Javadoc Resources}} page for more information. [] * Using the \ configuration parameter You could also want a different kind of configuration for the Javadoc report and the test Javadoc report. For this, you need to configure the Maven Javadoc plugin in your pom.xml to handle the \ configuration parameter, for instance: +-----+ ... org.apache.maven.plugins maven-javadoc-plugin ${project.version} html My API for \${project.name} \${project.version} My API for \${project.name} \${project.version} ... javadoc test-html My Test API for \${project.name} \${project.version} My Test API for \${project.name} \${project.version} ... test-javadoc ... +-----+ You need to call .