Hello AEM Community,
We are merging three separate AEM repositories into a single repository. However, merging the repositories alone is not enough. We need to ensure that:
- A single OSGi bundle is created, consolidating all functionalities.
- The merged project retains all existing features, workflows, and services.
Has anyone in the community gone through a similar process?
What best practices, recommendations, or pitfalls should we consider when merging multiple AEM repositories?
Your insights would be greatly appreciated!
Thanks in advance for your help.
Best regards,
Suneetha
Views
Replies
Total Likes
Hi @SuneethaKo ,
The best practice is to not have multiple repo in adobe cloud. Rather you can have one single repo and have multiple tenants in the single repo.
https://www.comwrap.com/en/blog/multi-tenancy-with-adobe-cloud-manager.html
-Tarun
Thanks, @TarunKumar
Could you provide more details on how this can be achieved? Specifically, I’d like to understand the best approach for merging three separate repositories into a single repository while ensuring a streamlined build process.
Currently, we have three separate repositories, each with its own pom.xml, and we need to build them individually every time. Our goal is to merge them into a single repository so that the entire project can be built at once in a single build process.
If you have any documentation or references that outline best practices for this, please share them. Your insights would be greatly appreciated!
-Suneetha
Views
Replies
Total Likes
@SuneethaKo You can try Git Submodules for bringing in all the repositories together. Refer to the documentation [0], [1].
[0] - https://blogs.perficient.com/2023/12/20/basic-multi-tenant-model-for-aem-as-a-cloud-service/
Hi @SuneethaKo ,
Is it for AEM Cloud?
If you could explain why you need to create a single OSGI bundle and consolidate everything, I might be able to suggest you some specific solution.
We deploy multiple projects repositories to AEM Cloud that are managed by different teams within the organization as you might already know all the repos will have to be deployed together as a one project in AEM cloud, in order to do that we use git submodule feature.
You create an aggregator project that has all the other repos which need to be deployed as git submodules, this approach has little bit more overhead but is very flexible for accommodating the needs of multiple repos.
Cheers
Views
Replies
Total Likes
Hi @pm31415
It is AEM 6.5
why you need to create a single OSGI bundle and consolidate everything because
Currently, we have three separate repositories, each with its own pom.xml, and we need to build them individually every time. Our goal is to merge them into a single repository so that the entire project can be built at once in a single build process.
If you have any documentation or references that outline best practices for this, please share them. Your insights would be greatly appreciated!
-Suneetha
Views
Replies
Total Likes
Hi @SuneethaKo,
I suggest you create a dedicated Maven module for each sub-project and include it in a single Git repository. This will enable you to deploy all or just one module. This setup works on both AEM 6.5 and AEMaaCS in case you plan to move to the cloud later. You will need to move some code around, align dependency versions, and create a common module to avoid dependencies between your sub-projects, but it will be worth the effort.
Regarding deployments, please refer to https://meticulous.digital/blog/f/speed-up-local-development-in-multi-module-aem-projects
- main-project
--all
pom.xml (embed and deploy all modules/packages)
--module-1
--core
--ui.apps
--ui.config
--ui.content
pom.xml (include only the dependencies you need for this module)
--module-2
--core
--ui.apps
--ui.config
--ui.content
pom.xml (include only the dependencies you need for this module)
--module-3
--core
--ui.apps
--ui.config
--ui.content
pom.xml (include only the dependencies you need for this module)
--common
--core
--ui.apps
--ui.config
--ui.content
pom.xml (include code reusable across modules so modules don't depend on each other)
pom.xml (manage all dependency versions)
Good luck,
Daniel
Views
Replies
Total Likes