OSGi dependencies
October 9th, 2008 • Comments Off on OSGi dependenciesI like the OSGi platform, and I have been using it for quite a while. One of the most important things is to keep track of your dependencies (e.g. like preventing cycled dependencies). Auto-generated MANIFEST.MF files are most of the time not really optimized. Therefor I started writing some python code to check dependencies.
It reads in all the MANIFEST.MF files from the bundles and creates a dependency graph. It will look for unnecessary and unneeded imports and exports. Look for cyclus etc. It is written using the networkx library for python. Also useful is the zipfile extension in python 🙂 It can be used to extract the jar files of bundles.
Is there a reason you just don’t use Eclipse? (PDE)
This is already handled for you.
Well yes I know. But those plug-ins mostly look at Required-Bundle instead of the imports/exports. Also I do not get nice pictures. Also cyclic deps can be discovered but it is not told where they are 🙂 So the Eclipse stuff is really nice (I really like Eclipse) but some stuff is missing.
Also nice is the usage as a reporting tool in the nightly build/test environment 🙂