ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <darr...@apache.org>
Subject [Myrmidon] Overriding TargetTask for Ant1Compat.
Date Sat, 08 Jun 2002 15:55:18 GMT
G'day,

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.)

This seems to work for any dependent targets of the called target, but the 
main target called is loaded before the <init> target is executed, so before 
the <import library="ant1"/> task. This is because the <init> target is 
considered an implicit dependency of the called target, rather than being 
explicitly executed *before* the called target. (This makes sense, it just 
makes it hard to achieve what I'm trying to do.)

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?

Anyhoo, I should probably stop playing, and actually get Myrmidon building 
herself again....
-- 
ciao,
Daz

--
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