Assuming I have the following context:
1. Project is inherited, the solution is pretty rigid, and we lack project know-how
2. Stakeholders pressure is pretty high, so a time-delivery balance has to be found, which usually means no-too-much-time-for-best-practices
2. Infrastructure architecture is composed standalone AEM instances, 1 author instance and 8 to 10 publish instances
3. I cannot (for now) figure out how to configure project to deploy bundle dependencies upon build (nor there is time to untangle the project configs and find a solution)
4. The only way I was able to install a third party dependency was to manually create an OSGi (bundle) and install it via system console (a process that is permitted and do-able still)
Now, in these circumstances (not ideal I repeat), my question is, which is the easiest/quickest way to have this bundle installed in all the publish instances. I am hoping to not end up installing it manually everywhere.
For example, for the .core bundle of an AEM project, in case Maven is instructed to install the .core jar in a location like /apps/project-packages/content/install, if I then create a content package with it and replicate it, this will install the bundle in the target publish instance. Is there something similar that ca be done, but with the third-party bundle/jar that I need to install ?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
One option is to create an additional maven module or project and embed these bundles.
The bundles could be hosted in a public/private repository or could be in local repository. Both embed are discussed on https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/
When you deploy this package, the embedded bundles would also get installed.
Views
Replies
Total Likes
One option is to create an additional maven module or project and embed these bundles.
The bundles could be hosted in a public/private repository or could be in local repository. Both embed are discussed on https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/
When you deploy this package, the embedded bundles would also get installed.
Views
Replies
Total Likes
But assuming I am not able to do this, as I stated at point 3, what other way is to deploy it in publish instances ?
I would add even a stronger constraint, that being that publish instances have the /system/console forbidden at infra level and we don't have yet a infra team that should have inhereted this part of the project so that it could at least help us by giving us access, so that we can at least install the bundle manually (if even that would be a pain).
Views
Replies
Total Likes
You can skip any detangling of existing dependencies, if you just create a separate maven project and install dependencies via its maven build.
Then deploy the main project.
Views
Replies
Total Likes
@aanchal-sikka I know about the usual ways to achieve this and the best practices. I was mostly interested in technical workarounds when, due to different reasons, like the the constraints I mentioned above, one is not able to do it properly, but rather needs a quick rather 'brutal" way to deploy bundle in remote publish instances, as a solution on short run.
But on long run, yes, I agree with your proposed ways. And for this, I will accept the comment as the solution, hoping still that discussion will still continue and we can deep dive into the subject with more ideas.
Views
Replies
Total Likes
The most feasible solution is to leverage AEM's existing project repository architecture and follow the same pattern used by the official aem-project-archetype. Within this structure, you can configure the filevault-package-maven-plugin in the Maven pom.xml file to embed third-party bundles alongside your project's core components. This approach ensures that the bundles are deployed automatically to all instances during the build process, eliminating the need for manual installation.
For example, you can modify your project's Maven configuration to include the third-party bundle in the package (see also core components all module for reference):
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.extensions.amp</artifactId>
<target>/apps/applicationID-vendor-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.examples.ui.config</artifactId>
<type>zip</type>
<target>/apps/applicationID-vendor-packages/application/install</target>
</embedded>
This configuration ensures that the third-party bundle is embedded as part of the Maven build and package deployment process. When the package is replicated to all author and publish instances, the bundle will be installed automatically in the /apps/[applicationID]-packages/application/install directory.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies