561
APPENDIX E
Ant task reference
Ant’s distribution ships with extensive documentation in HTML format, including
details for every task. Why then, do we include a task reference in this book? We felt
readers would benefit from a quick reference they could consult while reading the
book, or flip through while away from their computers, or as a quick reference to the
valid attributes and elements of a task.
We didn’t want to rewrite the documentation, as it would have taken a lot of effort
for little real benefit. At the same time, we didn’t want to include the current docu-
mentation as it is too detailed for a quick reference, yet not guaranteed to be accurate.
Because Ant’s current task documentation is decoupled from the source of the tasks,
it is out of sync with the tasks in some places.
To address these needs, we created an automated process to analyze Ant’s source
code and extract task details directly. This process used XDoclet’s custom capabilities,
allowing generation of an XML file for each task. These XML files contain informa-
tion such as task description and all supported attribute and element names, types, and
descriptions.
1
We expect the future releases of Ant to adopt this process, improving
the online documentation accordingly.
1
The XDoclet work included a custom subtask, tag handler, and template. The process was simple from
that point forward. The XML files were merged using <concat> and transformed into HTML using
<xslt>. The code for this autogeneration exists within Ant’s source code repository.
app E.fm Page 561 Wednesday, July 10, 2002 8:08 AM
评论11