You need to tell <taskdef> where to find the newly compiled class
<target name="prepareTransform">
<!-- Make sure the XSLTransformTask is available -->
<mkdir dir="${build}" />
<javac srcdir="${src}/com/madsie/util/xsl/XSLTransformTask.java"
destdir="${build}" />
<taskdef name="transform"
classname="com.madsie.util.xsl.XSLTransformTask" >
<classpath>
<pathelement location="${build}" />
</classpath>
</taskdef>
</target>
> -----Original Message-----
> From: Mads Andersen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 19, 2000 3:55 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Lazy evaluation of custom taskdefs
>
>
> > The way to solve this is to put your <taskdef> declaration
> > inside the <target> that builds yor <task> and then
> > make the targets that use it to be dependant on that target.
> >
> > I am doing that right now and it works just great.
>
> I'm very happy about this answer. However I can't completely
> figure out what
> I'm doing wrong compared to your description. I've attached
> my build.xml to
> this mail, and would appreciate very much if you could give
> me a hint on how
> to work around this:
>
> ---8<---
> Buildfile: build.xml
>
> BUILD FAILED
>
> Could not create task of type: transform because I can't find
> it in the list
> of task class definitions
> ---8<---
>
> Best regards, Madsie
>