Hi all, I posted this to the ant-user list but haven't got any reaction sofar. Since I built custom ant tasks it seems to me that this question can also be posted here.
regards, Jeroen Breedveld Btw, I'm using ant 1.5.1 || -----Original Message----- || From: Jeroen Breedveld [mailto:[EMAIL PROTECTED] || Sent: vrijdag 3 januari 2003 10:53 || To: [email protected] || Subject: Odd behaviour loaderref attribute taskdef and typedef || || || Hi all, || || I wrote some custom anttasks for use with the database of || our company. To make sure that the custom tasks and types || are loaded with the same classloader I used the loaderref || attribute to supply ant with a reference to the same || classloader. The problem is that when I supply the || loaderref attribute with the same name as the project (see || code snippet || below) different classloaders are used to load the custom || tasks and types (that's my conclusion because I receive || ClassCastExceptions). Changing to values of the loaderref || attribute to anything else solves this problem. Is this a || bug or did I do something wrong? || || regards, || || Jeroen Breedveld || || code snippet: || || <project name="3dm" default="build" basedir="."> || || <target name="init"> || <property file="build.properties"/> || <path id="classpath"> || <path location="../build"/> || <fileset dir="${xhive.dir}/build/lib"> || <include name="xhive.jar"/> || <include name="dom3_intermediate.jar"/> || </fileset> || <fileset dir="${xhive.dir}/lib"> || <include name="**/*.jar"/> || </fileset> || <fileset dir="../lib"> || <include name="**/*.jar"/> || </fileset> || </path> || <taskdef loaderref="3dm" || resource="com/xhive/anttasks/tasks.properties" || classpathref="classpath"/> || <typedef loaderref="3dm" || resource="com/xhive/anttasks/type.properties" || classpathref="classpath"/> || <database id="MyDatabase" || bootstrap="${bootstrap}" || name="${database}" || user="${user}" || password="${password}"/> || </target> || || -- || || X-Hive Corporation || e-mail: [EMAIL PROTECTED] || phone: +31 10 7108622 || http://www.x-hive.com || || -- || To unsubscribe, e-mail: || <mailto:[EMAIL PROTECTED]> || For || additional commands, e-mail: || <mailto:[EMAIL PROTECTED]> || -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
