|
I needed to be able to access the core tasks and optional
tasks separately through a dtd. I modified AntStructure to allow the user
to create two separate files one with core tasks and one with optional
tasks. I also gave the user the option to merge the two if they did not
want two separate files.
Craig Campbell
|
AntStructure.java
Description: JavaScript source
AntStructure
Description
Generates a DTD for Ant buildfiles which contains information about all tasks currently known to Ant.
Note that the DTD generated by this task is incomplete, you can
always add XML entities using <taskdef>. See here for
a way to get around this problem.
This task doesn't know about required attributes, all will be
listed as #IMPLIED.
Parameters
| Attribute | Description | Required |
| core | file to write the core tasks DTD to. | Yes |
| optional | file to write the optional tasks DTD to. If nothing is specified and merge is false the default will be a file named "optional_<core filename>" |
No |
| merge | write one DTD file with all tasks listed. default is false |
No |
Examples
Creates two dtd files with the default being used for the optional dtd
<antstructure core="project.dtd"/>
Creates two dtd files with the optional dtd file given a specific name
<antstructure core="project.dtd"
optional="project-ext.dtd"/>
Creates a single dtd file
<antstructure core="project.dtd"
merge="true"/>
Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.
