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

