Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

how to create osgi module to manage runmode configurations

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

2 Replies

Avatar

Community Advisor

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

Avatar

Correct answer by
Employee Advisor

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