Expand my Community achievements bar.

SOLVED

Multi Site AEM in a same maven project

Avatar

Level 2

Is possible to have multi site within a single project maven where they don't use the same core, apps and content folders ?

 

For example in a same project maven I want to have a first site www.site1.com and second site www.site2.com and I want that the site1 has core, apps and content separate of the site2.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Modules are defined in the parent project POM file:

 

<modules>
<module>core</module>
<module>ui.apps</module>
<module>ui.content</module>
<module>it.tests</module>
<module>it.launcher</module>
</modules>

 

So, you can create site specific modules as per your business need in the parent POM. More details at [1]

 

[1] https://www.baeldung.com/maven-multi-module

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Modules are defined in the parent project POM file:

 

<modules>
<module>core</module>
<module>ui.apps</module>
<module>ui.content</module>
<module>it.tests</module>
<module>it.launcher</module>
</modules>

 

So, you can create site specific modules as per your business need in the parent POM. More details at [1]

 

[1] https://www.baeldung.com/maven-multi-module

Avatar

Employee Advisor

As @Jaideep_Brar already mentioned it's all about the maven structure.

 

You just have to create multiple sub-modules, which contain the bundle, the templats/components/dialogs for a single site. You need to ensure that both are not deploying to the same repo location and do not have clashing bundle names. But besides that it's pretty straight-foward.