Hi I'm working on a project which requires identification and removal of unused jar dependencies from the osgi bundles to make them leaner. Maven bundle-plugin is used to create the bundle and I'm using a tool called JBoss tattletale <http://www.jboss.org/tattletale> to identify unused jars, duplicated jars in the project/bundle. However there are some gray areas I need to be clear about; please give me some suggestions/comments on the following questions.
Suppose I'm exporting a package foo.*; from a dependency jar (A.jar) in the bundle, as a result all the classes of foo pckg are in-lined/added to the bundle classpath. Suppose there's a class foo.Bar.java in th pckg which imports a class from B.jar, and I remove B.jar (which is assumed to be an unused embedded dependency as per my tool to identify unused jars). Now the bundle doesn't have B.jar in it's class-path and it still exports foo.* pckg in A.jar in the bundle. My 1st question is, will the maven bundle plugin throw any compilation errors because the transitive dependency of foo.Bar class is not satisfied as B.jar is no longer in the bundle classpath, or will it compile and export pckg foo.* without any compilation error, which may result in a run-time exception when trying to load foo.Bar class in the bundle at runtime? Will removing unused embedded dependencies from a bundle cause errors in cases like java reflexion used in the bundle ?(eg: Class.forName loading of a class which is removed from the bundle as a result of removing unused embedded dependencies) Thanks, -- Dileepa Jayakody,

