Tuesday, May 26, 2009

Apache Felix Karaf in Eclipse PDE

Apache Felix Karaf is an OSGi based application framework that is the core for the Apache ServiceMix projects. I use Eclipse for my Java developement and wanted to have the benefits of development in the Eclipse PDE with the Karaf platform features (hot deploy, GShell based console among other things). This little project service two purposes: I get to learn about Eclipse plugin development and I get Apache Felix Karaf running in PDE! I have a first version working with the following features:

  • My Eclipse plugin builds are based on the Karaf Maven artifacts and require no changes to Karaf
  • An Eclipse Target Platform definition plugin is created with the exact system bundles as in Karaf (including both Felix and Equinox OSGi frameworks)
  • Configuration is done using native Karaf configuration files -- no special magic is used
  • Launching is done via the org.apache.felix.karaf.main.Main class
  • The boot classpath is the same during the Eclipse launch as is the set of packages exported by the system which keeps the development and deployment environments in sync. You'll appreciate this if you have done any significant OSGi development.

Things that are left to do:
  • Provide a Karaf specific tab to make it easy to configure common Karaf options
  • Easy access for starting the Remote Console along with the port to listen on
  • Easy access for starting the Local Console
  • Pull in more features for NMR and ServiceMix support so that a features profile can be selected

Here are some screenshots to get you started:

No comments:

Post a Comment