ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Lazy evaluation of custom taskdefs
Date Wed, 20 Sep 2000 06:53:41 GMT
>>>>> "MA" == Mads Andersen <> writes:

 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 name="use.task" depends="build.and.define.task">
  <transform ... />

Should work - i.e. if it doesn't you've found a bug.

You might need to use the nested classpath element of taskdef if your
freshly compiled task is not inside of Ant's classpath.


View raw message