> From: Dave Westerman [mailto:[EMAIL PROTECTED]
> 
> I am writing my own Ant task as a wrapper to a utility which I have
> written. I have 3rd-party jar files which my utility needs in order to
> run. The Ant manual suggests that you always allow a user of your task to
> specify the classpath. I'm assuming I should use the builtin embedded
> <classpath> element. But I can find no examples of doing this.
> 
> I'm assuming I need a createClasspath() method, and a setClasspath(Path)
> method in my Ant task. But how do I then use the new classpath? Do I have
> to use the Ant Java task to call my utility class, instead of calling it
> directly from my Ant task, so that I can pass in the new classpath?
> 
> Any help would be greatly appreciated!

No, no, no. If your task depend on 3rd party classes, then it will never be
loaded unless these classes are available, so your task having a <classpath>
nested element does no good.

The 3rd party classes you require either must be in the system CLASSPATH, or
in ant/lib (as JARs), or specified explicitly at <taskdef> time in a nested
<classpath>. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to