Build platformsUpstream2026
New public extension APIs for Apache Maven 4
Gave Maven extensions stable, Maven-owned contracts for repository events and settings parsing.
Extensions
Build extensions
Observe and customize builds
Maven 4 API
Repository events
Typed listeners
Settings parser SPI
XML default, pluggable formats
Internals
Resolver and settings builder
Context
Maven builds a large share of the world's Java software, and its extensions run inside every one of those builds. Maven 4 is the chance to give extension authors stable public APIs instead of internal types.
The problem
Extensions that wanted to observe downloads, installs, or deployments had to depend on Resolver internals. Supporting a settings format other than XML meant replacing far more of the settings pipeline than necessary.
My role
Designed both APIs and worked them through Maven maintainer API review.
Approach
- Introduced typed repository and execution events owned by Maven, bridging every Resolver repository callback so internal types never leak into the public contract.
- Built a shared, thread-safe listener registry with failure isolation, keeping existing listener lambdas working.
- Added a settings parser SPI with XML as the default, preserving interpolation, decryption, validation, and merging for every format.
Outcome
- Extensions can observe artifact and metadata operations across resolution, download, install, and deploy through one stable API.
- Alternative settings formats plug in without forking the settings builder.
- Both changes passed full integration matrices on Linux, macOS, and Windows across JDK 17, 21, and 25, and closed their tracking issues.