We are using Adobe Day CQ for our deployment. We are currently creating OSGi bundles with gets deployed in CQ with all the services using maven-bundle-plugin.
Now we have a scenario where we do not want some services to get enabled in Publish instance but should be enabled in Author.
Is there a way where we can manage two bundles one for author with the services required for author and one for publish which are required on publish, using the same pom.xml ?
Or else is there any other way by which this thing can me managed.
Please help me in this regard.
We are right now using this for creating bundles:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
org.osgi.framework,
*;resolution:=optional
</Import-Package>
<Export-Package>
com.abc.platform.enow.aem.core.testing.*,
com.abc.platform.enow.aem.core.utils.*,
com.abc.platform.enow.aem.core.viewhelper.*,
com.abc.platform.enow.aem.core.search.*
</Export-Package>
</instructions>
</configuration>
</plugin>
We have achieved this by using the runmode property for CQ. We did the below:
Thanks for the reply, but we found this solution more flexible and feasible.
Regards, Vaibhav