Expand my Community achievements bar.

SOLVED

AEM archetype 23/24 - Maven Multi module Project with multi tenancy

Avatar

Community Advisor

Hello Team, @kaushal_mall 

 

I want to create a latest AEM maven archetype project using archetype version 23 or 24, which has new project/module name "all" which will generate single package/zip containing all other modules targeted output, via Cloud Manager we can only deploy all package.

 

Here If I want profile based builds for my local/DEV instances which is not AMS/Cloud, i am able to configure Profile based module builds, but how can i configure what to embed in all package in all/pom.xml via profiles?

 

Any insights?

 

Sample Project Structure:-

MyProject

      tenant1

            core

            ui.apps

      tenant2

            core

            ui.apps

      tenant2

            core

            ui.apps

      all

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

This can't be done via profile based embeds in all. Need todo via adding a "autoInstallPackage" profile to tenant 1 and tenant 2 ui.apps modules, then you can install them separately, instead of trying to embed them in the all package, which has the autoInstallSinglePackage profile

 

But this will not work in archetype 24. Need to submit Github issue.

 

Thanks @kaushal_mall 

View solution in original post

11 Replies

Avatar

Employee
Not understanding the question. Shouldn't all module embed both tenant1 and tenant2?

Avatar

Community Advisor
Ideally yes, But for local development work, if my Super project has 5 tenants, it is waste of resources to build/deploy all package with 5 tenants, is there any way we can embed only ex:tenant2 in all package via command line param/arguments/profiles?

Avatar

Employee
Have you tried adding a "autoInstallPackage" profile to tenant 1 and tenant 2 ui.apps modules, then you can install them separately, instead of trying to embed them in the all package, which has the autoInstallSinglePackage profile

Avatar

Community Advisor
Yes Kaushal, I did but it is just installing ui.apps but not bundle embed in it as that plugin is being not used with recent archetype.

Avatar

Community Advisor
Yes.. so what can be better options

Avatar

Employee
Unfortunately, I think the archetype should go back to embedding the core for each module in it's own ui.apps module and then that should be embedded in all.

Avatar

Community Advisor

Yes that would be ideal. What is the way forward for such request? We are having a new project proposes to build on aem 6.5.6 and we took Archetype 24 as base.

Avatar

Employee
I would open an issue on the archetype GH issue, and also do the updates manually on the project.

Avatar

Community Advisor
Thanks Kaushal this helps

Avatar

Correct answer by
Community Advisor

This can't be done via profile based embeds in all. Need todo via adding a "autoInstallPackage" profile to tenant 1 and tenant 2 ui.apps modules, then you can install them separately, instead of trying to embed them in the all package, which has the autoInstallSinglePackage profile

 

But this will not work in archetype 24. Need to submit Github issue.

 

Thanks @kaushal_mall