Hi, Matthias Neubert schrieb: > Hello, > > this time I have got an question about a best practise regarding Felix > and iPOJO > > BundleA contains only a Package with an Interface, which it exports. It > imports another Package with Interface from Interface-BundleB.(which is > needed for describing BundleA's Interface) > > Exp.: > > BundleB: > Export-Package: org.bundleB.ServiceB > > BundleA: > Import-Package: org.bundleB.ServiceB > Export-Package: net.bundleA.ServiceA > > An Implementation Bundle of BundleA's Interface (BundleAImpl) imports > BundleA's Packages for implementing it, and so also has to import > BundleB's Package: > > BundleAImpl: > Import-Package: org.bundleB.ServiceB, net.bundleA.ServiceA > > > My Intension is, to be shure that the bundles BundleA and BundleAImpl > allways import the same package from same BundleB (to avoid e.g. version > conflicts) > > My think it must be something like BundleA is reexporting Package of > BundleB and BundleAImpl shuld be forced to import BundleB-Package over > BundleA. > > Question: are there any best practises to achieve this?
I would not re-export bundleB package from BundleA. Rather I would tye the version used by BundleA closes to the version exported by BundleB and used by BundleA, e.g.: BundleB: Export-Package: org.bundleB.ServiceB; version=1.2.3 BundleA: Import-Package: org.bundleB.ServiceB; version=[1.2.3,1.2.4) Export-Package: net.bundleA.ServiceA I think this should do the trick. Regards Felix --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

