I'm trying to deploy deltaspike in OSGi and hit an issue.
There's no specific discovery mechanism in place for OSGi, so the only way I found to have a bundle (the deltaspike example) be able to use extensions in another bundle (the deltaspike implementation) is to add a Require-Bundle header in the example pointing to the deltaspike implemetnation.
However, extensions are loaded using the ServiceLoader through the classloader created by AbstractWeldOSGiDeployment. This classloader uses Bundle#getResources() in order to discover the extensions. In my case, it can't work because the extensions file definition in the deltaspike implementation is not part of the classloader and not discovered.
I'm not sure yet which is the best to be able to use extensions from another bundle, so ideas welcomed.
I'd be happy to work on it once we settled the idea.