Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Project structure

Avatar

Level 5

I'm trying to figure out the post structure for my eclipse projects. I'm keen to separate out as much as I can to allow small teams to maintain distinct areas of the code. So for example I'd like to split components that will be used exclusively in one area of the site from components that will be used in another. Does it make sense to create 2 app projects so I can build/test/deploy them separately? 

1 Accepted Solution

Avatar

Correct answer by
Level 5

In the pom.xml file for the parent module, you can define any number of reactor modules. Out of the box, you'll see something like this:

<modules> <module>core</module> <module>ui.apps</module> <module>ui.content</module> </modules>

You can add additional modules to your project, and set them up there. Then in the pom.xml files for those reactor modules, ensure you're declaring them as children of the parent. Out of the box, you'll see something like this in the core reactor pom.xml:

<parent> <groupId>org.company</groupId> <artifactId>parentartifactid</artifactId> <version>0.0.1-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent>

There's also nothing saying that all your code has to be in one Multi module project. For example, we have a "basepackage" with base templates, common components (like columns, text and image, etc), and other stuff that would be used across the whole site. And then another MM project that just deals with a news publication system. There are some references to components in the basepackage from the new project, but they're mostly decoupled.

View solution in original post

4 Replies

Avatar

Level 10

Typically with AEM projects - you have a team working on back end OSGi services and another team working on front end components. WHen using Archetype 10 - the backend code is under core and the front end code is under ui. 

What Maven Archetype project are you using? 

Avatar

Level 5

We are on 10, I just wondered if it was possible to split say that front end team into 2 or more smaller teams and so be able to split that code into multiple deployables

Avatar

Correct answer by
Level 5

In the pom.xml file for the parent module, you can define any number of reactor modules. Out of the box, you'll see something like this:

<modules> <module>core</module> <module>ui.apps</module> <module>ui.content</module> </modules>

You can add additional modules to your project, and set them up there. Then in the pom.xml files for those reactor modules, ensure you're declaring them as children of the parent. Out of the box, you'll see something like this in the core reactor pom.xml:

<parent> <groupId>org.company</groupId> <artifactId>parentartifactid</artifactId> <version>0.0.1-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent>

There's also nothing saying that all your code has to be in one Multi module project. For example, we have a "basepackage" with base templates, common components (like columns, text and image, etc), and other stuff that would be used across the whole site. And then another MM project that just deals with a news publication system. There are some references to components in the basepackage from the new project, but they're mostly decoupled.

Avatar

Level 5

Great thanks, that's the sort of split I had in mind! I'm trying to ensure we don't end up with a huge monolithic tightly coupled system. Thanks for the info.