Maven Build Cache Still Reruns Full Test Suite on Small Edits Within One Module
Using the maven-build-cache-extension, unchanged modules restore quickly, but editing a single line in a large module causes its entire test suite to rerun. The cache works at module granularity, so any change in the module's inputs produces a new checksum and a full rebuild. A synthetic fixture with 120 tests showed that a one-line change in one utility class triggered all 120 tests despite only 20 depending on it. The author's blastradius tool tracks which tests load which classes via a JVM agent and runs only the affected tests, skipping 83.3% of tests in the fixture. The two approaches are complementary: the cache skips unchanged modules, while test selection narrows work inside a changed module.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in