The Sling 12 release contains numerous improvements, such as official Java 17 support, complete migration to the [OSGi Feature Model](/documentation/development/feature-model.html], and various performance improvements and updates.
Read on to see more details about the individual improvements. To find out more about running Sling, see our getting started page.
The Sling Starter and included modules are validated to work on Java 8, 11, and 17. Note that for Java 17 the
org.apache.sling.commons.threads will not clean up leftover
ThreadLocal instances unless the
--add-opens java.base/java.lang=ALL-UNNAMED is passed to the JVM.
This fix is already applied to the official Sling Starter Docker image and we anticipate further fixes in this area.
Apache Jackrabbit Oak 1.42.0 brings numerous performance improvements and new features that are now available in the Sling Starter.
Oak pre-authenticated login without repository involvement presents a number of advantages:
Oak principal-based authentication is an alternate way of supporting access control entries, with the main difference being that the policy entries are stored together with the user itself, rather than with the content they target.
The support has been implemented both in the Sling Starter and in repoinit.
The Sling Starter is now built and launched with the [OSGi Feature Model](/documentation/development/feature-model.html]. This aligns our tooling with the upstream OSGi specification work from RFP 188 and RFC 241 and provides significant additional tooling around composing, analysing, and launching Sling applications.
Applications based on Apache Sling are encouraged to evaluate migrating to the OSGi feature model.
The OSGi feature model does not support creating WAR files. The Sling Starter therefore no longer produces WAR files. The currently produced artifacts are:
The Sling Starter fully supports development based on content packages. Content packages may be defined in the feature model, deployed via an HTTP API or using the Composum UI.
See Content-package based development for more details.
ResourceResolver had gained a new
orderBefore method that can be used to order child resources. Support needs to be added by various
ResourceProvider implementations. Notably, the JCR ResourceProvider has support for this method.
The Sling Starter includes the Freemarker and Thymeleaf engines out-of-the-box.
Java and HTL scripts may now be precompiled for better runtime performance and build-time checks.
The Apache Sling Settings bundle now supports the OR (
,) and AND (
.) combinations of run modes and negations with
The Sling OSGi installer now supports running multiple versions of the same bundle in parallel. See multi-version support in the OSGi installer for details and limitations.
/jcr:versionStorage. This applies to both aliases and vanity paths.
The repository maintenance bundle has been added to the Sling Starter. This allows configuring jobs running maintenance tasks, such as version purge, revision cleanup, and datastore cleanup.
Multiple bundles have been updated to the latest versions. On top of other improvements listed in this page we have added the Sling
resource.filter bundle and no longer include commons-lang 2 in the Sling Starter.