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 Mon, 05 May 2003 06:05:24 GMT

peter reilly wrote, On 04/05/2003 2.03:
> I would agree with most of what Nicola says. I think
> that XML ns is a "heavy" solution for name clashing
> of names defined in a antlib. Moreover I do not
> think that the antlib needs to define a qualified name.
> The "prefix" attribute idea of the <property/> task could
> be used - even with the current <typedef/> command.
> <typedef resource="net/sf/antcontrib/"
>          prefix="antcontrib"/>

Yes, I'm aware of this proposal, but since we are now doing imports, 
it's IMHO more consistent and easy for users to have a "namespaced" name 
defined up front.

> Costin's idea of using "jmx:..." as a NS URI, seems to be a better
> fit for using XML NS.
> I think that another idea would be the use case of documenting
> the build script. Something like the equalivant to javadoc for
> ant scripts. Something like this should be in xml, but it does
> not need to be processed as part of a build.
> Something like the following:
> <project default="t" xmlns:antdoc="">
>   <antdoc:comment>
>     The target t is the default for this project
>   </antdoc:comment>

Hmmm, in Ant there is already the <description> tag and attributes... 
IMHO it's simply more consistent to simply make it appliable to all tasks.

Personally I would kinda like this, with XML comments. It's quite easy 
to make a Filter that outputs javadoc-like info for every tasks it 
finds, by using the comment just before itself.

      The target t is the default for this project
  <project default="t">

   <!-- This is simple test -->
   <target name="t">

     <echo message="hello world"/>

     <!-- The following should be an ok ant task  -->
     <echo message="a message within an ant doc comment"/>

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

View raw message