Configuring links Parameter

You could add cross reference links to external projects using the <links/> parameters. For instance:

<project>
  ...
  <reporting> (or <build>)
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.1</version>
        <configuration>
          <links>
            <link>http://commons.apache.org/dbcp/apidocs/</link>
            <link>http://commons.apache.org/fileupload/apidocs/</link>
          </links>
            ...
        </configuration>
      </plugin>
    </plugins>
  </reporting> (or </build>)
  ...
</project>

Important Note: according the Javadoc specifications, all given links should have a fetchable /package-list file.

Since 2.6, you could try to detect all Javadoc links for the project's dependencies. You need to use the <detectLinks/> parameter. All detected links are based on the default Maven conventions. For instance, if your project has a dependency to Apache Commons Lang i.e.:

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <versions>2.4</version>
    </dependency>
  </dependencies>
  ...
</project>

The added Javadoc link will be http://commons.apache.org/lang/apidocs.

Since 2.6, a 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 <source/> parameter in the 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 <detectJavaApiLink/> to false.

Note: if you are using an unsupported JDK like 7.0, you could add its Javadoc API url using the <javaApiLinks/> parameter, i.e.:

<configuration>
  <javaApiLinks>
    <property>
      <name>api_1.7</name>
      <value>http://download.java.net/jdk7/docs/api/</value>
    </property>
  </javaApiLinks>
  ...
</configuration>

Refer to <links/> parameter for more information.

Configuring offlineLinks 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.:

<project>
  ...
  <modules>
    <module>module1</module>
    <module>module2</module>
  </modules>
  ...
</project>

The offlineLinks for module1 will be /absolute/path/to/module2/target/site/apidocs and the offlineLinks for module2 will be /absolute/path/to/module1/target/site/apidocs.

Important Note: all offlinelinks are based on the ${project.url} if present.

Since 2.6, you could disable the cross reference for offlineLinks using the <detectOfflineLinks/> parameter.

Refer to <offlineLinks/> parameter for more information.