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: antlibs and classloaders #2
Date Tue, 11 May 2004 17:31:12 GMT
Jose Alberto Fernandez wrote:

>>From: Stefan Bodewig [mailto:bodewig@apache.org] 
>>
>>On Mon, 10 May 2004, Jose Alberto Fernandez 
>><jalberto@cellectivity.com> wrote:
>>
>>    
>>
>>>Would the following solve this problem generically?
>>>
>>> <!-- 
>>>   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/>
>>>      
>>>
>>looks like a reasonable compromise.
>>
>>The alternative would be a built-in task that takes the 
>>antlib URI, this wouldn't even require any magic taskname.
>>
>><antlibresolve uri="..."/> or even <antlibresolve prefix="..."/>.
>>    
>>
>
>I have no problem, one way or another, as long as I do not have to type
>the whole URI again ;-) This is why I want to use the NS prefix instead.
>Is there an way for the task to get the information needed (the URI)?
>
>Since a lot of this is resolved by the parser (prefix-->uri) mapping,
>I was trying to make sure we do not get bog by the design. So as long as
>we can get the info necessary by just saying:
>
>   <antlibresolve prefix="mylib"/>
>  
>
This is not currently possible.
The prefix->uri mapping is only retained for the element names and the 
tag names
(using the  NS dynamic con
(The ant-type attribute is the only exception, but this is implemented 
by a horrid cludge, the
parser "knows" about "ant-type" and substitutes the value in).

>or
>
>   <antlibresolve mylib:ns="<ignored value>" />
>
>In this second, we get the URI from "ns" attribute which is in that
>space.
>the implementation could use the new NS aware features that were added
>recently.
>  
>
I assume you mean the NS aware dymanic configurator patch.
The second form of the antlibresolve task could use to implement the 
"antlib:ns" style
attribute, but it feels like a cludge.

Peter

>Jose Alberto
>
>---------------------------------------------------------------------
>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