ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: DO NOT REPLY [Bug 37085] - problem refering jars specfied by Class-Path attribute in manifest of a ant task jar file, when this ant task jar file is located in a directory with space
Date Wed, 19 Oct 2005 21:23:19 GMT
Matt Benson wrote:

>--- Antoine Levy-Lambert <antoine@gmx.de> wrote:
>
>  
>
>>Hi,
>>maybe the simplest solution would be to change this
>>line :
>>
>>< File libraryFile = new File(libraryURL.getFile());
>>to
>>
>>    
>>
>>>File  libraryFile = new
>>>      
>>>
>>File(URLDecoder.decode(libraryURL.getFile()));
>>
>>Comments ?
>>    
>>
>
>It looks reasonable.  Does it fix the problem?
>
>  
>
Hello Matt,

yes, this fixes the problem.

If we have a way to check whether class path elements listed in the
Class-Path attribute of a manifest denote a protocol and ignore them
with the same warning message,
then we could make the algorithm even more simple and do not put URL in
the equation at all.

It sounds like the current algorithm does the following :

1) resolve the path of the jar explicitly listed in the classpath
according to ant's rules ( relative to the project directory when the
path of the jar is not absolute),
2) add to this path the path of each classpath element

the round-trip String -> URL -> String is only done with the purpose of
eliminating Class-Path entries like http://foo.com/my.jar or
jar://WEB-INF/lib/mylibrary.jar.

Cheers,

Antoine

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


Mime
View raw message