From a9f7ff824dee9512bfae7d0917e59905081ac548 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Sun, 1 Mar 2026 07:43:15 -0400 Subject: [PATCH 1/2] Enable Maven module parallelism for faster builds Add MAVEN_PARALLEL_THREADS variable (default: 1C = 1 thread per CPU core) to the compile-all target. Use 'install' instead of 'compile test-compile' so that annotation processors (mapper-processor) are installed to the local repo before downstream modules (examples) start compiling. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 26cb4e5a111..70b52003ae5 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ CCM_SCYLLA_REPO ?= github.com/scylladb/scylla-ccm CCM_SCYLLA_VERSION ?= master SCYLLA_EXT_OPTS ?= --smp=2 --memory=4G +MAVEN_PARALLEL_THREADS ?= 1C MVNCMD ?= mvn -B -X -ntp GET_VERSION_VERSION ?= 0.4.3 @@ -239,7 +240,7 @@ release-dry-run: .require-release-env $(MVNCMD) release:perform > >(tee /tmp/java-driver-release-logs/stdout.log) 2> >(tee /tmp/java-driver-release-logs/stderr.log) compile-all: .install-guava-shaded - mvn -B compile test-compile -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true + mvn -B -T $(MAVEN_PARALLEL_THREADS) install -DskipTests -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true check: $(MVNCMD) verify -DskipTests From 540f6a9a1b76afd1c0837c06f22b87aa367d6b08 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Sun, 1 Mar 2026 09:24:59 -0400 Subject: [PATCH 2/2] Fix parallel build: exclude examples from parallel phase The examples module uses annotationProcessorPaths to reference mapper-processor, which Maven resolves from the local repo (not the reactor). With parallel builds (-T), examples can start compiling before mapper-processor is installed, causing a resolution failure. Split compile-all into two phases: parallel install of all modules except examples, then sequential compile of examples. Co-Authored-By: Claude Opus 4.6 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70b52003ae5..6e569fb081a 100644 --- a/Makefile +++ b/Makefile @@ -240,7 +240,8 @@ release-dry-run: .require-release-env $(MVNCMD) release:perform > >(tee /tmp/java-driver-release-logs/stdout.log) 2> >(tee /tmp/java-driver-release-logs/stderr.log) compile-all: .install-guava-shaded - mvn -B -T $(MAVEN_PARALLEL_THREADS) install -DskipTests -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true + mvn -B -T $(MAVEN_PARALLEL_THREADS) install -pl '!examples' -DskipTests -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true + mvn -B compile test-compile -pl examples -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true check: $(MVNCMD) verify -DskipTests