Building eXist-db


This article will tell you how to build eXist-db from source, please also check the build instructions in the source-code repo.

Building eXist-db from GitHub

Building eXist-db is quite easy and requires four simple steps:

  1. Make sure you have the required build tools installed

    • Java JDK - Building eXist-db requires JDK 8 or newer. If you are looking for an OpenJDK, then the Azul Zulu JDK may suite you.

    • Apache Maven - Building eXist-db requires Maven 3.6.0 or newer.

    • Docker (optional) - If you wish to build the Docker image, then Docker is required.

    • HFS Support (optional) - If you are on Linux and wish to build a DMG for Mac platforms.

      • CentOS etc. - sudo yum install hfsutils hfsplus-tools

      • Debian etc. - sudo apt-get install hfsprogs hfsplus

    • Apple Developer Code signing certificate (optional) - If you are on a Mac and wish to build and sign a DMG.

  2. Clone from Github

    The GitHub URL for the develop branch is:

    Please follow the instructions on our GitHub page page ( section)

    You can clone it by running:

    git clone --single-branch --branch=develop

    The above will only clone the develop branch, if you require all branches, you should omit the --single-branch --branch=develop arguments.

  3. Set JAVA_HOME

    Before starting the build, your JAVA_HOME environment variable should be set to point to the root directory of the JAVA JDK (note: JDK, not JRE!). Open a console on Unix/Linux, or a DOS cmd prompt on Windows and type:

    set JAVA_HOME=c:\path\to\jdk

    on Windows or

    export JAVA_HOME=/path/to/jdk

    on Unix/Linux.

  4. Build eXist

    Change into the eXist-db directory you just checked out and call

    mvn -DskipTests clean compile

Using the Build System

You can rebuild all eXist-db packages and distributions from the cloned source code:

mvn -DskipTests clean package

This will create a fresh distributions in the exist-distribution/target directory, and a fresh installer in the exist-installer/target directory.

If you wish to also build a Docker image, you should add the property -Ddocker=true.

If you wish to also build a signed DMG on Mac, you should add the properties -Dmac-signing=true -Dmac.codesign.identity="The ID of your Apple Developer Certificate".

mvn clean

Cleans the files and directories generated by a previous build. Data is not preserved unless you have overriden the path to the data directory.

mvn compile

Recompiles any changed source code.

mvn dependency:analyze

Checks for any problems with the dependencies that eXist-db depends on.

mvn test

Runs all tests across all modules. Surefire HTML reports can be found in the modules target/surefire-reports/html folder.

mvn install

Installs all Maven artifacts to your local Maven repository (i.e. Unix/Linux: ~/.m2/repository, or Windows: %USERPROFILE%\.m2\repository.

mvn package

Performs the full lifecycle build, after which eXist-db distributions can be found in exist-distribution/target, and an eXist-db IzPack installer can be found in exist-installer/target.


Show the version of Maven and Java used for the build.


Execute Maven in offline (i.e. no Internet access!) mode.


Force Maven to check online for any updates to dependency versions.


Force Maven to execute the lifecycle for the reactor modules in parallel. For example -T 2C instructs Maven to use 2x the core count of threads to parallelise the build. This can have a large positive imapact on build times.

-P profileName (Enable named profile)

-P !profileName (Disable named Profile)

Enables of disables build profiles, see the list of profiles below.


Enable buiding eXist-db Docker images.


Tags the built eXist-db Docker image with a specific tagname.


Enable signing of Mac .app and .DMG files (only on Mac platforms).

-Dmac.codesign.identity="The ID of your Apple Developer Certificate"

Specify the certificate for signing of Mac .app and .DMG files (only on Mac platforms).


Do not attempt to download the latest version of any EXPath Packages which are set to be auto-deployed. Useful for offline working; inferred by Maven's `-O` option.


Do not execute any tests.


Skip the OWASP dependency security analysis.


The name of a single test to run. If running Maven from the root of the project as opposed to inside the specific module which houses the test, you sould also add -DfailIfNoTests=false.


When running tests, if a stacktrace is produced as part of an error, show the full output instead of trimming it.


When this precedes the mvn command, Maven will be run through the Java debugger, which allows you to connect from IntelliJ or another IDE which support JDWP.

Build Profiles

Some aspects of the build are separated into profiles which may be enabled or disabled as needed.


Skip building eXist-db .tar.bz2 and .zip packages



Build/Publish an eXist-db Docker Container



Build/Publish an eXist-db IzPack installer



Codesign the eXist-db .app package. Requires macOS and an Apple Developer Certificate

Enabled on macOS when -Dmac-signing=true


Build/Publish a DMG for eXist-db from Mac. Requires macOS.

Enabled on macOS when -Denv.CI=true is not set, e.g. Travis-CI


Build/Publish a DMG for eXist-db from Unix. Requires Unix like OS with loopback filesystem and HFS tools.

Enabled on Linux when -Denv.CI=true is not set, e.g. Travis-CI


Codesign the eXist-db DMG. Requires macOS and an Apple Developer Certificate

Enabled on macOS when -Dmac-signing=true


Ensure runtime compatibility with Java 8. Sets the -release 8 to javac.

Enabled on JDK 9+


eXist-db Micro-benchmarks



eXist-db JCStress Tests



Causes the test suite to run without parallelism

Enabled on AppVeyor Windows Builds