...
We have identified a few concrete steps we can take to move Fedora's Module Architecture forward:
Document, maintain, and apply best practices for being "OSGi Friendly"
Change Fedora's Modules to use a modern dependency injection framework (Spring and/or Guice)
Retain the long-term goal of having a Fedora OSGi bundle that can be used by other apps
...
Interested Contributors: Dan Davis,
Andrew Woods,
Asger Askov Blekinge
OSGi Friendliness
What can we do to make Fedora more OSGi-friendly (ideally, without building in any runtime dependencies on OSGi)?
- For jars that are intended to be usable by other projects, build them with the maven-bundle-plugin so they include OSGi metadata.
- Put APIs and implementation details in different packages. Two common conventions in the OSGi world are to use an ".internal" or ".impl" suffix on packages that contain implementation details. If you use the maven-bundle-plugin, such named packages will not be exported by default.
- If possible, avoid using libraries that are known to be problematic in OSGi environments, or require third-party repackaging in order to work in OSGi environments. Well-known examples include:
- commons-logging (no longer a problem for Fedora: see FCREPO-630)
- jersey (see FCREPO-540)
Dependency Injection Framework
...