I get back with the example posted by @juergen-albert in the PR #5 that was working but not completely. After some tests I discoverd that Package.getPackages() is only providing packages that are known at the moment you call it. This means if a class of a specific package is not instantiated yet, the package will not figure out in the list.
Using a different way to read packages (by classes) we are able to retrieve everything we wanted and available in our project and classloader. It is surely a bit slower than the previous code.
With this way to share packages and using an Import-Package: * will allow each bundle to correcly have access to all the necessay classes for SLF4j.
What?
This PR is closing the Issue #12
I get back with the example posted by @juergen-albert in the PR #5 that was working but not completely. After some tests I discoverd that
Package.getPackages()
is only providing packages that are known at the moment you call it. This means if a class of a specific package is not instantiated yet, the package will not figure out in the list.https://stackoverflow.com/questions/13944633/java-reflection-get-list-of-packages/13944677#13944677
Using a different way to read packages (by classes) we are able to retrieve everything we wanted and available in our project and classloader. It is surely a bit slower than the previous code.
With this way to share packages and using an
Import-Package: *
will allow each bundle to correcly have access to all the necessay classes for SLF4j.