ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [Myrmidon] Overriding TargetTask for Ant1Compat.
Date Sun, 09 Jun 2002 02:28:52 GMT
At 01:55 AM 6/9/2002 +1000, you wrote:
>I've been playing around with an Ant1CompatTargetTask, which will handle "if"
>and "unless", without having to transform the model with <if> tasks. I
>thought this would be a cleaner solution, without having to introduce hidden
>tasks, which might confuse the user. (and I thought it would be cool to try
>out.)

Sounds good to me.

>Any ideas how I can import the Ant1Compat library before the first target is
>loaded? (It seems like I could provide Ant1CompatProject extends
>DefaultProject to import the Ant1Compat library when Module.createWorkspace()
>is called - is this the right track?) Or is this sort of thing just not going
>to be doable in any simple way?

Hmmm .. not sure exactly what the best approach. I suppose the way you 
describe would be the easiest as all you would need to do is

void createWorkspace(...)
{
   Workspace w = super.createWorkspace(...);
   registerAnt1Tasks( w );
   return w;
}

Alternatively you could transform the target element from <target ...> to 
<ant1.target ...> and make sure this results in the ant1 version of class 
being used. Im not sure if this will work but I believe this is where Adam 
wanted to go (May even be there now?).


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message