Apache Directory Server is built with Maven. Use the Maven wrapper in this repository unless you specifically need to test a different Maven version.
The project is compiled for Java 8 compatibility:
<maven.compiler.release>8</maven.compiler.release>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>For local development, use JDK 21. The GitHub pull request build runs on Temurin JDK 21, while Jenkins also exercises newer JDKs. Release/deploy configuration still preserves Java 8 compatibility.
Before building, verify the active JDK:
java -version
./mvnw -versionThis repository consumes shared Apache Directory build artifacts that are published by other Apache Directory repositories:
org.apache.directory.project:projectis the parent POM fromapache/directory-project.org.apache.directory.api:*artifacts are fromapache/directory-ldap-api.
Maven must be able to resolve these artifacts before ApacheDS modules can
compile. For ordinary local development, prefer released versions available in
Maven Central, such as parent POM 51 and LDAP API 2.1.8.
Compile the project:
./mvnw clean compileRun the normal local build:
./mvnw clean installBuild without running tests:
./mvnw clean install -DskipTestsIf the build asks for unavailable LDAP API snapshot artifacts such as
org.apache.directory.api:*:2.1.8-SNAPSHOT, override the dependency version
with the released LDAP API artifacts:
./mvnw clean install -DskipTests -Dorg.apache.directory.api.version=2.1.8Skip both test compilation and test execution:
./mvnw clean install -Dmaven.test.skip=trueUse -DskipTests when you want the fastest regular build that still verifies
test sources compile. Use -Dmaven.test.skip=true only when you intentionally
want to skip all test work.
The existing installers module has a docker profile that copies
installers/src/test/docker into the build output. That profile supports
installer-related Docker test assets; it is not the ApacheDS server image
build.
The docker-image module builds an ApacheDS image from the apacheds-service
uber jar using the Fabric8 docker-maven-plugin:
./mvnw -pl docker-image -am -Pdocker package -DskipTestsSet the image name when you want a local development tag:
./mvnw -pl docker-image -am -Pdocker package -DskipTests \
-Dapacheds.docker.image=apachedirectory/apacheds:localUse the docker profile instead of the short docker:build goal from the
root reactor. Maven does not resolve the Fabric8 plugin prefix unless
io.fabric8 is configured as a plugin group in the local Maven settings.
The image exposes LDAP on port 10389 and LDAPS on port 10636. Runtime data
is stored under /var/lib/apacheds.
Startup LDIF files can be mounted into /var/lib/apacheds/default/ldif, or a
different directory can be selected with APACHEDS_LDIF_DIR. The image passes
that path to the service with -Dapacheds.ldif.dir; see
docker-image/README.md for details.
The testcontainers module contains Docker-based integration tests for that
image and publishes a reusable test library. Downstream tests can depend on
org.apache.directory.server:apacheds-testcontainers and use
org.apache.directory.server.testcontainers.ApacheDsContainer.
The library also includes withActiveDirectoryFixture(), an LDAP-facing Active
Directory simulation fixture for common user, group, and computer account
queries. See testcontainers/README.md for its scope and limitations.
Build the image first, then run the module's smoke test with the same tag:
./mvnw -pl testcontainers -am test \
-Dapacheds.docker.image=apachedirectory/apacheds:localBefore reporting security issues, read SECURITY.md and the linked
THREAT_MODEL.md.