apiviz is a javadoc doclet which renders UML class diagrams at class and package level. It can be easily integrated into JSPWiki's build.xml, but due to it's license (LGPL) it is not included in the distro. This page details required steps needed to use it
  • download apiviz and place the binary .jar somewhere in your project (we're assuming here it will be placed in $JSPWIKI_SRC/lib and the version we'll be using will be 1.1.3).
  • download and install graphviz. Graphviz is the program in which apiviz relies on to generate the UML diagrams. Important: also, graphviz's bin subfolder must be set in system's path!
  • edit the <javadoc> ant target and replace it with the following snippet:
<javadoc destdir="${docs.javadoc}"
  <packageset dir="${code.src}">
    <include name="com/ecyrd/**" />
  <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
  <link href="http://java.sun.com/products/javamail/javadocs/"/>
  <link href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
  <link href="http://www.jdom.org/docs/apidocs/"/>
  <classpath refid="path.base" />
  <classpath refid="path.tests" />   
  • as we've placed the jar in $JSPWIKI_SRC/lib, the <war task is going to include it when building the war. To avoid this replace the <war> target with the following snippet:
<war warfile="${warfile}"
   <lib dir="lib" includes="*.jar" excludes="servlet-api.jar jsp-api.jar apiviz-1.1.3.jar"/>
   <lib file="${jarfile}" />
   <fileset dir="${code.src}/webdocs" includes="**" excludes="**/FCK/jsp" />
   <webinf dir="etc">
     <include name="dtd/**" />
     <include name="jsp/**" />
     <include name="commons-logging.properties" />
     <include name="jspwiki.policy" />
     <include name="jspwiki.properties" />
     <include name="*.tld" />
     <include name="userdatabase.xml" />
     <include name="groupdatabase.xml" />
   <classes dir="etc" includes="oscache.properties" />
  • If all goes ok, the next time you execute the <javadoc> target, you should see something like this:

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
apiviz-javadocs.png 57.5 kB 1 05-Sep-2008 21:38 apiviz javadocs example
« This page (revision-2) was last changed on 05-Sep-2008 21:38 by