Repository navigation
docs: clarify Maven cache paths and key hash inputs - #1096
Merged
Merged
Conversation
Address post-merge review feedback on #1094: the intro paragraph described the cache too narrowly. setup-java caches both ~/.m2/repository and ~/.m2/wrapper/dists, and the default key hashes **/pom.xml plus .mvn/wrapper/maven-wrapper.properties and .mvn/extensions.xml, so changing wrapper/extensions files also invalidates the cache. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the advanced usage documentation to more accurately describe how cache: maven works in actions/setup-java, specifically what directories are cached and which files are hashed to produce the cache key.
Changes:
- Clarifies that
cache: mavencaches both~/.m2/repositoryand Maven Wrapper distributions under~/.m2/wrapper/dists. - Clarifies that the default cache key includes hashes of
**/pom.xml,**/.mvn/wrapper/maven-wrapper.properties, and**/.mvn/extensions.xml, and that modifying them invalidates the cache. - Keeps the existing explanation that caches are only saved on cache miss runs (not re-saved on hits).
Show a summary per file
| File | Description |
|---|---|
| docs/advanced-usage.md | Updates the Maven cache completeness section to align with the action’s actual default cache paths and cache-key hash inputs. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
Comment on lines
+293
to
+296
| (`~/.m2/wrapper/dists`). The cache key is a hash of your Maven inputs — every | ||
| `**/pom.xml`, plus `**/.mvn/wrapper/maven-wrapper.properties` and | ||
| `**/.mvn/extensions.xml` — so changing any of those files (for example bumping | ||
| the wrapper version or editing core extensions) produces a new key and |
mergify Bot
added a commit
to ArcadeData/arcadedb
that referenced
this pull request
Aug 30, 2026
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.7.0 to 6.0.0. Release notes *Sourced from [actions/setup-java's releases](https://github.com/actions/setup-java/releases).* > v6.0.0 > ------ > > What's Changed > -------------- > > * dist: Migrate from Zulu Discovery API to Azul Metadata API by [`@jameswald`](https://github.com/jameswald) in [actions/setup-java#1010](https://redirect.github.com/actions/setup-java/pull/1010) > * feat: add .mvn/extensions.xml to Maven cache key pattern by [`@brunoborges`](https://github.com/brunoborges) with [`@Copilot`](https://github.com/Copilot) in [actions/setup-java#1041](https://redirect.github.com/actions/setup-java/pull/1041) > * Migrate to ESM and upgrade dependencies by [`@priyagupta108`](https://github.com/priyagupta108) in [actions/setup-java#1078](
Description:
Follow-up to post-merge review feedback on #1094. The intro paragraph of the "Ensuring the Maven cache is complete" section described the
cache: mavenbehavior too narrowly, which could leave readers unsure why changing wrapper/extensions files invalidates the cache or why wrapper downloads are cached too.Updated the paragraph to match what the action actually does (verified against
src/cache.ts):~/.m2/repositoryand the Maven Wrapper distributions in~/.m2/wrapper/dists.**/pom.xml,**/.mvn/wrapper/maven-wrapper.properties, and**/.mvn/extensions.xml, so editing any of those (e.g. bumping the wrapper version or core extensions) produces a new key.Docs-only change; no behavior changes.
Related issue:
Addresses review feedback: #1094 (comment)
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.