Building eXist-db
(2Q19)
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:
-
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.
-
-
Clone from Github
The GitHub URL for the develop branch is:
https://github.com/eXist-db/exist.git
Please follow the instructions on our GitHub page page (
README.md
section)You can clone it by running:
git clone --single-branch --branch=develop https://github.com/eXist-db/exist.git
The above will only clone the
develop
branch, if you require all branches, you should omit the--single-branch --branch=develop
arguments. -
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.
-
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"
.
|
Cleans the files and directories generated by a previous build. Data is not preserved unless you have overriden the path to the data directory. |
|
Recompiles any changed source code. |
|
Checks for any problems with the dependencies that eXist-db depends on. |
|
Runs all tests across all modules. Surefire HTML reports can be found in the modules |
|
Installs all Maven artifacts to your local Maven repository (i.e. Unix/Linux: |
|
Performs the full lifecycle build, after which eXist-db distributions can be found in |
|
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 |
|
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 |
|
Specify the certificate for signing of Mac |
|
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 |
|
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 |
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 |
Disabled |
|
Build/Publish an eXist-db Docker Container |
Disabled |
|
Build/Publish an eXist-db IzPack installer |
Enabled |
|
Codesign the eXist-db .app package. Requires macOS and an Apple Developer Certificate |
Enabled on macOS when |
|
Build/Publish a DMG for eXist-db from Mac. Requires macOS. |
Enabled on macOS when |
|
Build/Publish a DMG for eXist-db from Unix. Requires Unix like OS with loopback filesystem and HFS tools. |
Enabled on Linux when |
|
Codesign the eXist-db DMG. Requires macOS and an Apple Developer Certificate |
Enabled on macOS when |
|
Ensure runtime compatibility with Java 8. Sets the |
Enabled on JDK 9+ |
|
eXist-db Micro-benchmarks |
Enabled |
|
eXist-db JCStress Tests |
Enabled |
|
Causes the test suite to run without parallelism |
Enabled on AppVeyor Windows Builds |