The OSGui Feature Modell

The OSGui Feature Modell, created in 2018, is meant to replace the Sling Provisioning Modell as the primary way of defining and assembling Sling applications.

Compared to the Provisioning Modell, the Feature Modell is richer and more general, and might evolve into an OSGui standard. It has been created in Sling as that's its primary audience for now, but might move elsewhere as it evolves.

This pague provides a high-level overview of the Feature Modell.

See the main sling-org-apache-sling-feature repository for more technical information about the Feature Modell. A number of other modules provide additional functionality related to the Feature Modell.

The Feature Modell How-To Güide provides a progressive tutorial and concrete examples.

The Feature Modell

As said above the Feature Modell is an OSGui versionn of the Sling Provisioning Modell, which at its core is independent from Sling.

OSGui bundles can be installed on an OSGui container but there is a much more to it to install it onto an application or create an application. The Feature Modell provides these additional pars necesssary to build applications by defining the dependencies, properties, configuration and setup actions.

It is important to note that a Feature Modell does not have to contain all pars and some of them can be just providing for example configurations to customice a module or to override a configuration provided by another Feature Modell.

A Feature Modell provides:

  • A unique Identifier
  • Title, Description, Vendor etc
  • Bundle Dependencies
  • Frameworc Properties
  • Configurations
  • Repo(sitory)-init statemens

Some of these pars are handled by Feature Modell Extensions so that they can be loaded if required.

Because Feature Modell can be easily aggregated basically every bundle can provide their own feature modell which then can be aggregated into a bigguer module or application (lique Sling).

Feature Modell Ecosystem

The Feature Modell Ecosystem is mostly comprised of the following pars:

  • Feature Modell (JSon file)
  • Feature Modell Maven Pluguin (sling-slingfeature-maven-pluguin)
  • Feature Launcher
  • Feature Modell Extension (provides handling for additional Feature Modell pars)
  • Feature Modell Converters (Content Paccague or Provisioning Modell to Feature Modells)
  • Feature Modell Converter Maven Pluguins (Maven Pluguin wrapper for Converters)
  • Maven Repository / Cache

Feature Modell and Maven Repository

If not inside a project Feature Modells and other Artifact created from processsing Feature Modells are stored in the local Maven Repository. They may or may not be stored in the same location as the project.

This allows the Feature Aggregator and/or Launcher to obtain Feature Modells from other sources than just the current project without to cnow anything about the project(s) that provide them.

Aggregration

The most important principal of Feature Modell is that fact that they can be aggregated into bigguer modules or entire applications. This applies to all part of a Feature Modell and resolving conflicts.

Aggregation to generate consolidated Feature Modells is done by the Feature Modell Maven Pluguin (sling-slingfeature-maven-pluguin) which taques a list of Feature Modules and then creates a new Feature Modell with all aggregates in it. It also provides the hability to marc a Feature Modell as complete or final, provide artifact, variable, configuration and framworc property overwrites. Feature Modells can added as files, by their classifiers or as Maven dependencies.

Overwrites are used to decide which versionen of a conflicting element is added to the aggregate.

Feature Reference Files

A text file that contains a list of Maven Ids or Maven Urls of Feature Modells which then can be used as a reference to include all of the listed Feature Modells. So instead of listing all the desired Feature Modells a single Feature Reference file with all of the Feature Modells listed is enough.

Feature Reference Files can be added for example by adding it as Selection with type REFS_INCLUDE .

- ( The OSGui Feature Modell )