how to create osgi module to manage runmode configurations | Community
Skip to main content
bishnusatpathy_
September 14, 2018
Solved

how to create osgi module to manage runmode configurations

  • September 14, 2018
  • 2 replies
  • 740 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

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

2 replies

arunpatidar
Community Advisor
Community Advisor
September 14, 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

Arun Patidar
joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
September 14, 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