Add Maven Wrapper cache feature#1027
Open
mahabaleshwars wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Maven Wrapper distribution caching to the existing cache: maven behavior in actions/setup-java, aligning Maven with the already-supported Gradle wrapper distribution caching approach. This reduces repeated Maven distribution downloads for projects using the official Maven Wrapper.
Changes:
- Extend Maven cache paths to include
~/.m2/wrapper/dists(Maven Wrapper distributions) in addition to~/.m2/repository. - Include
**/.mvn/wrapper/maven-wrapper.propertiesin the default Maven cache key hash inputs (alongside**/pom.xml). - Update documentation and tests to reflect the new Maven cache inputs/paths.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/cache.ts | Adds Maven Wrapper distribution directory to cached paths and wrapper properties file to the hash pattern list. |
| README.md | Documents the updated Maven cache key inputs to include maven-wrapper.properties. |
| dist/setup/index.js | Updates the bundled action output to match the new Maven cache paths/patterns. |
| dist/cleanup/index.js | Updates the bundled post action output to match the new Maven cache paths/patterns. |
| tests/cache.test.ts | Expands Maven cache tests to cover hashing with wrapper properties and restoring both cache paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
priya-kinthali
approved these changes
Jun 19, 2026
gowridurgad
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description:
Add Maven Wrapper distribution caching support
Related issue:
#448
Check list: