| From | Sent On | Attachments |
|---|---|---|
| Bill Burton | Jan 20, 2001 7:01 pm | |
| Peter Donald | Jan 20, 2001 7:39 pm | |
| Sam Ruby | Jan 20, 2001 7:41 pm | |
| Martin van den Bemt | Jan 21, 2001 7:26 am | |
| Peter Donald | Jan 21, 2001 7:33 am | |
| Martin van den Bemt | Jan 21, 2001 7:52 am | |
| Rosen, Alex | Jan 21, 2001 11:19 am | |
| Jon Stevens | Jan 21, 2001 11:40 am | |
| Bill Burton | Jan 22, 2001 8:09 am | |
| Craig R. McClanahan | Jan 22, 2001 9:21 am |
| Subject: | Re: [PROPOSAL] Class dependency checking for optional tasks | |
|---|---|---|
| From: | Craig R. McClanahan (Crai...@eng.sun.com) | |
| Date: | Jan 22, 2001 9:21:20 am | |
| List: | org.apache.ant.dev | |
Bill Burton wrote:
Hello,
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.
Overview
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.
http://java.sun.com/j2se/1.3/docs/guide/extensions/index.html
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 pretty easily.
Craig McClanahan





