Domanda

How can I create multiple OSGi bundles for a CQ application using maven. I'm using the multimodule-content-package-archetype provided by adobe with Eclipse. What I'm trying to achieve is a logical separation in the bundles (like logging in one bundle and a specific business function in another (like a custom search)).

But the archetype is creating only one bundle folder by default. ie I can only create a single bundle with mixed functionalities as of now.

How can I solve this issue? Please Help.

San

È stato utile?

Soluzione

I'm not familiar with the multimodule-content-package-archetype but a good structure for this is to have a main pom that just points to the other modules, put your bundle modules in a "bundles" folder, and the CQ content package module, if you need one, under "content".

So with bundles foo and bar you'd end up with

pom.xml
bundles/foo/pom.xml
bundles/bar/pom.xml
content/pom.xml

where content/pom.xml has dependencies on the foo and bar modules and embeds their bundles in the content package, in install folders that CQ picks up when the content package is installed.

I suppose you can rearrange what the multimodule archetype generates like this, and then add as many bundles as needed under "bundles".

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top