Just another site

Archive for the tag “OSGI”

Install OSGI Bundles Using Maven

For my job I do a lot of CQ5 work. Often this involves creating OSGI bundles. To install an OSGI bundle you either have to put the bundle in /apps/myproject/install or manually install it in the Felix Web Console. Both of these methods get old after doing it multiple times.

Sling has a Maven plugin that simplifies this process by installing the bundle for you when you build the project. Simply add the following code to your pom.xml file for your Maven project and then select the install-osgi profile when building.


Or if you are using command line to build the project, add -Dinstall-osgi to the arguments. You can create as many profiles as you’d like for the different environments you may be working with (author, publish).


Post Navigation