Project setup for Pages

Creating a new site project with a maven archetype

To get started quickly with a new site, it is possible to create a new (maven) project with a maven archetype:

mvn "org.apache.maven.plugins:maven-archetype-plugin:3.1.0:generate" -DarchetypeArtifactId=composum-pages-project-archetype

This will ask for a few properties and create a maven project hierarchy below the current directory. Among those are:

  • tenant: In a multi tenant system, this is the name of the tenant. For a single tenant system, it's default is sites .
  • domain: a group of sites
  • project: the name of the site within it's cluster

Also, property project is asked with a default value ${tenant}.${domain}.${project} . We suggest to leave that unchanged to conform to the Composum standard of putting projects into the paths /(content|app)/tenant/cluster/project.

The generated project contains the following maven artefacts:

  • {parentartefact}-app-bundle: for your components, content located at /app/{tenant}.{cluster}.{project}
  • {parentartefact}-app-package: a package for everything
  • {parentartefact}-content: a package for the content of your site, content located at /content/{tenant}.{cluster}.{project}

 Of course, it is advisable to look at the content each of the generated files and modify it according to your needs.

Creating a new maven archetype

Creating a new archetype for your own purposes is relatively easy: you can call 

mvn archetype:create-from-project

and then modify the resulting archetype.

Other archetypes

There is also the composum-platform-subproject-archetype which is geared towards new subprojects of the Composum platform.


(We use the version 3.1.0 of the archetype plugin since 3.1.[12] duplicate newlines in the pom.xml for some reason.)