ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: Namespaces in Ant
Date Sat, 03 May 2003 14:14:14 GMT
Nicola Ken Barozzi wrote:

> 
> Costin Manolache wrote, On 03/05/2003 8.22:
> ...
>> One use case I had in mind for CH was a namespace like "jmx:...",
>> where the JMXComponentHelper would use the JMX metadata to create the
>> task ( no ant table ). That's clearly outside the scope of antlib or ant
>> ( it's just a custom task ).
> 
> This seems interestig, and brings up what XML namespaces can be used for.
> 
> It has been said that they can be used to separate the tasks/types
> loaded by different antlibs. But yesterday I was thinking of Java, and
> how import works... and I imagined having to write the full namespaces
> except for the Java one, as would happen in Ant with XML namespaces...
> ugh :-P

The URI can be declared only once, in the <project> element. 

And for most ant tasks the default ns will be used.


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

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.


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

Costin


Mime
View raw message