Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 2.57 KB

BUILDING.md

File metadata and controls

65 lines (45 loc) · 2.57 KB

Requirements

  • JDK 8 and 9+
  • Apache Maven 3.x
  • A modern Linux, OSX, or Windows host

Configuring Maven Toolchains

Maven Toolchains is used to employ multiple JDKs required for compilation. You either need to have a user-level configuration in ~/.m2/toolchains.xml or explicitly provide one to the Maven: ./mvnw --global-toolchains /path/to/toolchains.xml. See .github/workflows/maven-toolchains.xml used by CI for a sample Maven Toolchains configuration. Note that this file requires JAVA_HOME_8_X64 and JAVA_HOME_11_X64 environment variables to be defined, though these can very well be hardcoded.

Building the sources

You can build and verify the sources as follows:

./mvnw verify

verify goal runs validation and test steps next to building (i.e., compiling) the sources. To speed up the build, you can skip verification:

./mvnw -DskipTests package

If you want to install generated artifacts to your local Maven repository, replace above verify and/or package goals with install.

DNS lookups in tests

Note that if your /etc/hosts file does not include an entry for your computer's hostname, then many unit tests may execute slow due to DNS lookups to translate your hostname to an IP address in InetAddress.getLocalHost(). To remedy this, you can execute the following:

printf '127.0.0.1 %s\n::1 %s\n' `hostname` `hostname` | sudo tee -a /etc/hosts

Building the website and manual

You can build the website and manual as follows:

./mvnw site

And view it using a simple HTTP server, e.g., the one comes with the Python:

python3 -m http.server -d target/site