| ------ |
| Selective Javadocs Reports |
| ------ |
| Vincent Siveton |
| ------ |
| 2009-09-13 |
| ------ |
| |
| ~~ 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 |
| |
| Selective Javadocs Reports |
| |
| To run the Javadocs reports selectively, you need to include only the Javadocs reports that you prefer. |
| As said in the {{{../faq.html#Where_in_the_pom.xml_do_I_configure_the_Javadoc_Plugin}FAQ}}, the configuration |
| depends on the \<build/\> tag or \<reporting/\> tag used. |
| |
| * Using \<build/\> Tag |
| |
| +-----+ |
| <project> |
| ... |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <version>${project.version}</version> |
| <configuration> |
| <!-- Default configuration for all reports --> |
| ... |
| </configuration> |
| <executions> |
| <execution> |
| <goals> |
| <goal>javadoc</goal> |
| <goal>test-javadoc</goal> |
| </goals> |
| <phase>site</phase> |
| <configuration> |
| <!-- Specific configuration for the given reports --> |
| ... |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| ... |
| </project> |
| +-----+ |
| |
| Since the phase is <<<site>>>, you need to call <<<mvn site>>> to generate the selected reports (only main and test |
| javadocs). |
| |
| * Using \<reporting/\> Tag |
| |
| +-----+ |
| |
| <project> |
| ... |
| <reporting> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <version>${project.version}</version> |
| <configuration> |
| <!-- Default configuration for all reports --> |
| ... |
| </configuration> |
| <reportSets> |
| <reportSet> |
| <id>default</id> |
| <configuration> |
| <!-- Specific configuration for the given reports --> |
| ... |
| </configuration> |
| <reports> |
| <report>javadoc</report> |
| <report>test-javadoc</report> |
| </reports> |
| </reportSet> |
| <reportSet> |
| <id>aggregate</id> |
| <configuration> |
| <!-- Specific configuration for the given reports --> |
| ... |
| </configuration> |
| <reports> |
| <report>aggregate</report> |
| </reports> |
| </reportSet> |
| </reportSets> |
| </plugin> |
| </plugins> |
| </reporting> |
| ... |
| </project> |
| +-----+ |
| |
| Just call <<<mvn site>>> to generate the selected reports (main, test and aggregate javadocs). |