Twitter github

OSGi, PDE and Where’s Waldo

I was reading over the OSGi survey results and noticed that people found that obtaining valid bundles is still a problem. I agree. I find obtaining bundles or setting up my development target akin to playing a game of Where’s Waldo.

Where's Waldo

As you can tell, I was never a fan of the game, but for some reason my family loved getting those books.

Last week, the PDE team had a little meeting of the minds to help think of ideas to tackle parts of that problem. There’s a lot more we can do to improve the developer experience around managing bundles since p2 is around now.

The PDE team is looking at improving the target definition story again. One aspect of the improvement is making targets managed by a p2 profile. This would make it easier to manage the target in the long run and potentially expose cool things you can do with targets. The aspect I’m mostly interested in is improving the developer experience and workflow with PDE.

I remember when I first started developing bundles, one big problem was just setting up your environment and finding the correct bundles. I remember staring at my Java source files and seeing evil compile errors for missing imports like this commons collections one.

Missing Imports

Wouldn’t it be nice to take advantage of p2 repositories to help solve that problem?

pde2

p2 repositories are rich with metadata and you can query them for many interesting things like packages.

Add Artifact

You can also query for things like bundles.

pde4

Heck, if you’re adventurous, you can also query for features!

pdefeatures

Since the target platform is managed by p2, the necessary artifacts will be downloaded and available for you to use.

pde5

No more compile errors!

pde6

We can see that the commons collections bundle is now part of our dependencies.

pde7

That’s just one example of how to improve the bundle developer workflow using p2. The PDE team is exploring many options so if you have ideas on how to improve developer workflow, please let the PDE team know.