- Java 11 (see below for setup — your system default is likely much newer)
- Maven 3.1.0+
- Performance Co-Pilot (PCP)
Parfait targets Java 8 source/target and is tested in CI against Java 11, 17, 21, and 25. Your system likely ships with a much newer Java by default, which will cause build failures. You need Java 11 available and Maven configured to use it.
macOS (via Homebrew):
brew install openjdk@11Homebrew installs openjdk@11 as keg-only, so macOS's java_home utility won't find it. You need to symlink it first:
sudo ln -sfn /opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdkThen set JAVA_HOME in your shell profile (e.g. ~/.zshrc):
export JAVA_HOME=$(/usr/libexec/java_home -v 11)Alternatively, skip the symlink and point directly at the Homebrew path:
export JAVA_HOME=/opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/HomeLinux (Debian/Ubuntu):
sudo apt-get install -y openjdk-11-jdkIf you have multiple JDKs installed, select Java 11:
sudo update-alternatives --set java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64Verify:
java -version # Should show 11.x.x
mvn -version # "Java version" line should show 11.x.xIf mvn -version shows a different Java than java -version, Maven is picking up JAVA_HOME from somewhere else. Check your shell profile and ensure JAVA_HOME is set before Maven runs.
PCP is required to run the full test suite, including integration tests that write MMV (Memory-Mapped Values) files.
macOS (via Homebrew):
brew tap performancecopilot/pcp
brew install --cask pcpSee performancecopilot/homebrew-pcp for details and troubleshooting.
Debian/Ubuntu:
curl -s https://packagecloud.io/install/repositories/performancecopilot/pcp/script.deb.sh | sudo bash
sudo apt-get install -y pcp pcp-zeroconfRHEL/Fedora:
sudo dnf install pcp pcp-zeroconfPCP installs /var/lib/pcp/tmp/mmv with permissions drwxrwxr-x (only root and the pcp group can write). Parfait's integration tests need to create memory-mapped files in this directory, so your user needs write access:
sudo chmod o+w /var/lib/pcp/tmp/mmvWithout this, integration tests in the dxm module will fail with Permission denied on /var/lib/pcp/tmp/mmv/.
# Full build with all tests
mvn clean install verify
# Unit tests only (integration tests excluded by surefire config)
mvn test
# Single test class
mvn test -pl parfait-core -Dtest=MonitoredCounterTest
# Single test method
mvn test -pl parfait-core -Dtest=MonitoredCounterTest#testMethodName
# Skip license header check (useful during development)
mvn install -Dlicense.skip=truemvn clean package install
cd parfait-agent && mvn assembly:singleThe fat JAR is produced at parfait-agent/target/parfait-agent-jar-with-dependencies.jar.
If you don't want to install PCP locally, or want to validate in a clean environment.
Note: The container uses JDK 21 because the PCP base image (Fedora) only ships JDK 21+. The CI workflow (
.github/workflows/ci.yml) tests the full JDK matrix (11, 17, 21, 25) and remains the authoritative source for version coverage.
# Run full test suite in a container (requires docker or podman)
./test-in-container.sh
# Run specific module tests
./test-in-container.sh mvn test -pl parfait-core
# Run with any Maven command
./test-in-container.sh mvn clean install -DskipTestsThe script uses podman by default. If you use Docker, you can run the equivalent commands directly:
docker build -t parfait-test .
docker run --rm -v "$(pwd):/parfait" parfait-testAll .java and .xml files require Apache 2.0 license headers (enforced by license-maven-plugin). The header template is at license/header.txt. The parfait-agent module has its own header definition at parfait-agent/license/parfait-agent-java.xml.