ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <>
Subject antlib descriptor
Date Tue, 19 Feb 2002 04:16:35 GMT


Below is a proposed antlib descriptor syntax, for use in ant 1.5.  The
syntax is drawn from the various proposals (antlib, mutant, myrmidon), but
it is made up of the bits that I happen to prefer, so I'm quite happy to
change it.

I did start coding this up, but decided to do some refactoring instead, to
make it a little easier to add (and to swap in new behaviours).  More on
this in another email.

Before looking at the syntax, I should point out that the scope of what I
plan to do is much smaller than the other proposals.  All I want to do for
starters is:

* Replace the task and type descriptors, with a combined
XML descriptor.

* Allow each Jar file in lib/ to optionally supply its own descriptor.

For this reason, I've left out most of the stuff from the other proposals,
which we can add later, as the proposals mature.  Also, an <antlib> task is
out-of-scope for the time being.

The proposal:

The descriptor name will be META-INF/antlib.xml.  Each Jar file in
$ANT_HOME/lib will be searched for a descriptor and, if found, the tasks and
types loaded from it.  The system classpath will *not* be searched for

No change will be made to the ClassLoader hierarchy.  All the task/type
classes will be loaded via the system ClassLoader.

The DTD for the descriptor will be:

<!ELEMENT antlib types? >
<!ATTLIST antlib

<!ELEMENT types (task|data-type)* >

<!ATTLIST task
	classname CDATA #REQUIRED

<!ELEMENT data-type EMPTY >
<!ATTLIST data-type
	classname CDATA #REQUIRED

An example:

<antlib version="1.0">
    <task name="property"
    <data-type name="fileset"

For the first cut, the descriptors will probably be hand-crafted, though it
shouldn't be a big deal to set up an XDoclet template to generate them.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message