Tim Dawson wrote:
In summary of the previous thread the recommendation is this:
1. Specify a deployment descriptor for an antlib jar. This would reside in "meta-inf/antlib.xml" and have a simple structure:
<antlib version="1.0"> <task name="..." class="..."/> <task name="..." class="..."/> <datatype name="..." class="..."/> <datatype name="..." class="..."/> </antlib>
2. Alter Project.java to discontinue the use of the defaults.properties files, and instead do a ClassLoader.getResources("meta-inf/antlib.xml"), and process each of those on startup.
3. Add a new task "antlib" which can be used to load a jar file containing ant tasks and datatypes. This would be used in case someone doesn't want to drop their antlib into $ANT_HOME/lib.
e.g. <antlib file="foo.jar"/>
4. Separate the definition of the optional tasks and types into the meta-fin/antlib.xml file in the optional.jar.
Please reply with your +1, 0, or -1 vote to the group.
I agree in general. I think, however, once we adopt this mechanism we would almost immediately need to handle name collisions in the <task> and <datatype> definitions. Your proposal does not cater for this.
Conor
