OSGi Community Event 2018 Presentation by Amit Kumar Mondal (Deutsche Telekom AG) & Jochen Hiller (Deutsche Telekom AG)
Abstract: QIVICON is an Eclipse SmartHome based solution from Deutsche Telekom AG. It utilises OSGi to provide a modular Java runtime.
Since the beginning, QIVICON leveraged Eclipse PDE with Maven & Eclipse Tycho as its build technology but over the time, the complexity increased. It became hard to get an overview and manage the runtime and build dependencies. Especially maintaining target configurations for IDE and CI/CD build, having different embedded gateways for installation increased complexity significantly.
Bndtools is the 'swiss army knife' in the context of OSGi development since it takes the nitty-gritty pains and loads off the developer's chest. And that's why we decided to avail the benefits of Bndtools.
But, many other OSGi-based projects still cannot avail the benefits as they are very tightly coupled with Eclipse PDE. Want to make a switch from your existing PDE source base to Bndtools? This talk would give you an overview to proceed towards this.
We would like to further demonstrate in this talk how to set up a Bndtools workspace from an existing PDE workspace, convert all current projects to Bnd projects and embrace the OSGi-way of developing bundles.
Since QIVICON containing more than 350 projects utilised this solution to move to a higher modularity maturity level, this talk would, therefore, outline the pros, cons and the learnings using Bndtools in such a big OSGi project for embedded development.
2. 2
Meet The Speakers
Jochen Hiller
Seasoned Java Developer
OSGi and IoT Evangelist
Eclipse Concierge Committer
Developer Evangelist
Amit Kumar Mondal
Passionate Java Developer
OSGi and IoT Enthusiast
Eclipse Kura Committer
Software Engineer
Deutsche Telekom AG
Deutsche Telekom AG
9. 9
Single Workspace leads to
Smooth Induction to the
Project
Better Support of API
based Development
Explicit Dependency
Management
Higher Modularity
Maturity
Motivation
13. 13
Setting Up - Workspace
A single directory
with all its sub-
directories and their
files, similar to a git
workspace
Workspaces should
be named according
to the bundle
symbolic names of
its projects
Valid if it contains
a cnf file
The advised model
is to use a directory
with a
cnf/build.bnd file
14. 14
Setting Up - Workspace
P2 Repository
Bndtools uses repositories to manage dependencies at build and runtime
In Bndtools 3.3, P2 Repository Plugin has been introduced
15. 15
Setting Up - Workspace
Maven Repository
Maven Bnd Repository plugin provides a full interface to any type of
Maven repositories (Nexus or Artifactory)
16. 16
Setting Up - Workspace
runtime.maven
An archive is a ZIP, POM, JAR, or any other type of file
Contains a list of coordinates specifying an archive in a Maven revision
17. 17
Setting Up - Workspace
Directory Structure
Project Specific Config
https://bnd.bndtools.org
18. 18
Conversion - PDE to Bnd
Control File Conversion Command
Creates a Bnd project in the provided workspace with the symbolic name
The command will first parse the manifest to establish the BSN
22. 22
Finalizing Solutions
Milestone Set for Migration
2018
August
2018
July
Coping with the Current System
Finding Solutions
2018
Early September
Final Migration
24. 24
Challenges
Complex Infrastructure
Bnd cannot easily handle complex
maven based infrastructure, needed
tweaks, unable to process client certs
Windows Environment
The development is bit slower on NTFS
based systems.
Gradle also doesn’t work as efficient as
it works in Unix based platforms.
Integration Testing
Bnd ignores Fragments but most PDE
users write tests in Fragments
Multi-Project Sync
Integrating PDE with Bnd Projects
together makes Eclipse confused
25. 25
01 Organize Trainings and Hackathons
Adapt Tests during Migration02
Disable Antivirus Scanning in:
Eclipse,Workspace, .m2, .p2, .gradle, .groovy, .bnd, .eclipse
03
Learn BND Commands04
Insider Tips