SlideShare a Scribd company logo
Easy-peasy OSGi Development with
Bndtools
Neil Bartlett

Paremus Ltd

21 September 2011




                                                           OSGi Alliance Marketing © 2008-2010 . All1
                                                                                            Page
COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved
                                                           Rights Reserved
Good News
   Everyone!

Hardly any slides!
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.
Make
OSGi
Fun!
“OSGi development
cannot be made [...]
 easy or productive”
   – Rod Johnson
  (emphasis added for comic effect)
Easy-peasy OSGi Development with Bndtools - Neil Bartlett
Bugbear #1


• Require-Bundle is evil
• Import-Package is a nightmare to maintain
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;
D.R.Y.
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
Easy-peasy OSGi Development with Bndtools - Neil Bartlett
Bugbear #2


• Managing thousands of versioned packages
  is impossible... FOR HUMANS
• Use the machine!
Pure API Bundle

      api 1.0.0
Service Provider

  api [1.0,1.1)   api 1.0.0
Service Consumer

         api
Without API Bundle

api [1.0,1.1)   api 1.0.0   api
With API Bundle
                       api 1.0.1




api [1.0,1.1)   api 1.0.0          api
Oops!
       api 1.0.1




api 1.0.0          api
In-Container Testing
                OSGi Framework
                                  Bundles Under Test


     Auction          Event
                                          ...
     Server           Admin




                                     Test Bundles


       Test            Test
                                          ...
     Bundle 1        Bundle 2




                   JUnit Runner
But I Use Maven!


• Maven and Bndtools, sitting in a tree,
  k.i.s.s.i.n.g.
Bndtools:             Maven:

• Designing Bundles   • Build dependencies
• Instant Build/Run   • Repeatable offline
                        builds
• Bundle Analysis
                      • Reports

More Related Content

PDF
Keynote: OSGi Past, Present and Future - Alex Blewitt
PDF
Structuring software systems with OSGi - Ulf Fildebrandt
PDF
Modular EJBs in OSGi - Tim Ward
PDF
Java 7 Modularity: a View from the Gallery
PDF
Lean and Easy IoT Applications with OSGi and Eclipse Concierge
PDF
Bndtools 101 - N Bartlett
PDF
What's Coming in Bndtools 3.0 and Beyond
PPT
Examples Of Creative Digital Solutions
Keynote: OSGi Past, Present and Future - Alex Blewitt
Structuring software systems with OSGi - Ulf Fildebrandt
Modular EJBs in OSGi - Tim Ward
Java 7 Modularity: a View from the Gallery
Lean and Easy IoT Applications with OSGi and Eclipse Concierge
Bndtools 101 - N Bartlett
What's Coming in Bndtools 3.0 and Beyond
Examples Of Creative Digital Solutions

Similar to Easy-peasy OSGi Development with Bndtools - Neil Bartlett (20)

PDF
OSGi Community Updates 2012
PDF
OSGi user forum dc metro v1
PDF
OSGi User Forum US DC Metro
PDF
Using OSGi to Build Better Software
PPTX
Intro to OSGi and Eclipse Virgo
PDF
OSGi Mars World in Action
PDF
VIB - Very Important Bundles
PDF
Tuscany : Applying OSGi After The Fact
PDF
Benefits of OSGi in Practise
KEY
OSGi in 5 minutes
PDF
OSGi tech session
PDF
Enterprise Applications With OSGi and SpringSource dm Server
PDF
OSGi Presentation
PDF
Best Practices for Enterprise OSGi Applications - Emily Jiang
PDF
OSGI in Java EE servers:Sneak peak
PDF
Osgi Sun 20080820
PPT
OSGi & Blueprint
PDF
OSGi introduction
PDF
OSGi In Anger - Tara Simpson
PDF
OSGi-enabled Java EE Applications using GlassFish
OSGi Community Updates 2012
OSGi user forum dc metro v1
OSGi User Forum US DC Metro
Using OSGi to Build Better Software
Intro to OSGi and Eclipse Virgo
OSGi Mars World in Action
VIB - Very Important Bundles
Tuscany : Applying OSGi After The Fact
Benefits of OSGi in Practise
OSGi in 5 minutes
OSGi tech session
Enterprise Applications With OSGi and SpringSource dm Server
OSGi Presentation
Best Practices for Enterprise OSGi Applications - Emily Jiang
OSGI in Java EE servers:Sneak peak
Osgi Sun 20080820
OSGi & Blueprint
OSGi introduction
OSGi In Anger - Tara Simpson
OSGi-enabled Java EE Applications using GlassFish
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
PDF
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
OSGi and Java 9+ - BJ Hargrave (IBM)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
OSGi CDI Integration Specification - Ray Augé (Liferay)
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
How to connect your OSGi application - Dirk Fauth (Bosch)
Ad

Recently uploaded (20)

PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Tartificialntelligence_presentation.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
August Patch Tuesday
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPT
What is a Computer? Input Devices /output devices
PDF
Architecture types and enterprise applications.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Group 1 Presentation -Planning and Decision Making .pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Tartificialntelligence_presentation.pptx
A novel scalable deep ensemble learning framework for big data classification...
NewMind AI Weekly Chronicles - August'25-Week II
Enhancing emotion recognition model for a student engagement use case through...
1 - Historical Antecedents, Social Consideration.pdf
Hindi spoken digit analysis for native and non-native speakers
gpt5_lecture_notes_comprehensive_20250812015547.pdf
O2C Customer Invoices to Receipt V15A.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
August Patch Tuesday
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Assigned Numbers - 2025 - Bluetooth® Document
What is a Computer? Input Devices /output devices
Architecture types and enterprise applications.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Zenith AI: Advanced Artificial Intelligence

Easy-peasy OSGi Development with Bndtools - Neil Bartlett

  • 1. Easy-peasy OSGi Development with Bndtools Neil Bartlett Paremus Ltd 21 September 2011 OSGi Alliance Marketing © 2008-2010 . All1 Page COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved Rights Reserved
  • 2. Good News Everyone! Hardly any slides!
  • 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.
  • 5. “OSGi development cannot be made [...] easy or productive” – Rod Johnson (emphasis added for comic effect)
  • 7. Bugbear #1 • Require-Bundle is evil • Import-Package is a nightmare to maintain
  • 8. 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;
  • 10. 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
  • 12. Bugbear #2 • Managing thousands of versioned packages is impossible... FOR HUMANS • Use the machine!
  • 13. Pure API Bundle api 1.0.0
  • 14. Service Provider api [1.0,1.1) api 1.0.0
  • 16. Without API Bundle api [1.0,1.1) api 1.0.0 api
  • 17. With API Bundle api 1.0.1 api [1.0,1.1) api 1.0.0 api
  • 18. Oops! api 1.0.1 api 1.0.0 api
  • 19. In-Container Testing OSGi Framework Bundles Under Test Auction Event ... Server Admin Test Bundles Test Test ... Bundle 1 Bundle 2 JUnit Runner
  • 20. But I Use Maven! • Maven and Bndtools, sitting in a tree, k.i.s.s.i.n.g.
  • 21. Bndtools: Maven: • Designing Bundles • Build dependencies • Instant Build/Run • Repeatable offline builds • Bundle Analysis • Reports