Ant Task for Doxygen , with Antlib support (since Ant 1.7), 1.6.1 released. Download it now.

Saturday, March 22, 2008

Usage

Description

Generates documentation for source files, using the document generation utility doxygen

Dependency


The 'doxygen' binary need to be pre-installed on the system. If it is not in the PATH environment variable of your operating system, please see the attribute 'doxygenPath' as to how to use the same to invoke doxygen.

Parameters


AttributeDescriptionRequired
versionCompatibleThis is the version of doxygen for which the task is compatible. If set and the version of the doxygen installed on the system does not match with this version, the build would break No
doxygenPathThis is the full path to the doxygen executable that is to be used for executing this doxygen task. By default, the task expects the doxygen binary in the path.No
configFilename If set, then the doxygen task would load the configuration properties from this file. No



Parameters specified as nested elements

property

doxygen task can have more than one 'property' nested elements as follows.



AttributeDescriptionRequired
nameThe name of the property in the Doxygen configuration file. Yes.
valueThe value of the property whose name is specified as 'name' attribute in the Doxygen configuration file.Yes.



Defining Doxygen Task


The doxygen task could be defined in 2 ways as follows.

1.6.0+ ( Preferred):

* Copy ant-doxygen.jar from the binary distribution to $ANT_HOME/lib .
* Define a new URI for doxygen as follows, at the antlib library location, antlib:org.doxygen.tools , as follows.








* Note the revised task invocation (with additional uri prefix for doxygen:) above.

Legacy Task Definition (Deprecated):


<taskdef name="doxygen" classname="org.doxygen.tools.DoxygenTask"
classpath="<path_to_ant_doxygen.jar_file>" />
Note: The legacy task definition would be soon deprecated and the users are suggested to switch to the modern task definition at their earliest convenience.





Examples

  1. To generate documentation by default in current directory, basic option.






  2. To generate html documentation recursively for a given directory and suppress latex documentation.

  3. <doxygen:doxygen>

    <property name="INPUT" value="${inputdir}" />
    <property name="RECURSIVE" value="yes" />
    <property name="GENERATE_LATEX" value="false" />
    <property name="PROJECT_NAME" value="Ant-Doxygen" />
    </doxygen:doxygen >


  4. To launch doxygen that is not installed on the path.
  5. <doxygen:doxygen doxygenPath="/usr/local/doxygen-1.2.5/doxygen" >
    <property name="INPUT" value="${inputdir}" />
    <property name="PROJECT_NAME" value="Ant-Doxygen" />
    </doxygen:doxygen>


  6. To launch doxygen that should be run only with doxygen version 1.2.17.

  7. <doxygen:doxygen versionCompatible="1.2.17" >
    <property name="INPUT" value="${inputdir}" />
    <property name="PROJECT_NAME" value="Ant-Doxygen" />
    </doxygen:doxygen >


  8. To launch doxygen that should be run with doxygen versions 1.2.17 and above.

  9. <doxygen:doxygen versionCompatible="1.2.17+" >
    <property name="INPUT" value="${inputdir}" />
    <property name="PROJECT_NAME" value="Ant-Doxygen" />
    </doxygen:doxygen>


  10. To load the doxygen configuration properties from a given file.

<doxygen:doxygen configFilename="/home/myhome/doxygen.cfg" />