Skip to content

Commit 806cccc

Browse files
committed
Enable Maven module parallelism for faster builds
Add MAVEN_PARALLEL_THREADS variable (default: 1C = 1 thread per CPU core) to parallelize Maven reactor module builds. Modules without inter-dependencies (query-builder, mapper-processor, etc.) can now compile and test in parallel, reducing overall build time.
1 parent d8140ac commit 806cccc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ CCM_SCYLLA_REPO ?= github.com/scylladb/scylla-ccm
1212
CCM_SCYLLA_VERSION ?= master
1313

1414
SCYLLA_EXT_OPTS ?= --smp=2 --memory=4G
15-
MVNCMD ?= mvn -B -X -ntp
15+
MAVEN_PARALLEL_THREADS ?= 1C
16+
MVNCMD ?= mvn -B -X -ntp -T $(MAVEN_PARALLEL_THREADS)
1617

1718
GET_VERSION_VERSION ?= 0.4.3
1819

@@ -239,7 +240,7 @@ release-dry-run: .require-release-env
239240
$(MVNCMD) release:perform > >(tee /tmp/java-driver-release-logs/stdout.log) 2> >(tee /tmp/java-driver-release-logs/stderr.log)
240241

241242
compile-all: .install-guava-shaded
242-
mvn -B compile test-compile -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true
243+
mvn -B -T $(MAVEN_PARALLEL_THREADS) compile test-compile -Dfmt.skip=true -Dclirr.skip=true -Danimal.sniffer.skip=true
243244

244245
check:
245246
$(MVNCMD) verify -DskipTests

0 commit comments

Comments
 (0)