On Monday 28 April 2003 18:41, Nicola Ken Barozzi wrote:
> peter reilly wrote, On 28/04/2003 19.37:
> > On Sunday 27 April 2003 22:14, Wannheden, Knut wrote:
>
> ...
>
> >>but maybe the buildfile author wants/needs to specify the namespace URI
> >>(anything really), in which case an additional "ns" attribute could be
> >>used:
> >>
> >>    <antlib resource="${foo.jar}" ns="urn:antlib:foo"/>
> >>    <foo:bar xmlns:foo="urn:antlib:foo"/>
> >
> > This is fine.
> > <antlib file="${ant-contrib.jar}" ns="antlib:antcontrib"/>
> > <antcontrib:if xmlns:antcontrib ="antlib:antcontrib"....>
> > <target xmlns:antcontrib="antlib:antcontrib" name="compile">
> >    <antcontrib:propertycopy .../>
> > </target>
>
> This is *veeeeery* ugly. I like that Ant buildfiles are reasonably
> readable, and would like to have it maintained if possible.

True. It seems quite difficult to use namespaces in a nice way.
The niceest I can thing of is to place all the jars in
${ant.home}/lib and set the namespace up in the project declation:

<project xmlns:antcontrib="antlib:${ant.home}/lib/ant-contrib.jar"
             xmlns:antcontrib="antlib:${ant.home}/lib/antleope.jar">


Peter

Reply via email to