Expand my Community achievements bar.

SOLVED

AEM Cloud multi module project

Avatar

Level 4
Level 4

Hi All, 

What would be the recommended approach for adding a new module for AEM Guides in existing AEMaaCS project structure based on Archtype 23. 

shoule we create a module or create a separate project or any other approch. Can someone please share pros and cons of both the approaches?

 

TIA

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@nj2 No need to create a complete new one. Generate a new project and comment out the unnecessary modules

 

for ex: as in the multi tenant structure i suggested dispatcher will be a individual tenant, so you can comment out the dispatcher module in the new generated code and then move the dispatcher code to the individual dispatcher tenant. 

 

In the similar case for UI frontend. We have done this solution for multiple clients and currently working on the same.

 

In cloud manager you can not have 2 repository projects deployed to same environment with different piplelines. It will overwrite the existing project. You can DM me I can explain you in a better way. 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @nj2 

 

In AEMaaCS If you need to create a mult-tenant or multi module projects. Make sure you generate the default project from the cloud manager repository and use below script to generate the individual tenants modules.

mvn -B archetype:generate `
  -D archetypeGroupId=com.adobe.granite.archetypes `
  -D archetypeArtifactId=aem-project-archetype `
  -D archetypeVersion=23 `
  -D aemVersion=6.5.0 `
  -D appTitle="First App Example" `
  -D appId="first-app" `
  -D groupId="co.dlighthouse.aem.firstapp" `
  -D frontendModule=none `
  -D includeExamples=y `
  -D includeDispatcherConfig=n

https://www.dlighthouse.co/2020/06/creating-aem-application-using-adobe-archetype-23.html

 

Below are observations:

1. Make sure that dispatcher is a individual tenant on top of all tenants. Remove the dispatcher in individual tenants

2. In the main parent pom.xml make sure you add the individual modules to build

 

 

Avatar

Level 4
Level 4

thank you @Jagadeesh_Prakash , If I want to add a new module to my existing project, do I need to create a completely new one. That approach does not seem appropriate to me. It was created three years ago, and now I'd like to add one new module to it.

Avatar

Correct answer by
Community Advisor

@nj2 No need to create a complete new one. Generate a new project and comment out the unnecessary modules

 

for ex: as in the multi tenant structure i suggested dispatcher will be a individual tenant, so you can comment out the dispatcher module in the new generated code and then move the dispatcher code to the individual dispatcher tenant. 

 

In the similar case for UI frontend. We have done this solution for multiple clients and currently working on the same.

 

In cloud manager you can not have 2 repository projects deployed to same environment with different piplelines. It will overwrite the existing project. You can DM me I can explain you in a better way.