ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
Subject RE: Lazy evaluation of custom taskdefs
Date Tue, 19 Sep 2000 22:14:39 GMT
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.

Jose Alberto

> -----Original Message-----
> From: Mads Andersen [mailto:mads054@pop.k-net.dk]
> Sent: Tuesday, September 19, 2000 11:34 AM
> To: ant-dev@jakarta.apache.org
> Subject: Lazy evaluation of custom taskdefs
> 
> 
> Now that Ant can finally find my custom tag, I have a minor 
> suggestion.
> 
> My build.xml has a custom task in the beginning of the file 
> as follows:
> 
>   <taskdef name="transform"
> classname="com.madsie.util.xsl.XSLTransformTask"/>
> 
> Now, XSLTransformTask is a part of the project, so after an 
> "ant clean" the
> XSLTransformTask.class is no longer accessible. No matter 
> which target you
> try with Ant, it will fail because the Class of 
> XSLTransformTask is resolved
> before any targets get executed.
> 
> What I would like is to make my targets using taskdef 
> transform ensure that
> XSLTransformTask.java is compiled. This would be possible if 
> custom taskdefs
> were evaluated in a lazy fasion, that is when the custom 
> tasdef is first
> needed.
> 
> Best regards, Madsie
> 

Mime
View raw message