<[EMAIL PROTECTED]> wrote:
> Hi,
>
> If I <echo> out the ${cp} property it is correct and
> lists all the jar files that are required. In the snippet
> listed below there are two ways of defining the classpath.
If you are calling the taskdef by means of <ant> and your <path> is
part of the calling project you'll need to "tunnel" it through the
property, so the refid version is not supposed to work.
Otherwise, both ways should work as well as
<taskdef name="vtorque" classname="org.apache.turbine.torque.ant.VTorqueTask">
<classpath>
<fileset dir="../bin">
<include name="*.jar"/>
</fileset>
<fileset dir="../lib">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
You know that a <taskdef> performed in the called project won't have
any effect on the calling project, right?
> I have tried both methods individually and still get
> ClassNotFoundExceptions.
Where do you get the Exception? Inside the taskdef or when you try to
use the task?
I'd suggest to use "ant -debug", this will list where Ant tries to
load a class from, some classes must be loaded via the system
classloader (using your system CLASSPATH), others will be loaded by
Ant. You cannot load any class from a package starting with java. from
your custom CLASSPATH for example.
Stefan