I've been thinking about ways to improve usability of Ant, particulary for
first time users. Here's one idea in that direction.
One of the questions that comes up a lot on the ant-user list is, "Where
do a find the classes for ftp support, etc?" As a result, it was good to
see Nico's patches to clarify the docs in this area. I've been thinking
about this problem from a little different perspective.
Each task requiring external classes should provide a way the task
developer can declare the required jar file(s) by specifing a class within
each jar to check for the availability of the jar. If the class isn't
available, the task will throw a BuildException with the name of the
missing jar and the URL where it can be obtained.
The JDK docs describe an approach whereby JAR files can declare dependencies on
external packages. If Ant 2.x allows the packaging of individual tasks in
separate JAR files (perhaps auto-registering them if they are placed in a
special directory?), it would be pretty easy to use this approach.
NOTE: The servlet 2.3 spec requires servlet containers to support this
mechanism for webapps to declare such dependencies. As such, Tomcat 4.0 has
some support code for implementing this that could be generalized and reused