Announcing Eclipse PDE Integration for Apache Felix Karaf

I am pleased to announce that the Eclipse PDE integration for Apache Felix Karaf is finally ready for others to use.

Notable features include:

  • A Target Platform Definition that allows developers to target only the bundles found in Karaf distributions.
  • An Eclipse Run/Debug launcher configuration that configures Karaf to run inside the workbench transparently to the developer
  • A context menu item "Run on Apache Felix Karaf"
  • Automatic deployment of workspace projects to running Karaf instances without copying files

There is still work to be done but at this point the integration is very functional and saves time developing applications that run on Karaf.

I'm currently working on:

  • Prototyping a feature manager that allows the developer to run Karaf and have it provision various features just like in the features command group on the console
  • Integration with the Web Tools Platform project to support "Run on Server"
  • UI work that monitors the running server instances
  • Better integration with Maven projects

Unfortunately a lot of the work is in UI development and I'm not an expert in Eclipse UI development so it is going to be a little slower than the week I have spent putting all of this together (while learning!). The only exception is the better integration with Maven projects: I hope I'll get that done in an evening or two this week.

Eclipse PDE Launch Configuration for Apache Felix Karaf
Equinox Hook implements low-level services for workbench debugging
Apache Felix Karaf running in Eclipse PDE
GShell listing of OSGI bundles
Installing the OBR feature while running under Eclipse PDE
OBR Feature bundles in the OSGI bundle listing
PDE Manifest Editor launch shortcuts
Project context menu launch shortcut (Debug is also available)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Realtime Development Use Case

Hi Stephen,

I would like to ask if your plugin will help towards a use case of "realtime development" as I call it.

The use case in my vision works like this:

  • Upon creation of new project (this might be based on archetype, Maven style is desirable), simply running (with debug mode) the project will already provide some run-time debugging tools / infrastructure services
  • Eclipse is debugging the running project
  • Infrastructure services include:
  • The project opens two telnet ports, one for connecting to Felix console and one for the "project shell". Felix Shell TUI and Felix Telnet bundles installed.
  • The project shell is using JRuby Console, GroovyShell, MEVL, BeanShell, or any preferred choice shell. It is used for interacting with the running project.
  • The project also hosts a web site (using Felix HTTP Service / Jetty). Felix Web Console is loaded, therefore can interact with the project to add/remove/inspect OSGi bundles etc.
  • FileInstall bundle is used to monitor changes to bundle

After it happens, to develop the application:

  1. Create a class
  2. Press Ctrl+S (Save)
  3. Behind the scenes, Eclipse and the infrastructure services would compile this project, make a bundle and deploy it to the running project. Maybe using FileInstall.
  4. Go to the open JRuby console and inspect the newly created class
  5. Make changes/tweak the class and go back to step 2, re-iterate

Do you think it's a feasible/practical approach (for now) and have you seen a stack/tools that allow this kind of development approach?

Thank you Stephen.

Realtime Development Use Case

Hi Stephen,

I would like to ask if your plugin will help towards a use case of "realtime development" as I call it.

The use case in my vision works like this:

  • Upon creation of new project (this might be based on archetype, Maven style is desirable), simply running (with debug mode) the project will already provide some run-time debugging tools / infrastructure services
  • Eclipse is debugging the running project
  • Infrastructure services include:
  • The project opens two telnet ports, one for connecting to Felix console and one for the "project shell". Felix Shell TUI and Felix Telnet bundles installed.
  • The project shell is using JRuby Console, GroovyShell, MEVL, BeanShell, or any preferred choice shell. It is used for interacting with the running project.
  • The project also hosts a web site (using Felix HTTP Service / Jetty). Felix Web Console is loaded, therefore can interact with the project to add/remove/inspect OSGi bundles etc.
  • FileInstall bundle is used to monitor changes to bundle

After it happens, to develop the application:

  1. Create a class
  2. Press Ctrl+S (Save)
  3. Behind the scenes, Eclipse and the infrastructure services would compile this project, make a bundle and deploy it to the running project. Maybe using FileInstall.
  4. Go to the open JRuby console and inspect the newly created class
  5. Make changes/tweak the class and go back to step 2, re-iterate

Do you think it's a feasible/practical approach (for now) and have you seen a stack/tools that allow this kind of development approach?

Thank you Stephen.

Very useful project!

Dear Stephen,

I'm really excited about your project!

Will this be included in both/either official distribution of Eclipse PDE and/or Felix Karaf ?

I think your project is very beneficial to reduce the turnaround and barrier of entry to developing with Eclipse, Felix Karaf, and OSGi in general. I think more people need to get away from traditional/manual Java development and embrace the shoulder of giant that is OSGi (be it using Eclipse stack or "plain OSGi" i.e. Felix Karaf)

However OSGi development has been pain in the **** in some cases, later developments should smooth things out and your project is definitely one of the more helpful things in the community.

I did OSGi development with Spring-DM and Equinox. I've never done any Eclipse plugin development, perhaps intimidated by the size of Eclipse framework. Lately I was "leaving" OSGi due to numerous problems, IDE compatibility, slow develop-compile-test cycle, etc. however I can understand since OSGi is a "maturing" technology (i.e. not OSGi itself, but tools and processes around it).

I haven't experienced your plugin first-hand but simply looking at the screenshots I can imagine how amazing it is.

Hopefully your project will bring me and more developers back to OSGi again and for good. :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.