**build failure** · CI · pull requests whose unit-tests jobs start after
a pom change
The unit-tests jobs build with the coverage profile, so they need the
JaCoCo Maven plugin. Nothing that fills the Maven cache uses that
profile, so all four jobs download the plugin from Maven Central at the
same time. Central sometimes answers with HTTP 429, and the job fails
after three retries.
**Risks:**
- ⏱️ The build job and the cache warm-up now run JaCoCo's
`prepare-agent` per module. With tests skipped it only sets a property,
and the report goal skips itself.
- ❓ The cache keys depend only on the pom hash. Entries that already
exist for the current poms stay without JaCoCo until the next pom
change, which happens on main almost daily. So this PR's own CI does not
show the effect.
- ✅ No product code, API, security, memory, serialization or threading
impact.
**Context.** The unit-tests jobs cannot add the plugin to the cache
themselves: their restore is an exact hit on the key the build job
saved, so `actions/cache` skips their save.
- Added `-Pcoverage` to the install in the `build` job of
`validation.yml`, so the plugin enters the entry that job saves.
- Added `-Pcoverage` to the same install in `warm-caches.yml`, so the
warmed entry for main has it too and the common path downloads nothing.
Working on behalf of @Artur-
Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>