Apache Sling JCR Jackrabbit Base

Clone this repo:
  1. c7ddaa3 docs: update AGENTS.md and README.md with clarifications and new commands (#5) by Carsten Ziegeler · 5 weeks ago master
  2. 1d5ea3e Add security section to AGENTS.md by Robert Munteanu · 3 months ago
  3. 45d2196 docs: add AGENTS.md, CLAUDE.md and expand README (#4) by Carsten Ziegeler · 3 months ago
  4. bed51a9 Merge pull request #3 from apache/maia/workflow-1779948429845 by Carsten Ziegeler · 3 months ago
  5. e729345 chore: update pom and reformat Java sources by Carsten Ziegeler · 3 months ago

Apache Sling

Build Status Coverage Sonarcloud Status jcr License

Apache Sling JCR Jackrabbit Base

This module is part of the Apache Sling project.

The JCR base bundle provides Jackrabbit utility classes for integrating Jackrabbit security and configuration extension points with an OSGi runtime.

Key Components

  • OsgiBeanFactory (org.apache.sling.jcr.jackrabbit.base.config) tracks OSGi services marked as Jackrabbit extensions and exposes a BeanFactory when all required dependencies are available.
  • DelegatingLoginModule delegates JAAS login handling to an OSGi-based JAAS configuration when available, with fallback to Jackrabbit's local module setup.
  • PrincipalProviderTracker and DelegatingPrincipalProviderRegistry bridge OSGi-registered PrincipalProvider services into Jackrabbit's principal provider registry model.
  • MultiplexingAuthorizableAction tracks OSGi AuthorizableAction services and dispatches Jackrabbit authorizable lifecycle callbacks to them.

Build

mvn clean install

Common Commands

# Compile only
mvn compile

# Run tests
mvn test

# Build without tests
mvn install -DskipTests

# Check formatting
mvn spotless:check

# Apply formatting
mvn spotless:apply

# Full verification (includes integration checks from parent build)
mvn verify

# License header compliance
mvn apache-rat:check

Requirements and Dependencies

  • Java 8 (sling.java.version=8)
  • Maven build parent: org.apache.sling:sling-bundle-parent:66
  • Apache Jackrabbit Core 2.5.2 (provided)
  • JCR API (javax.jcr:jcr, provided)
  • OSGi APIs (org.osgi.framework, org.osgi.util.tracker, org.osgi.annotation.versioning, provided)
  • SLF4J API (provided)
  • JUnit 4 and slf4j-simple for tests
  • Animal Sniffer Maven Plugin (org.codehaus.mojo:animal-sniffer-maven-plugin:1.24) enforces Java 8 API compatibility

Source Layout

src/main/java/org/apache/sling/jcr/jackrabbit/base/
  config/
    OsgiBeanFactory.java
  security/
    DelegatingLoginModule.java
    DelegatingPrincipalProviderRegistry.java
    MultiplexingAuthorizableAction.java
    PrincipalProviderTracker.java
    package-info.java

There is currently no src/test/java/ tree in this module.