how to create osgi module to manage runmode configurations

bishnusatpathy_ 13-09-2018

Hi

Want to create osgi module similar to apps module in my project structure. Could any one help me out on this to get this done through maven archtype command. Currently the archtype command is creating apps, content, core.

Regards

Bishnu

Accepted Solutions (1)

Accepted Solutions (1)

Jörg_Hoh
Employee
14-09-2018

if you want to create a new OSGI bundle, just copy the existing "apps" folder including it's content to a new folder (say "apps1"),

then

  • Edit the toplevel "pom.xml" and add "apps1" as a new modul, so it looks something like

<modules>

  <module>apps</module>

  <module>apps1</module>

  </module>content</module>

</modules>

  • Edit "apps1/pom.xml" and change the bundleID.
  • Edit "content/pom.xml" and change the configuration of the content-package-maven-plugin to include the new bundle as well into the contnet package.

Jörg

Answers (1)

Answers (1)

Arun_Patidar
MVP
14-09-2018

Hi,

Please go through with below to see how to create osgi config and how to manage from repository for different run modes

Configuring OSGi

http://aempodcast.com/2016/apache-sling/demonstrate-slingosgiconfig-runmodes/#.W5t9G2aB1AY

Example : In your project you can see logger config is setup from repostory

/apps/YourProj/config/org.apache.sling.commons.log.LogManager.factory.config-YourProj