After reading some more about OSGi, I was first happy that I found BundleActivator, which seemed to be exactly what we wanted for Smack's initialization use-case. But then again, BundleActivator is a interface of the OSGi framework, which means that if we want to use it in Smack, we had to introduce a hard dependency on osgi-core, but this violates Smack's minimalistic principle and also raises the question how to deal with Android.
In order to provide OSGi users a convinient way to initialize Smack's extensions, experimental and legacy subproject/bundle, I refactored the initializers so that every bundle provides a single initialze() method (instead of two). The idea is that OSGi users now only have to call e.g. o.j.smack.initializer.ExperimentalInitializer.initialize() in order to init the Providers and static code of the smack-experimental bundle.
If only OSGi would fallback to using reflection for BundleActiviator while using more simple start() and stop() methods, namely ones without argument. Then we could simply point to the Initializers in the manifest and OSGi users wouldn't have to deal with this at all.
@Jens: Do you happen to know a place where I can report OSGi feature requests? And, as always, would be great if you could grab my osgi branch of Smack and report back if it works out for you. Thanks.