Skip to content

danielgospodinow/Calculator-OSGi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator OSGi

An OSGi example which illustrates core OSGi principles.

This repository contains two Maven projects: Calculator Consumer and Calculator Provider.

Both projects generate an OSGi bundle with the help of Apache's bundle plugin for Maven - one service provider bundle and one service consumer bundle.

For further details, check their README files in their respective folders.

In order to try out the example, you should run mvn clean install for both Maven projects and install the two generated bundles onto an OSGi container like Apache Karaf or Knopflerfish.

They should be generated in the following order:

The order in which the bundles will be generated matters! This is because the Calculator Consumer Maven project has a dependency on the Calculator Provider bundle and since Maven will store the Calculator Provider bundle into the local repository after the Maven install command, the consumer bundle will resolve it.

The generated bundles can the found in the target folder in each project.

Notes

If you're planning to use Apache Karaf first be sure to install the Service Component Runtime. Just run in Karaf's command line the following command feature:install scr. Knopflerfish comes out of the box with this feature.