Apache Sling > Sling CMS > Developers > Extending Sling CMS

Project Archetype

The Apache Sling CMS Project Archetype creates a simple project structure with common dependencies for you to use to create custom applications on Apache Sling CMS.

Creating a project with the Archetype

To create a project with the archetype, run the following command:

mvn archetype:generate -DarchetypeGroupId=org.apache.sling \
  -DarchetypeArtifactId=org.apache.sling.cms.archetype \
  -DarchetypeVersion=[RELEASE_VERSION]

You should then enter the following values:

  • groupId - the Maven Group Id for your project
  • artifactId - the Maven Artifact Id for your project
  • version - the initial working version of your project, e.g. 1.0-SNAPSHOT
  • package - the Java package for the project (based on groupId)
  • appName - the system name of your application. Should be lower case, with dash separators

Installing the New Project

Install the new project into an Apache Sling CMS instance running at localhost:8080 by running the following command from the project root:

mvn clean install -P autoInstallBundle

Once the project is installed you should see the configuration here: http://localhost:8080/cms/config/configs.html/conf

And be able to create a page under /content/[appName] (once you create the site).