geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: xbean finder getURLs()
Date Thu, 25 Apr 2013 13:17:08 GMT

On Apr 17, 2013, at 3:22 AM, Romain Manni-Bucau <rmannibucau@gmail.com> wrote:

> Hi,
> 
> in org.apache.xbean.finder.UrlSet#getUrls we rely on META-INF (or "") to find jars. There
are cases where it doesn't work at all (a common case where i saw it is when you only have
META-INF/MANIFEST.MF which is consider for a single entry and not META-INF then MANIFEST.MF
- depends the build tool/zip format if i understood correctly)
> 
> the question are:
> 1) do we getresources("META-INF/MANIFEST.MF") too
> 2) why not simply querying the classloader which is very very often an URLClassLoader
-> if (yes) return Arrays.asList(classLoader.getURLs()); else currentImpl;
> 
> The 2 seems less correct but in practise i think it is more efficient - we can do both
too (testing URLClassLoader and if not adding MANIFEST.MF listing)
> 
> wdyt?

Hi Romain,
I'd be interested in some examples. What tools/jars don't contain a META-INF? But contain
META-INF/MANIFEST.MF?

Anyway, given that they (tools/jars) evidently exist, I guess 2) is ok. As you say, it may
be faster. Concern will be about changing the behavior. But if we get sufficient testing,
should be ok…

--kevan
Mime
View raw message