While deploying custom bundles in AEM, there are instances where the custom bundles depend upon the Out of the Box services in AEM. If the custom bundle attempts to start before the Out of the Box bundles, then there are the possibilities of rising some issues with the startup. The objective of this article is to provide a technique to avoid such an issue.
As per the principles of OSGi, the bundles do not define their own start level at the build-time; the administrator or agent that installs the bundle into the framework defines it. Therefore, one can adopt the following directory structure to define start level of the custom bundle
where 21 is the bundle version for the custom bundle.
For more details, refer to the related Apache Sling documentation.