Richard S. Hall wrote:
>> If I have an OSGi bundle and I want to export all my resources in
>> META-INF, I should export the "package" META-INF? There's no way
>> to export an individual resource?
>
> Conceptually, you are correct, but in practice that really doesn't make
> a lot of sense in pure OSGi since in this model you want to be able to
> see more than one (or all) META-INF "packages", but a bundle importing
> "META-INF" will only be able to see it from one bundle.
>
> This is why the extender pattern is used here, since it probes all
> META-INF directories, which is what you want.
The problem is we're not in a pure OSGi environment. In many ways OSGi
is just an implementation detail. At best we're in a transitional stage
where things need to work in an OSGi and non-OSGi environment.
If there's a way to probe all the META-INF directories, why can't the OSGi
class loader do that when I try to load a resource?