 ------
 Using Alternate Javadoc Tool
 ------
 Vincent Siveton
 ------
 2009-08-04
 ------

~~ 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

Using Alternate Javadoc Tool

* Using Alternate Javadoc Executable

 By default, the Maven Javadoc Plugin tries to auto-detect the Javadoc Tool executable from the Java property
 <java.home> or from the environment variable <JAVA_HOME>.

 You could also specify the executable of the Javadoc Tool to use with the
 {{{../javadoc-mojo.html#javadocExecutable}\<javadocExecutable/\>}} parameter. For example:

+-----+
<project>
  ...
  <reporting> (or <build>)
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <javadocExecutable>C:\jdk1.6.0\bin\javadoc.exe</javadocExecutable>
          ...
        </configuration>
      </plugin>
      ...
    </plugins>
  </reporting> (or </build>)
  ...
</project>
+-----+

  <<IMPORTANT NOTE>>: by using {{{../javadoc-mojo.html#javadocExecutable}\<javadocExecutable/\>}} parameter, the build
  will be plateform dependent! A good practice is to define an environnement variable (i.e. JAVA_1.6_HOME), so you
  could specify it: (i.e. \<javadocExecutable\>\u0024\{env.JAVA_1.6_HOME\}/bin/javadoc\</javadocExecutable\>). An other
  ways is to define a POM property using \<project\>\<properties/\>\</project\>.

* Using Alternate Javadoc Version

 In the same way, the Maven Javadoc Plugin tries to auto-detect the Javadoc Tool version by calling
 <javadoc -J-fullversion>.

 You could also specify the version of the Javadoc Tool executable. For example:

+-----+
<project>
  ...
  <reporting> (or <build>)
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <javadocVersion>1.5</javadocVersion>
          ...
        </configuration>
      </plugin>
      ...
    </plugins>
  </reporting> (or </build>)
  ...
</project>
+-----+

 <<Note>>: You could have a warning if the <javadocVersion> specified is not the same that the Javadoc Tool executable.
