I guess it wasn't real clear where I was planning to do this. I'd like to do this in the 1.5 tree, rather than in the proposal/ area. This is why the scope is so limited.
Adam > -----Original Message----- > From: Adam Murdoch [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 19 February 2002 2:17 PM > To: [EMAIL PROTECTED] > Subject: antlib descriptor > > > > Hi, > > 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 defaults.properties 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 > descriptors. > > 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 > version CDATA #REQUIRED > > > > <!ELEMENT types (task|data-type)* > > > <!ELEMENT task EMPTY > > <!ATTLIST task > name CDATA #REQUIRED > classname CDATA #REQUIRED > > > > <!ELEMENT data-type EMPTY > > <!ATTLIST data-type > name CDATA #REQUIRED > classname CDATA #REQUIRED > > > > An example: > > <antlib version="1.0"> > <types> > <task name="property" > classname="org.apache.tools.ant.taskdefs.Property"/> > <data-type name="fileset" > classname="org.apache.tools.ant.types.FileSet"/> > </types> > </antlib> > > 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. > > > Adam > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
