------ Configuring links and offlineLinks Parameters ------ 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 Configuring <<>> Parameter ~~ Using anchor links produces a Velocity error. You could add cross reference links to external projects using the {{{../javadoc-mojo.html}\}} parameters. For instance: +-----+ ... (or ) org.apache.maven.plugins maven-javadoc-plugin ${project.version} http://commons.apache.org/dbcp/apidocs/ http://commons.apache.org/fileupload/apidocs/ ... (or ) ... +-----+ <>: according the {{{http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#package-list}Javadoc specifications}}, all given links <> have a fetchable <<>> file. Since 2.6, you could try to detect all Javadoc links for the project's dependencies. You need to use the {{{../javadoc-mojo.html#detectLinks}\}} parameter. All detected links are based on the default Maven conventions. For instance, if your project has a dependency to {{{http://commons.apache.org/lang/}Apache Commons Lang}} i.e.: +-----+ ... commons-lang commons-lang 2.4 ... +-----+ The added Javadoc link will be {{http://commons.apache.org/lang/apidocs}}. Since 2.6, a {{{http://java.sun.com/reference/api/index.html}Javadoc API}} link, depending the JDK version used by your project, will be added. The version of the Javadoc API is detected from the value of the {{{http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source}\}} parameter in the <<<{{{http://maven.apache.org/plugins/maven-compiler-plugin}org.apache.maven.plugins:maven-compiler-plugin}}>>> (defined in $\{project.build.plugins\} or in $\{project.build.pluginManagement\}), or computed via the Javadoc Tool executable. If you want to skip this link, you need to configure {{{../javadoc-mojo.html#detectJavaApiLink}\}} to <<>>. <>: if you are using an unsupported JDK like 7.0, you could add its Javadoc API url using the {{{../javadoc-mojo.html#javaApiLinks}\}} parameter, i.e.: +-----+ api_1.7 http://download.java.net/jdk7/docs/api/ ... +-----+ ~~ Using anchor links produces a Velocity error. Refer to {{{../javadoc-mojo.html}\}} parameter for more information. Configuring <<>> Parameter If your project has modules, you could add cross reference links to your modules when your goals are not aggregator goals. For instance, if your project has two modules i.e.: +-----+ ... module1 module2 ... +-----+ The offlineLinks for <> will be <<>><><<>> and the offlineLinks for <> will be <<>><><<>>. <>: all offlinelinks are based on the $\{project.url\} if present. Since 2.6, you could disable the cross reference for <<>> using the {{{../javadoc-mojo.html#detectOfflineLinks}\}} parameter. Refer to {{{../javadoc-mojo.html#offlineLinks}\}} parameter for more information.