Home » Documentation » Development

Maven Usage

Apache Sling uses Maven as a build tool. This page documents some of the choices that we made when using Maven.

Parent POM

We separate the reactor POM from the parent POM. While the reactor POM functions as a simple aggregator, the parent POM, currently located at parent/pom.xml, holds the common build configuration for all modules.

The reference to the parent POM is usually set to a released version since we don't deploy it as a SNAPSHOT during the build process. That reference must also contain an empty parentPath element, otherwise recent version of Maven will try to find it in the local filesystem, disregarding the version if the groupId and artifactId match. An example of how to reference the parent POM is


Where $VERSION is replaced by the latest parent POM version.

Java version

The version of Java targeted by a module can be declared by setting a property in the pom.xml named sling.java.version. Configuration inherited from the parent POM will ensure that all the plugins will be correctly configured, including

Dependency management

See Dependency Management

Rev. 1678158 by rombert on Thu, 7 May 2015 10:33:32 +0000
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.