<antstructure>

You can use <antstructure> to generate a DTD (Document Type Definition) for Ant build files. It contains information about the available Ant tasks and lists all the attributes associated to each task. However, it does not differentiate between required and optional attributes—all attributes are listed as #IMPLIED. Neither does it include any custom tasks added via the <taskdef> task. Michel Casabianca provides a solution to this problem at http://www.sdv.fr/pages/casa/html/ant-dtd.en.html although it should be noted that the solution is based on Ant 0.3.1.

One further problem with the <antstructure> task is that it does not necessarily generate a valid DTD. Due to the fact that Ant allows task writers to define arbitrary elements, ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.