Skip to content

Add Maven Wrapper cache feature#1027

Open
mahabaleshwars wants to merge 2 commits into
actions:mainfrom
mahabaleshwars:feature/maven-wrapper-cache
Open

Add Maven Wrapper cache feature#1027
mahabaleshwars wants to merge 2 commits into
actions:mainfrom
mahabaleshwars:feature/maven-wrapper-cache

Conversation

@mahabaleshwars

Copy link
Copy Markdown
Contributor

Description:
Add Maven Wrapper distribution caching support

Related issue:
#448

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings June 19, 2026 09:45
@mahabaleshwars mahabaleshwars requested a review from a team as a code owner June 19, 2026 09:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.properties in 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants