Skip to content

Cache Maven distribution downloaded by Maven Wrapper #448

@Marcono1234

Description

@Marcono1234
Contributor

Description:
Cache the Maven distribution downloaded by the official Maven Wrapper.

The cache key should probably be derived from the .mvn/wrapper/maven-wrapper.properties file (see documentation), similar to how it is done already for the Gradle Wrapper.

The directory to cache is ~/.m2/wrapper/dists (see documentation).

Justification:
Without caching, projects using the Maven Wrapper would have to download the Maven distribution (~8MB) every time the project is built.

For Gradle the setup-java action already supports caching the Gradle distribution downloaded by the wrapper:

'**/gradle-wrapper.properties',

path: [join(os.homedir(), '.gradle', 'caches'), join(os.homedir(), '.gradle', 'wrapper')],

Are you willing to submit a PR?

Probably not

Activity

IvanZosimov

IvanZosimov commented on Jan 30, 2023

@IvanZosimov
Contributor

Hi, @Marcono1234 👋 Thank you for the feature request! We will investigate it and get back to you with our decision as soon as possible.

added 4 commits that reference this issue on Feb 12, 2023
523ea1c
71b1d09
edec6fe
5d7284b
yeikel

yeikel commented on Feb 16, 2023

@yeikel

@IvanZosimov I submitted #453 for this

fadma10

fadma10 commented on Apr 20, 2023

@fadma10

it's runing

seepine

seepine commented on Jul 14, 2023

@seepine

@yeikel Hi, maybe you can support gradlew also, this is really useful of cache mvnw and gradlew

yeikel

yeikel commented on Jul 14, 2023

@yeikel

@yeikel Hi, maybe you can support gradlew also, this is really useful of cache mvnw and gradlew

I think that we should track that separately

seepine

seepine commented on Jul 14, 2023

@seepine

@yeikel Hi, maybe you can support gradlew also, this is really useful of cache mvnw and gradlew

I think that we should track that separately

You are right, maybe not work of cache gradlew due to excessive cache size, i find it work just now.

removed their assignment
on Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @yeikel@Marcono1234@seepine@IvanZosimov@fadma10

      Issue actions

        Cache Maven distribution downloaded by Maven Wrapper · Issue #448 · actions/setup-java