(I sent this a few days ago but didn't see it come back to me in the list - my apologies if this is a duplicate.)
Maybe this has already been proposed, but I looked in the Ant2 features and didn't see anything about automatic taskdef registration. I think we should look at copying the patterns established by EJB, JSP, and Taglibs for using deployment descriptors in the jar file. The EJB jar file uses an ejb-jar.xml file in the meta-inf directory. (why do war files use web-inf instead of meta-inf? anyway, I digress) I'd like to propose that instead of using the defaults.properties file in the org.apache.tools.ant.taskdefs package, that we just use a deployment descriptor - namely, meta-inf/ant-tasks.xml in the jar files, and when all the jar files inside the ANT_HOME/lib directory are loaded, Ant just looks for meta-inf/ant-tasks.xml, and when it finds one, it does the equivalent of the <taskdef> automatically for each defined task. That way, if I write a set of custom tags (or want to use some tasks packaged by a third party), then drop a jar file in my ANT_HOME/lib directory. This would be useful for the current set of optional tasks too, so that they would be "unknown" unless the jar file was there, rather than the way they're currently automatically registered but you get a ClassNotFoundException. Comments? Tim
