ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: taskdef and class loaders
Date Mon, 03 Mar 2003 20:51:52 GMT
Either you put your custom tasks *and* their dependencies on the system
classpath (or ant/lib), or you don't, meaning that neither are on the system
classpath, but in a custom path used inside the <taskdef>. You cannot mix
and match. --DD

-----Original Message-----
From: Mike McNally [] 
Sent: Monday, March 03, 2003 2:33 PM
To: Ant Users List
Subject: Re: taskdef and class loaders

> How about loading your custom task with an explicit nested <classpath>,
> whole thing inside a target (to delay the task loading). 

What my taskdef looks like is:

  <taskdef file='xmlutil/' classpathref='build.classpath'/>

Is that what you mean?  (My file contains just a couple of
tasks; they all suffer from exactly the same symptoms.)

> That way, you can
> specify whatever classpath you want, for both your task, and its dependent
> classes??? 

That's what I thought the "classpathref" would do, but it does not work
when the class is present on the System classpath.  (I've verified with
some debugging that my class is not loaded until the point in the build
when the <taskdef> is invoked; at least, I *think* I have.)

[ you are my main foo ] Mike McNally --

View raw message