ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <>
Subject Re: conditional build
Date Thu, 16 Mar 2000 23:35:50 GMT

James Duncan Davidson wrote:

> > I suggested a while ago to have the concept of a <tasklib name="..."
> > classpath="...">
> > which allows developers to provide their own libraries of <tasks> like
> <xslt> or
> > others.
> > Then when declaring a task, one may specify the name of the tasklib it
> comes
> > from: <taskdef name="..." classname=... tasklib=name> or we could have
> <tasklib>
> >
> > declare these tasks directly in some form of descriptor. Something like
> taglibs
> > for JSP.
> >
> > That would allow people write anything they want and having it separate
> from the
> > ANT
> > distribution.
> Interesting. I think that you could achieve the same effect by having a
> classpath definition instead of a tasklib. Tasklibs sound complicated to me,
> especially when it should just be a taskname=classname mapping where the
> classname is a class on the classpath. Using this, the real problem that we
> have is the inability to expand the classpath at will for the scope of a
> project.

There are two reasons for wanting tasklibs and different classloaders:
(1) You want to have a way to say: this sub-build requires such and such support

      without needing to know it globally, which is required when using the

(2) After we have lots of people contributing lots of stuff, you want to be able
     isolate the libraries apart to avoid any nasty conflict, except for the ANT
core which
    lives in the CLASSPATH, each library can use its own stuff.

Additionally, having libraries may allow things like the library declaring its
own tasks,
so like core, the action of defining the library declares its tasks implicitly.
This is a
little more of work, but should not be difficult if we use XML :-)

If I ever get some time I'll try to work on it.

Jose Alberto

 Jose Alberto Fernandez               500 Oracle Parkway, M/S 9op4
 Development Manager                  Redwood Shores, CA 94065
 ORACLE Corp.                         Phone: (650) 506-8830
 Java Products Group                  Fax: (650) 506-7303
 Languages & Obj-Relational Tech      Email:

View raw message