I\'ve recently written a small specialist scripting language and used the Maven to export an OSGi compliant bundle that also exports a service descriptor into the \"ME
Just to chime in that there is a standard general solution to consuming these types of services in an OSGi environment, as ScriptEngineFactory is not the only such case. It is a part of the OSGi Enterprise spec. and the reference implementation can be found here: http://aries.apache.org/modules/spi-fly.html
It is trivial to recreate the functionality of the Apache Spring classes via this mechanism, and imo this method is far cleaner and more sensible, but I do understand the desire to avoid reimplementing the wheel so to speak.