Antmod XDoc Plugin

Converts xdocs into HTML using Apache Velocity's Anakia. More...

Release-level Ant targets:
xdoc-modules Generates XDocs in each module of the release by iterating across all modules and invoking the module-level 'xdoc' target.
Events fired: xdoc-modules-pre, xdoc-modules-post.

Module-level Ant targets:
xdoc Transforms the Anakia XML documents in the ${antmod.xdoc.src} directory into HTML in the ${antmod.xdoc.dest} directory.
Events fired: xdoc-pre, xdoc-post.

Configurable properties: [...]
antmod.xdoc.src Specifies the location of the module's xdoc documentation. Defaults to xdocs.
antmod.xdoc.dest This is where the transformed xdocs (in HTML format) are written. Defaults to ${antmod.module.dirs.build}/xdocs.
antmod.xdoc.copyright The copyright notice that appears at the bottom of each page. Defaults to "© ${antmod.release} project".
antmod.xdoc.crumb.separator The separator between links. Defaults to |.
antmod.xdoc.date.format The format of the "last published" date, see the Velocity DateTool API for valid formats. Defaults to being unset.
antmod.xdoc.lastpublished.enabled Enables or disables the "last published" information. Defaults to "true".
antmod.xdoc.lastpublished.text The text that is shown in front of the "last published" date. Defaults to "Last published:".
antmod.xdoc.poweredby.enabled Enables or disables the "powered by" logo. Defaults to "true".
antmod.xdoc.poweredby.image A relative URL for the image to use as "powered by" logo. Defaults to the "Built using Antmod" logo image.
antmod.xdoc.poweredby.title Sets the title of the link for the "powered by" logo. Defaults to "Built using Antmod"
antmod.xdoc.poweredby.url The URL of the link for the "powered by" logo. Defaults to "http://antmod.net"
antmod.xdoc.theme.url The documentation theme to use. The URL should point to a CSS file that can be used in addition to xdoc-base.css. Defaults to style/twiki-theme.css.
antmod.xdoc.velocity.log The location of the xdoc.velocity.log file, which is where Velocity logs its output. Defaults to ${user.home}/.antmod/xdoc.velocity.log.

Overview

The XDoc plugin is an easy-to-use mechanism for producing HTML documentation for modules and projects. Antmod itself uses xdocs for all of its documentation. An xdoc is an XML document conforming to a small and simple set of tags. Tools like Antmod (but also the Apache websites, build tools like Maven, etcetera) use this format extensively.

This plugin is implemented using Velocity Anakia, applying an advanced look and feel using cascading stylesheets (partly based on the nice work on this in Maven's xdoc plugin).
An advanced Velocity stylesheet is used that dynamically builds the menu and applies the proper stylesheet references. You can find Antmod's "site.vsl" Velocity stylesheet in the Antmod download, or see it online: Antmod's "site.vsl".

XDoc format

The documentation is mainly in Anakia format. More information along with samples, can be found at:

In addition to xdocs, users may wish to include other types of files such as images, their own HTML files, PDFs, etc. By default, this plugin will copy all files located in the antmod.xdoc.src directory to the final generated site.

Navigation.xml

The Antmod XDoc Plugin reads the menu definition from navigation.xml in the antmod.xdoc.src directory. Anakia calls this file the "projectFile". Next to Anakia's standard "projectFile" tags, the following are supported by this plugin:

XML tag Description Example
organizationLogo Relative or absolute URL to the organization's logo image (appears top-left). <organizationLogo>images/organizationLogo.png</organizationLogo>
logo Relative or absolute URL to the project's logo image (appears top-right). <logo>http://antmod.net/images/projectLogo.png</logo>
copyright Overrides any other copyright statement properties, which is then shown as the copyright text in generated HTML pages. <copyright>Copyright 2006 OurCorporation Inc.</copyright>
currentmenu Allows for selecting a current menu item. This is done by comparing this tag's "href" attribute to the href attribute of each menu item from 'navigation.xml'. <currentmenu href="/path/to/somepage.html"/>