How can I create new @tags, templates and sub-tasks?

Ara Abrahamian

You can easily create new @tags/templates/tasks/sub-tasks. We're enhancing it all the time so I'm not going to provide any details here. Refer to docs/architecture.html in the distribution for a detailed manual about it.

  • You can use <template/> and <xmlTemplate/> subtasks. These sub-tasks are supported in all tasks automatically (webdoclet/ejbdoclet and even yourdoclet). The former is for any kind of output, the later has some facilities for XML output generation (automatic validation of generated content for example).
    Example: <template templateFile="c:mytemplate.j" destDir="c:output" destinationFile="report.html"/>
    Refer to the documentation for deatils of each of the above sub-tasks, you'll find a lot of options available.
  • You can create your own task or sub-task by simply deriving from xdoclet.DocletTask and xdoclet.SubTask (or one of its sub-classes, TemplateSubTask, XmlSubTask or a more specialized one such as WebDotXmlSubTask). Use Ant's <taskDef/> facility to install the task. Use subTaskClassName attribute of all sub-tasks to install the subtask.