ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: Namespaces in Ant
Date Sat, 03 May 2003 21:23:24 GMT

Costin Manolache wrote, On 03/05/2003 16.14:
> Nicola Ken Barozzi wrote:
>>I think that XML namespaces really make things much more difficult to
>>write and understand. One thing I don't like in Jelly is just this use
>>of namespaces, where all scripts seem cluttered and simply difficult to
> I agree - in most small build files, with few libraries and no conflicting
> names it is simpler to not use ns. 
> I don't think anyone is sugesting to make ns required for 1.6 ( we need
> to keep backward compat ). Even for antlibs, I think the ns should be an
> option.

Ok, but namespaces are a "heavy" way of doing separation. ATM I don't 
think that that it's good if they are not always used (and I don't like 
much to see them used).

>>This is why I favor that Antlibs work similarly to java imports, where
>>there are no prefixes *except* when specified, and then I would *not*
>>make prefixes free, but use the "standars" full name for that Antlib.
> Can you give an example ?


Every antlib descriptor should contain not only the names of the tasks 
but also the namespace of the antlib.
When Ant loads the tasks, it does it with two names, so that the task 
can be called with short or the fully qualified name.

   <antlib location="antcontrib.jar"/>

   <!-- I can call it on both ways -->

In the case that a library declares a task with the same name of one 
already loaded, Ant should load the fully qualified name version and 
change the short-name version to output an error about clashing names.

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

View raw message