ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mads Andersen" <mads...@pop.k-net.dk>
Subject Re: Lazy evaluation of custom taskdefs
Date Wed, 20 Sep 2000 13:23:13 GMT
>  MA> This would be possible if custom taskdefs were evaluated in a
>  MA> lazy fasion, that is when the custom tasdef is first needed.
>
> They are, but somewhat different than you propose.
>
> You can now (1.2alpha3) put the taskdef into a target and it will be
> evaluated at runtime.
>
> <target name="build.and.define.task">
>   <javac ... />
>   <taskdef name="transform"
>                 classname="com.madsie.util.xsl.XSLTransformTask"/>
> </target>
>
> <target name="use.task" depends="build.and.define.task">
>   <transform ... />
> </target>
>
> Should work - i.e. if it doesn't you've found a bug.

Jose Alberto Fernandez was very kind to point this out to me already. It
didn't work right away though, but switching from the nightly build to the
CVS tree did the trick.

Best regards, Madsie


Mime
View raw message