Accelerating Maven Builds: From Snail's Pace to Rocket Speed
summary
Measures build time with the OpenTelemetry Maven extension and a Jaeger collector so you see per-module and per-plugin timing; a Shiro demo drops tests from ~1m27s to ~55s by enabling parallel test execution (Surefire or JUnit Jupiter) but requires thread‑safe tests. Use Maven Daemon (mvnD) to keep a warm JVM, load plugins once and run multimodule builds in parallel (examples show ~1m20s), and apply the Maven build-cache (Maven 3.9+/4) to skip unchanged work — demos show subsequent builds in fractions of a second. Pitfalls: non‑thread‑safe plugins, cache invalidation on config changes.
AI-written summary · about
chapters (22)
- 0:00Intro
- 3:33Open Telemetry Extension
- 5:47Measurement Demo
- 9:16Parallel Test Execution
- 14:58Parallel Test Demo
- 18:45The Maven Demon
- 25:45Demonstration
- 32:12Pros Cons
- 33:25Why not for libraries
- 34:05More modules
- 35:25Have you tried this
- 35:45The Maven Reactor
- 37:16Build Server
- 37:56Maven 4 Build Server
- 38:39Optimizing Work Not Done
- 39:02How does the BuildCach work
- 39:42How does the BuildCach know which parts have changed
- 40:12When to use the BuildCach extensions
- 41:13How to install BuildCach
- 45:35Honorable mentions
- 46:45Wrap up
- 47:56Outro
related talks
24mBuilds 10x Faster with Turbo Reactor
22mFrom 25 Minutes to 2.5: Okta's Journey to Faster Builds
41mSpeeding up Jenkins, Gradle, and Maven with a Build Cache
01h 39mWorkshop: Maximize Developer Productivity with Fast and Reliable Gradle and Maven Builds
40mNail your Gradle build time
27mFaster builds on Android: from 2 minutes to 2 seconds
01h 01mImprove Java build performance with Gradle 5
35mGradle recipes for reducing your build times
