Over the years and after multiple investigations of OSGi, the OpenMRS Developer Community has decided not to invest further in adopting OSGi within OpenMRS.
Ben built a modular framework for us in OpenMRS when OSGi was still fairly early in its design. While the module framework within OpenMRS has been one of the platform's greatest assets, allowing for more rapid uptake and development across implementations, there are benefits to migrating towards OSGi, since it represents a increasingly adopted standard for modular frameworks.
The OpenMRS ticket for this work is TRUNK-1596.
The ideas for migrating toward OSGi are still very raw and largely undocumented. We have spoken with architects of the Eclipse OSGi framework, but are still in an investigatory stage.
One example to consider is Atlassian. They have migrated their plugins to OSGi and even supply an OSGi wrapper for backwards compatibility. They also have some useful documentation on their architecture.
Example exploratory steps to take: