ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: antlibs and classloaders #2
Date Mon, 10 May 2004 16:42:55 GMT
> From: Mariano Benitez [mailto:mariano@fuegolabs.com] 
> 
>
> So, I am thinking of the following workaround for the 
> complete scope of 
> the problem:
> 
> I create a task <antlib> that performs would look like this:
> 
> <antlib property="fuego.antlib.defined">
>     <classpath>
>         <fileset dir="${fuego.basedir}/lib">
>             <include name="fuegoexpress-antlib.jar"/>
>             <include name="fuegoenterprise-antlib.jar"/>
>             <include name="fuegoj2ee-antlib.jar"/>
>             <include name="fuego-test-antlib.jar"/>
>         </fileset>
>     </classpath>
>     <typedef package="fuego.tools.ant.enterprise"/>
>     <typedef package="fuego.tools.ant.express"/>
>     <typedef resource="fuego/tools/ant/j2ee/antlib.xml"/>
>     <typedef resource="fuego/internal/test/ant/myFile.xml"/>
> </antlib>
> 

Would the following solve this problem generically? 

<project name="X" xmlns:mylib="antlib:my.library.package">

 <!-- 
   This task is automatically available for every ANTLIB
   and its only function is to force the loading of the library
   if necessary. Force the lazy loading.
  -->
 <mylib:antlibresolve/>

</project>

The above assumes somehow we manage to define the classpath required
as part of the ANTLIB itself. If not, the task could have the classpath
information.

This looks much better than calling some task from the antlib with
doggie 
parameters.

What do people think?

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message