V13 Multi Site Mode - Site Sub-Project structure

Hi,

I don’t fully understand workflow for adding CMS features in site sub-project described at


and

Specifically, what is workflow if I add some Java classes inside cms module in site sub-project as part of some feature. This classes apparantly needs to be moved/migrated into corresponding cms module in parent sub-project and deleted in site sub-project.

Documentation says:

In a stable site sub-project, the cms, cms-dependencies and repository-data/application modules should be empty.

After moving classes, how can I run site sub-project with this new cms feature? I guess I have to add dependency for parent sub-project cms module into site sub-project cms module like this?

    <dependency>
        <groupId>org.example</groupId>
        <artifactId>myproject-cms</artifactId>
        <version>0.1.0-SNAPSHOT</version>
        <classifier>classes</classifier>
    </dependency>

I’m asking because there is no default dependency in site sub-project created from “hippo-site-project-archetype” archetype. Only parent sub-project repository-data/application module gets included in site sub-project via dependency on myproject-cms-dependencies.
Is adding new dependecy (like above) the right approach?

Good question. I agree that from the linked documentation and from the project structure generated by the hippo-site-project-archetype, it is not clear what the best practice is in your use case. Your suggestion (adding dependency to parent sub-project’s cms module) is one option, other options could be adding the classes to the parent sub-project’s cms-dependencies module, or creating a dedicated ‘cms-classes’ module in the parent sub-project and adding a dependency to it in the site sub-project’s cms module.

Perhaps someone from brXM platform team can chime in and give their opinion. If we can establish a best practice, I can amend the documentation accordingly.

Thanks,
Niels
(brXM technical writer)