ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Antlib use q.
Date Mon, 06 Oct 2003 15:09:21 GMT
OK. But then why don't you default 'resource' to the same value than you do
in the shortcut declaration?

Axis on Ant's classpath (in ant/lib for example, or in a -lib axis-dir):

<project name="xyz" xmlns:axis="antlib:org.apache.axis">
  <axis:task />

Axis NOT on Ant's classpath, but in a custom path:

<project name="xyz" xmlns:axis="antlib:org.apache.axis">
  <typedef uri="antlib:org.apache.axis">
  <axis:task />

If think that if someone chose to specify his AntLib XML definition file to
the default name looked up by Ant is to not have to specify it explicitly
all the time. I a future AntLib writer, that's my thinking anyhow.

The example above (currently invalid) illustrates the fact that both forms
are equivalent, except for the explicit association with a custom classpath
for a given AntLib (thru it's URI).

It's a detail, but it saves typing, and makes sense I think.

Thanks, --DD

> -----Original Message-----
> From: peter reilly []
> Sent: Monday, October 06, 2003 3:14 AM
> To: Ant Developers List
> Subject: Re: Antlib use q.
> Opps,
> The xmlns:axis NS mapping is not needed in the type def. It is needed
> when the NS uri is used.
>        <typedef uri="antlib:org.apache.axis"
>                 classpathref="axis.classpath"
>                 resource="org/apache/axis/antlib.xml"/>
>    <axis:task xmlns:axis="antlib:org.apache.axis">
>    </axis:task>
> The NS prefix -> uri mapping may be of course be in any enclosing element.
> Peter
> On Monday 06 October 2003 09:04, peter reilly wrote:
> > You need to add the resource attribute:
> >       <typedef uri="antlib:org.apache.axis"
> >                classpathref="axis.classpath"
> >                resource="org/apache/axis/antlib.xml"
> >                xmlns:axis="antlib:org.apache.axis" />
> >
> > Peter

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

View raw message