ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cost...@covalent.net>
Subject RE: [PROPOSE] task parameters that are only supplied when a property is defined
Date Sat, 09 Mar 2002 06:15:00 GMT
On Fri, 8 Mar 2002, Steve Cohen wrote:

> I tried to implement checking for "${" in the stcheckout task and 
> before evencompiling, I find that I instantly don't like it.  I want the 
> user to be obligated to indicate his desire that for THIS PROPERTY 
> INVOCATION ONLY, he does not want the default behavior of passing in the 
> property expression.  

No problem - check then for $!{ or whatever else you want - and do the
substitution yourself. 

If you use $!{name}, ant will certainly not touch it - and your task
can do it's own substitution. 
The only problem is that you have to implement this in each method
that will take this kind of syntax ( for ant1.4 ).

What I'm trying to get in 1.5 is a number of hooks to allow 
various 'advanced' features like antlib, sax2, etc without
changing anything in 'normal' ant ( except maybe making 
the core simpler by moving out some of the default
implementations that are now coded in core, see ProjectHelper ). 

Having a hook for attribute substitution is easy to do,
but I am not very convinced this use case is very frequent and 
worth introducing complexity for it.

I had in mind a different syntax for mutable properties, and
I was thinking to use the ProjectHelper hook for this - but
a special hook for attribute processing may be a better solution
for this use case as well.
( again, all this is _outside_ of ant scope, in user code/tasks.
If it proves to be usefull, it can be added - or not - to 
the mainstream ant )

Costin


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