DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26871>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26871 allow many default.properties files to make loading of extending tasks easier Summary: allow many default.properties files to make loading of extending tasks easier Product: Ant Version: 1.6.0 Platform: All OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] There are two ways to extend and with custom tasks. One is using <taskdef> in yout build file, which is a little awkward for tasks you use a lot and usually breaks ant-support in editors. The other is to open ant.jar, modify the definition file org/apache/tools/ant/tasdefs/default.properties and then wrap it all up again. This is cumbersome and not so easy. I suggest making it possible for all jars in classpath to have a task definition file named as above. Then new tasks can be loaded by placing the jar file in ant/lib, and voila! ant finds the new task. The ant core must be changed to not only look for one item in the class path with the def-file name, but to look for all resources with that name. AFAIK, the following change will implement the suggestion: File: apache-ant-1.6.0/src/main/org/apache/tools/ant/ComponentHelper.java Method: private void initTasks() {....} modified code starting at line 732 /* replaced code: in = this.getClass().getResourceAsStream(dataDefs); if (in == null) { throw new BuildException("Can't load default task list"); } props.load(in); */ // replacement begin Enumeration enumeration = this.getClass() .getClassLoader().getResources(dataDefs); while (enumeration.hasMoreElements()) { URL url = (URL) enumeration.nextElement(); in = url.openStream(); props.load(in); } // end of replacement --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]