2007-04-23 21:28:38 +00:00

116 lines
4.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* 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.
*/
-->
<faqs title="Frequently Asked Questions">
<part id="usage">
<title>Plugin Usage</title>
<faq id="links">
<question>How do I use links ?</question>
<answer>
<p>The URLs must link to a directory where the javadoc generated file "package-list" is accesible for the package.</p>
<p>Example:</p>
<source>
maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/, http://maven.apache.org/apidocs/
</source>
</answer>
</faq>
<faq id="offlineLinks">
<question>How do I use offlineLinks ?</question>
<answer>
<p>The URLs must link to a directory where the javadoc generated file "package-list" is accesible for the package.</p>
<p>Example (generates <b>offline</b> links in offline mode):</p>
<source>
maven.javadoc.offlineLinks=/opt/java-apidoc/j2sdk1.4.1/docs/api/, /cvsroot/maven/target/docs/apidocs/
</source>
<p>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.</p>
<p>Example (generates <b>online</b> links in offline mode):</p>
<source>
maven.javadoc.offlineLinks= \
http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/, \
http://maven.apache.org/apidocs/#/cvsroot/maven/target/docs/apidocs/
</source>
</answer>
</faq>
<faq id="firewall">
<question>How do I use links behind a Firewall ?</question>
<answer>
<p>You can set your proxy parameters in the additionnal parameters passed to the javadoc :</p>
<source>maven.javadoc.additionalparam=-J-DproxyHost=${maven.proxy.host} -J-DproxyPort=${maven.proxy.port}</source>
</answer>
</faq>
<faq id="classdiagrams">
<question>How do I generate class diagrams on Javadoc pages using free tools ?</question>
<answer>
<p>
One solution is to use UMLGraph and dot (part of Graphviz).
</p>
<p>
When running the javadoc goal with the below configuration,
the UmlGraphDoc doclet generates class diagrams
into the package and class pages.
<ol>
<li>Put latest jar in repo/depend on UmlGraph jar, e.g.</li>
<source><![CDATA[
<dependency>
<groupId>gr.spinellis</groupId>
<artifactId>UmlGraph</artifactId>
<version>4.6</version>
</dependency>
]]></source>
<li>Set Maven properties:</li>
<source>
maven.javadoc.doclet=gr.spinellis.umlgraph.doclet.UmlGraphDoc
maven.javadoc.docletpath=${maven.repo.local}/gr.spinellis/jars/UmlGraph-4.6.jar
maven.javadoc.usestandardparameters=true
</source>
<p>
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.
</p>
<source>
maven.javadoc.doclet.param.list=umlgraph.all
umlgraph.all.name=-all
</source>
<li>
Install dot (in <a href="http://www.graphviz.org">Graphviz</a>)
and put on PATH (so UmlGraphDoc can run it); e.g. for Windows:
</li>
<source>
GRAPHVIZ_HOME=(the path)
PATH=%PATH%;%GRAPHVIZ_HOME%\bin
</source>
<p>
Note that UmgGraphDoc outputs an error message
if it could not run dot.
</p>
</ol>
</p>
<p>
Refer to
<a href="http://www.spinellis.gr/sw/umlgraph/">UMLGraph</a>
docs for its custom Javadoc tags that enhance the generated diagrams.
</p>
</answer>
</faq>
</part>
</faqs>