ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Problems with <import>
Date Sat, 20 Jul 2002 20:18:13 GMT
On Sat, 20 Jul 2002, Nicola Ken Barozzi wrote:

> >>I said "deprecate", not "remove".
> > 
> > And why do you think 'deprecating' something that many people 
> > like and use is ok ? 
> Eh? I'm not aware that any top-level task can be run in Ant 1.5.

There are few ( property, taskdef ). And it is proposed and it seems
many agree on allowing all of them ( just like it was in ant 1.0 ).

The current version of ProjectHelperImpl2 does allow them ( based on
Stefan's patch on the main branch ), and so you can use top-level
tasks now in 1.5, just like import :-)

I like having top-level tasks, I find it more convenient and clean - 
and since it doesn't inhibit your use case or preference 
I don't understand the oposition.

> What users lament is that if they "extend" a buildfile they don't want 
> to write
>   ant extendedbuild:compile
> but just
>   ant compile
> If you do compulsory rewriting of the names this is what happens...

No - I do rewriting only for the duplicated targets. 

The one in the 'main' build file will keep the name. All other
overriden targets will get a name based on the project name. 

If you accept the removal of super.super, then it would be
trivial to take the first overriden target and name it 'super.' 
instead of using the name - but I feel it's much cleaner to use
the name of the project ( i.e. what you use in <project name='' >),
it's more explicit.

For tasks that are not overriden - the original name remains.

> <include file="..."> includes one buildfile in another as-is, like xml 
> entities.

Using XSL semantics ( that duplicated targets in included files will be 
ignored ). 


> It should be able to rewrite names to prefix-targetname is specified as 
> <include prefix="prefix-" file="...">

I don't think it's needed - let's make small steps and see how people
use it and not add complexity until we are sure it is needed.

> <project name="" extends="buildfietoextend">
> ...
> </project>

Same comment here - I think 'extend' on a document is very confusing.
I've seen a lot of ugliness and complexity even in java, with overuse
 of extend creating nightmares.

XSLT just defines import and include - why would ant need more ?

As I said, I think we must be open - if you really need this we can
add hooks to allow this to be implemented using 'meta tasks'. I 
will vote -0 on it, at least for 1.6.

> What do you think?
> Does this make sense?

I don't think I'll use this, but if you really need it - I'm -0 :-)

I would do it as a task ( <extend> ) - and the hooks that are needed.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message