ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Defining classpath with Taskdef
Date Wed, 29 Nov 2000 21:12:46 GMT

I think is the Stefan who answered my question about
specifying classpath in the <taskdef> task. I am
trying the following and getting ClassNotFoundExceptions.

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.
I have tried both methods individually and still get
ClassNotFoundExceptions. Is what is listed below the
correct way to specify a classpath for a <taskdef>?

This little snippet is also called via an <ant> task in
a parent build file. I'm not how or if this affects
the classloading. Thanks.

<project name="Torque" default="main" basedir=".">

  <!-- Build classpath -->
  <path id="classpath">
    <fileset dir="../bin">
      <include name="*.jar"/>
    <fileset dir="../lib">
      <include name="*.jar"/>

  <property name="cp" refid="classpath"/>

  <taskdef name="vtorque" classname="org.apache.turbine.torque.ant.VTorqueTask">
    <classpath refid="classpath"/>


View raw message