Apache Maven 102: Best Practices
summary
Maven advice that actually changes builds: prefer pinned Maven and Java versions with the Maven Wrapper and sdkman, avoid dependency ranges because they make builds break unpredictably, and stop habitually running clean/install — a 14-module project shows jar build in 0.5s and install in 0.13s. Use surefire/failsafe split for unit vs integration tests, merge coverage with JaCoCo, avoid test-jars and reckless shade usage, enable build cache and multithreaded/parallel tests, try Maven Daemon and evaluate Maven 4’s new POM split.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:06Speaker background
- 2:20Gradle and Maven
- 3:39XML and dependencies
- 5:07Managing dependencies
- 6:35Dependency management
- 8:17Build lifecycle and tips
- 13:37Plugin configuration
- 15:24Custom logic in Maven
- 16:53Commit or omit
- 18:21Dependency ranges
- 20:06Separating tests
- 21:36Maven profiles
- 22:30Test jars and Uber jars
- 23:07Source jars and reproducibility
- 24:02Build optimization
- 25:40Parallel testing
- 26:34Maven demon and version 4
- 27:52Final wrap-up
- 28:49Audience questions
- 31:29Final thank you
related talks
22mFrom 25 Minutes to 2.5: Okta's Journey to Faster Builds
50mApache #Maven 4 is Awesome
49mThe Current State of Apache Maven 4 - Development
48mWhat's Cooking in Maven?
01h 39mWorkshop: Maximize Developer Productivity with Fast and Reliable Gradle and Maven Builds
24mBuilds 10x Faster with Turbo Reactor
41mSpeeding up Jenkins, Gradle, and Maven with a Build Cache
32m"Supercharge Your Java Development Experience with Open Source Tools"
