At 10:43 17/5/01 -0500, Tim Dawson wrote: >(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?
+1 We call that file taskdefs.xml and although we didn't actually vote on it - the concept will almsost 100% be used ;) Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*
