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}"
         use="yes"
         breakiterator="true"
         windowtitle="${ant.project.name}"
         doclet="net.gleamynode.apiviz.APIviz"
         docletpath="./lib/apiviz-1.1.3.jar">
  <packageset dir="${code.src}">
    <include name="com/ecyrd/**" />
  </packageset>
  <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" />   
</javadoc>
  • 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}"
     webxml="etc/web.xml">
   <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" />
   </webinf>
   <classes dir="etc" includes="oscache.properties" />
</war>
  • If all goes ok, the next time you execute the <javadoc> target, you should see something like this:
apiviz-javadocs.png

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
png
apiviz-javadocs.png 57.5 kB 1 05-Sep-2008 21:38 84.78.34.50 apiviz javadocs example
« This page (revision-2) was last changed on 05-Sep-2008 21:38 by 84.78.34.50