Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central feature License

Feature Model Analyser

The Analyser can analyse features for completeness and correctness. The analyser is pluggable and can also perform other checks.

The analyser can be run from the commandline by running the following main class:


Feature Model Analyser as a Maven Plugin

The Analyser can also be run as part of a maven build via the slingfeature-maven-plugin:

The following analysers are defined:

  • bundle-packages: Checks bundle import/export package statements for consistency and completeness. Does not take API Regions into account. An expanded variant of this analyser is available in org-apache-sling-feature-extension-apiregions under the name api-regions-exportsimports.

  • bundle-content: Gives a warning if a bundle container initial content specified with Sling-Initial-Content.

  • bundle-resources: Gives a warning if a bundle contains resources specified with Sling-Bundle-Resources.

  • compare-features: Compares the artifacts in the bundles sections or in an extension between two feature models. For more information see below.

  • requirements-capabilities: Checks bundle requirements/capabilities for consistency and completeness.

  • apis-jar: This analyser validates that the entries related to Apis Jar are valid.

Additional analysers in relation to Feature Model API Regions can be found here:

For further documentation see:


This analyser compares certain sections of two feature models.

This analyser requires additional configuration:

Configuration key Allowed values Description
compare-type ARTIFACTS The types of entities being compared. Currently only artifacts can be compared.
compare-with Maven ID, e.g. mygroup:myart:1.2.3 The golden feature to compare the features selected for the analyser with.
compare-extension extension name If this configuration is absent, the feature's bundles are compared. Otherwise the extensions with the specified name are compared. These extensions must be of type ARTIFACTS.
compare-mode SAME or DIFFERENT Whether the sections must be the same or must be different. Defaults to SAME.
compare-metadata true or false Whether to include the artifact metadata in the comparison. Defaults to false.
You can’t perform that action at this time.