Project structure | Community
Skip to main content
Level 4
May 18, 2016
Solved

Project structure

  • May 18, 2016
  • 4 replies
  • 1226 views

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? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BenSt10

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.

4 replies

smacdonald2008
Level 10
May 18, 2016

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? 

Sutty100Author
Level 4
May 18, 2016

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

BenSt10Accepted solution
Level 4
May 18, 2016

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.

Sutty100Author
Level 4
May 18, 2016

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.