OSGi allows for dependencies to be determined via Import-Package
, which just wires up a single package (exported from any bundle), and Require-Bundle
I believe Import-Package gives you looser coupling and should be preferred. I use it when declaring dependencies on packages that I don't own, such as slf4j, and I can swap implementations as I wish. I use Require-Bundle when the dependency is something I have control over, such as my own bundles, because any important change would have gone through myself anyway.