Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Plugin Usage

How do I use links ?

The URLs must link to a directory where the javadoc generated file "package-list" is accesible for the package.


maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/, http://maven.apache.org/apidocs/

How do I use offlineLinks ?

The URLs must link to a directory where the javadoc generated file "package-list" is accesible for the package.

Example (generates offline links in offline mode):

maven.javadoc.offlineLinks=/opt/java-apidoc/j2sdk1.4.1/docs/api/, /cvsroot/maven/target/docs/apidocs/

Generation of online javadoc links in offline mode is also possible. You need to provide the online URL plus the a offline directory resource for "package-list". URL and directory need to be seperated by the "#" character.

Example (generates online links in offline mode):

maven.javadoc.offlineLinks= \
  http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/, \

How do I use links behind a Firewall ?

You can set your proxy parameters in the additionnal parameters passed to the javadoc :

maven.javadoc.additionalparam=-J-DproxyHost=${maven.proxy.host} -J-DproxyPort=${maven.proxy.port}

How do I generate class diagrams on Javadoc pages using free tools ?

One solution is to use UMLGraph and dot (part of Graphviz).

When running the javadoc goal with the below configuration, the UmlGraphDoc doclet generates class diagrams into the package and class pages.

  1. Put latest jar in repo/depend on UmlGraph jar, e.g.
  2. <dependency>
  3. Set Maven properties:
  4. maven.javadoc.doclet=gr.spinellis.umlgraph.doclet.UmlGraphDoc

    Maven Javadoc plugin version 1.9 and newer enables specifying custom doclet parameters. This makes configuring UMLGraph's doclet possible, for example, turning on extra class diagram adornments. Adjust these as desired, referring to the UMLGraph documentation.

  5. Install dot (in Graphviz) and put on PATH (so UmlGraphDoc can run it); e.g. for Windows:
  6. GRAPHVIZ_HOME=(the path)

    Note that UmgGraphDoc outputs an error message if it could not run dot.

Refer to UMLGraph docs for its custom Javadoc tags that enhance the generated diagrams.