Search code examples
javamavenosgimaven-bundle-plugin

Use Maven to build OSGi application


I want to build an OSGi compliant multi-moduled application where I have all the required bundles in 3 folders after compilation. I am using maven-bundle-plugin and maven-scr-plugin to create the bundles.

What I want is to run this application in an osgi container (Equinox) with a single command, using a script hopefully. For this I believe I have to create a config.ini file listing all the bundles in the application.

Is there a way to generate this at Maven compilation time itself? Or is there a better way to get all the bundles in some folder structure so that the app can be run straight away?


Solution

  • Just have a look at Tycho and its different packaging types (e.g. eclipse-application).

    http://www.eclipse.org/tycho/

    http://wiki.eclipse.org/Tycho/Packaging_Types

    It is used for many commercial and open source applications.