chore: improve Maven cache fallback strategy in GitHub Actions by gnodet · Pull Request #1304 · jline/jline3 (original) (raw)

Problem

The current GitHub Actions workflow uses setup-java@v4 with cache: maven, which only performs exact cache key matching. When pom.xml files change (even slightly), the cache key changes and all Maven dependencies must be re-downloaded, leading to slower CI builds.

Solution

Replace the built-in caching with actions/cache@v4 to gain more control over cache fallback behavior:

Benefits

Testing

This change maintains the same cache paths (~/.m2/repository) and is backward compatible with existing caches.


Pull Request opened by Augment Code with guidance from the PR author