Skip to content

Support caching Maven plugin dependencies in setup-java #990

@dbi1463

Description

@dbi1463

Description:
When using actions/setup-java@v4 with Maven cache (cache: maven), CI builds often download Maven plugin dependencies (e.g., plexus-*, aircompressor, xz) even when the POM and project dependencies have not changed. The cache log shows: “Cache hit occurred on the primary key …, not saving cache”, so these plugin JARs are not persisted and are downloaded again in subsequent builds.

It would be helpful to have a way to configure setup-java so that plugin dependencies can also be cached, or otherwise reduce repeated downloads in CI builds.

Justification:
For multi-module Maven projects with many plugins, repeated downloads of plugin dependencies increase CI build time and network usage. Providing a way to cache plugin dependencies would make CI runs faster and more efficient, especially on runners that start from a clean environment each time.

Are you willing to submit a PR?
No.

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

    No branches or pull requests

    Issue actions