0

I'm striving to make work an osgi solution where it wasn't followed the "bundle approach", so any dependencies was embedded, some "random" packages was imported, and it was used:

<DynamicImport-Package>*</DynamicImport-Package>

So there is a bit of confusion...

Now, I removed that DynamicImport, and I'm importing all:

<Import-Package>*</Import-Package>

I'm using felix maven-bundle-plugin, when I check felix console I can see many unresolved packages, so first quite obvious question is: 1) Is it normal that import-package * creates transitive dependencies import too? e.g. My bundle A depends from B which depends from C, so in the manifest I see import C too ? I believe yes it is normal.

Now, I have some unresolved packages which I'm not able to understand which other direct dependencies are using them, so second question is: do you know a way to do that? I would like to know it to evaluate if I can get rid of some dependencies

Thanks in advance

Gamby
  • 585
  • 1
  • 6
  • 22
  • Are you able to share the generated META-INF/MANIFEST.MF file? There is a difference b/w importing a package, and specifying a "uses" as a 'hint' to an imported package about transitive dependencies. – Matt Pavlovich Jun 26 '17 at 16:49
  • If you embed your dependencies then the maven-bundle-plugin will create imports for them too unless you declare these packages as private. So you could try to remove the embedding. – Christian Schneider Jun 27 '17 at 07:19
  • Thanks guys, I don't believe my manifest.mf could help to answer my questions, if I'm wrong please explain how it could do. Thanks Christian, I'm convinced that in a perfect osgi world bundles should not embed artifacts, so surely I'm going to remove embedding – Gamby Jun 27 '17 at 15:05

0 Answers0