ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariano Benitez <mari...@fuegolabs.com>
Subject Re: taskdefs inside an antlib and their classpath
Date Fri, 05 Mar 2004 20:04:17 GMT
the problem is that they cannot be relative :(

the situation is:

to be honest, I was trying to lock the application jars by not leaving 
them in the antlib classpath and using the classpath element in the 
taskdef to load them on demand. I can live with it, no big problem.

The only real bug would be that the taskdef do not throw any warning 
when it is ignoring the taskdef classpath, loaderref, etc.

In this case I would suggest that taskdef logs a warning or fails if you 
defined extra classpath inside an antlib.

MAriano

Jose Alberto Fernandez wrote:

>Your antlib definitions live inside some Jar (yes?)
>Then you could use the Class-Path attribute of the Manifest
>to point to the additional jars. Al long as the addresses are relative
>all should work fine and the classloader will do the right thing.
>
>Would that work for you?
>
>Jose Alberto
>
>  
>
>>-----Original Message-----
>>From: Mariano Benitez [mailto:mariano@fuegolabs.com] 
>>Sent: 05 March 2004 18:22
>>To: Ant Developers List
>>Subject: Re: taskdefs inside an antlib and their classpath
>>
>>
>>would it be very crazy to add a classpath atlibdefinition 
>>that would add 
>>jars to the antlib classpath instead of getting ALL the jars from a 
>>directory.
>>
>>My problem is that I would like to keep only the task 
>>definitions in the 
>>antlib directory and the other dependent jars in a common lib 
>>directory 
>>with other jars that should not be loaded by the antlib class loader. 
>>Besides, the files location is defined based on properties, I cannot 
>>know that location when ant starts.
>>
>>I will investigate a bit on that to see if it is easy to implement 
>>another antlibdefinition class for this.
>>
>>MAriano
>>
>>Mariano Benitez wrote:
>>
>>    
>>
>>>Hi!
>>>
>>>   Is it possible to define another classpath for a task definition
>>>inside an antlib?
>>>
>>>I've read the Definer class and if it is inside an antlib, it uses
>>>that classloader instead of creating a new one with the 
>>>      
>>>
>>additional jars.
>>    
>>
>>>Is this desired behaviour? if it is, you should log a warning saying
>>>that whatever you define as classpath in an antlib.xml is 
>>>      
>>>
>>not considered.
>>    
>>
>>>Otherwise, I will report the bug :)
>>>
>>>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
>
>  
>

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


Mime
View raw message