Patrick Linskey <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've successfully written some custom tasks for ant, and am now
> trying to figure out how to best design my build process. The
> compilers that the custom ant tasks invoke are part of the project,
> so ant dies a miserable death if I <taskdef> them before they've
> been built.
So don't use a taskdef before they've been built 8-)
You can nest <taskdef> into targets, something like
<target name="build-custom-task">
<javac ... />
<jar jarfile="custom.jar" ... />
</target>
<target name="define-custom-task" depends="build-custom-task">
<taskdef name="mytask" ...>
<classpath>
<pathelement file="custom.jar" />
</classpath>
</taskdef>
</target>
<target name="use-custom-task" depends="define-custom-task">
<mytask .../>
</target>
Requires Ant 1.2 or later.
Stefan