File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -533,6 +533,33 @@ Separate CI-specific settings from the default developer experience:
533533
534534---
535535
536+ ## Tip 7: Build Multi-Module Projects in Parallel
537+
538+ Maven can build ** independent modules concurrently** with the ` -T ` flag:
539+
540+ ``` bash
541+ # 4 threads — good starting point for most multi-module projects
542+ ./mvnw verify -T 4
543+
544+ # Scale to available CPU cores (1 thread per core)
545+ ./mvnw verify -T 1C
546+
547+ # Combine with CI profile
548+ ./mvnw verify -T 1C -P ci
549+ ```
550+
551+ ---
552+
553+
554+ Maven resolves the module dependency graph and builds modules that don't depend on each other ** at the same time** .
555+
556+ ** Caveats:**
557+ - Modules with inter-dependencies are still built sequentially
558+ - Plugin output interleaves - use ` -T 1C ` with ` redirectTestOutputToFile `
559+ - Use the ` mvnd ` daemon for improved console output
560+
561+ ---
562+
536563# GitHub Actions Best Practices
537564
538565---
You can’t perform that action at this time.
0 commit comments