0 Replies Latest reply on Oct 21, 2011 5:51 AM by dileepajayakody

    Can I use tattletale to scan an OSGI bundle to identify duplicate,unused and missing classes in the bundle-classpath?

    dileepajayakody

      Hi all,

       

      I'm a newbie to both tattletale and OSGI. I'm in the process of scanning a set of osgi bundles to find duplicate jars,unused jars, duplicated classes in the bundle class-path. My objective is to remove unused jars inorder to make the bundle as lean as possible.

      I'm using tattle 1.1.2 tool since it turned out to be the most easy-to-use tool to get an overview of the classpath of the scanned project.

      What I do is basically extract the bulky bundle and generate the tattletale report from bundle-root.

      In doing so, I found many cases of unused jars being embedded as dependencies in the pom.xml of the projects as per the generated tattletale report. I removed them and started the bundles without any compile-time or osgi-start-time exceptions. I'm yet to findout if they throw any runtime exceptions.

       

      However I'm not fully convinced on how tattletale provides a report on unused jars in an osgi bundle. Can someone please explain how tattletale scans a bundle class-path by answeing the below questions I got?

      • Does tattletale only check for jars in the classpath to generate the report?
      • Does it check  plain classes in the bundle classpath (eg: classes in exported packages are inlined and added to bundle classpath)?
      • When identifying dependencies does tattletale also consider about dynamic classloading cases (eg: class loading via java reflection)
      • Does it check the imported classes in a particular class-loading hierarchy? 

      In general please provide a guide to understand how tattletale scan a project to provide a report on class dependencies,unused jars.

       

      Thanks,

      Dileepa