You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Justin Edelson <ju...@gmail.com> on 2010/01/11 23:05:17 UTC

testing optional dependencies

I was thinking about this in terms of Sling recently, but it's obviously a
problem for any OSGi project and is top of mind due to the HttpService
thread about this...

It's reasonably easy to tag an imported package as optional, but that
doesn't actually make it optional and IMHO a badly tagged import is worse
than an unnecessary one (in other words, I'd rather add a bundle which
wasn't necessary than get a ClassNotFoundException).

Any thoughts on the best way to test that a dependency is in fact optional?
It seems like something you could do manually with Pax Exam, but I wonder if
there's some automated way of doing it or at least a smoke test that the
bundle starts with only the non-optional packages.

Justin