Easy-peasy OSGi Development with Bndtools - Neil Bartlett


Published on

Developing OSGi bundles is just too hard! That gnarly old manifest; listing all the imported packages (again!); writing all those XML files... who needs that kind of hassle?

My goal when I began development of Bndtools was to change this picture drastically: to make it actually _easier_ to develop and test OSGi applications, composed of high quality reusable bundles, than it is to develop "traditional" non-modular Java applications. Now with the help of a growing community of contributors and brave alpha testers, that vision is beginning to come true.

Bndtools is an Eclipse IDE for OSGi development, based on bnd. In this talk I will demonstrate the features of Bndtools that help to make it fun and easy to build bundles. I will also talk about: Declarative Services with Java annotations; OBR for release management and provisioning; and integration testing strategies.

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Easy-peasy OSGi Development with Bndtools - Neil Bartlett

  1. 1. Easy-peasy OSGi Development withBndtoolsNeil BartlettParemus Ltd21 September 2011 OSGi Alliance Marketing © 2008-2010 . All1 PageCOPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved Rights Reserved
  2. 2. Good News Everyone!Hardly any slides!
  3. 3. My Mission• To mercilessly destroy sources of OSGi pain and bafflement.• Make it easy to do the right thing, and hard to do the wrong thing.• Don’t just talk Best Practices... create them.
  4. 4. MakeOSGiFun!
  5. 5. “OSGi developmentcannot be made [...] easy or productive” – Rod Johnson (emphasis added for comic effect)
  6. 6. Bugbear #1• Require-Bundle is evil• Import-Package is a nightmare to maintain
  7. 7. But... The Packages are RIGHT THERE!!! package org.example.auction.basic; import org.example.auction.AuctionService; import org.osgi.framework.Constants; import org.osgi.service.event.Event; import org.osgi.service.event.EventAdmin;
  8. 8. D.R.Y.
  9. 9. Bugbear #2• The rules of versioning are not hard to understand, but...• Managing thousands of versioned packages is impossible• Therefore version only bundles, or ignore versioning entirely
  10. 10. Bugbear #2• Managing thousands of versioned packages is impossible... FOR HUMANS• Use the machine!
  11. 11. Pure API Bundle api 1.0.0
  12. 12. Service Provider api [1.0,1.1) api 1.0.0
  13. 13. Service Consumer api
  14. 14. Without API Bundleapi [1.0,1.1) api 1.0.0 api
  15. 15. With API Bundle api 1.0.1api [1.0,1.1) api 1.0.0 api
  16. 16. Oops! api 1.0.1api 1.0.0 api
  17. 17. In-Container Testing OSGi Framework Bundles Under Test Auction Event ... Server Admin Test Bundles Test Test ... Bundle 1 Bundle 2 JUnit Runner
  18. 18. But I Use Maven!• Maven and Bndtools, sitting in a tree, k.i.s.s.i.n.g.
  19. 19. Bndtools: Maven:• Designing Bundles • Build dependencies• Instant Build/Run • Repeatable offline builds• Bundle Analysis • Reports
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.