ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: antlib and classloaders
Date Fri, 02 Apr 2004 16:53:32 GMT
Jose Alberto Fernandez wrote:

>>From: Mariano Benitez [mailto:mariano@fuegolabs.com] 
>>....
>>
>>The context in which I say this is: I have a big application 
>>(www.fuego.com) that provides ant tasks to perform most of its admin 
>>operation,
>>it is a requirement to have the application installed and 
>>then define a 
>>property "fuego.basedir" that tells where the app is installed.
>>
>>The main problem is that I cannot bundle all the required 
>>files to use 
>>the application in a single antlib, it would be extremely big 
>>and hard 
>>to update/patch/etc. without lots of manual intervention.
>>
>>    
>>
>
>Have you thought about using the Class-Path attribute on the manifiest
>of the ANTLIB jar itself?
>  
>
This will not work too good as the jars get added to the global/default 
classloader
and this may cause conflicts (multi commons_xx.jar for example).
Peter

>If your libraries location are relative to your antlib-jar location
>(e.g., in a subdir) then that should work fine since Java will add 
>the jars to the classloader.
>
>  
>
>>My intention is to minimize the manual steps to have a fuego antlib 
>>working, so the xmlns:fuego="antlib:fuego.tools.ant" was 
>>great. Using an 
>>include.xml file is a good workaround but that implies that on every 
>>build besides the xml namespace they need to do one more 
>>step, that is a 
>>100% increase in the number or changes they need to run fuego. :)
>>
>>I guess that most big application might follow this kind of 
>>path, having 
>>a small antlib file, and refer to the dependencies that are in the 
>>application install dir.
>>
>>I completely agree that for most basic/optional (core) tasks would 
>>include all the dependencies in the antlib, but for a big app 
>>it is not 
>>possible. I guess my case is the one for tasks that are 
>>bundled in other 
>>applications.
>>For example, if the Tomcat guys bundle their tasks with them, 
>>why should 
>>you copy all the jasper stuff to an antlib instead of reference them 
>>from the antlib.xml
>>
>>
>>
>>MAriano
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>>For additional commands, e-mail: dev-help@ant.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


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


Mime
View raw message