Source: Click to open the link
 
Eclipse allows to define dependencies between plug-ins Based on bundle or on package level. in the manifest. mf of the plugin. XML you can tell that your plug-in shocould either depend on another plug-in (and all its exported packages) or if your plug-in shocould
Only depend on the availability of certain packages no matter which plug-in is exporting this package.
 
The corresponding statements in manifest. MF are require-Bundle: or import-package:
 
Today I got the question what approach shoshould be preferred.
 
I believe the preferred way shocould be to use import-package because the coupling between the plug-ins is not that tight. as only as one plug-in exports this package the other plug-in will be fine. with this you can replaced a plug-in without changing the other
Plug-ins.
 
Of course if you have the same package in different plug-ins then you have to use the plug-in dependency.
 
The other advantage of plug-in dependencies is that the dependency is very clearly explicit, with the import-package it is not immediately obvious which plug-in is contributing this package.
 
But in total I wowould argue that loose coupling is always better so in general import-package shoshould be preferred.
 
 
There is also an article about osgi bundle dependency: osgi
Bundle dependency