maven-parallel-not-enabled
Detects multi-module Maven repositories that run lifecycle goals in CI without parallel module execution.
Why it matters
Maven builds modules serially by default. For multi-module projects, --threads lets independent modules build and test in parallel, which can substantially reduce CI wall-clock time. Many repositories run large Maven builds with the default single-threaded configuration.
Detection
Reports when:
- The repository uses Maven (
pom.xmlormvnw) - CI executes a Maven lifecycle goal (
compile,test,package,verify,install,deploy,integration-test) - The build looks multi-module: the root
pom.xmldeclares<modules>, or more than onepom.xmlis present - At least one CI Maven lifecycle command lacks
-T/--threads, and root.mvn/maven.configdoes not configure parallel execution
Exclusions
Does not report when:
- Every CI Maven lifecycle command passes
-Tor--threads, or parallel execution is configured in.mvn/maven.config(commented flags do not count). A tuned command does not suppress a separate untuned command or job. - Only a single
pom.xmlis found and the root POM has no<modules> - No Maven lifecycle goal runs in CI
Severity
warning — parallel execution is a large, low-risk win for most multi-module builds, but plugins that are not marked @threadSafe can break under parallelism.
Caveats
Always check Maven’s thread-safety warnings (it lists plugins whose goals are not marked @threadSafe). Replace or isolate those plugins before relying on parallel execution, and validate the build and test results.