Skip to content

#492: Use Maven dependency cache in CI workflows - #2412

Open
krystynaShatkovska wants to merge 2 commits into
devonfw:mainfrom
krystynaShatkovska:feature/492-maven-cache
Open

#492: Use Maven dependency cache in CI workflows#2412
krystynaShatkovska wants to merge 2 commits into
devonfw:mainfrom
krystynaShatkovska:feature/492-maven-cache

Conversation

@krystynaShatkovska

@krystynaShatkovska krystynaShatkovska commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes TodoIssueID

Implemented changes:

Added cache: 'maven' to the setup-java@v5 step in build.yml, build-pr.yml, mutation-test.yml, and the deploy job of nightly-build.yml, so these jobs restore a shared ~/.m2/repository dependency cache instead of re-downloading all Maven dependencies on every run. This matches the convention already used in release.yml, update-cve.yml, and update-urls.yml.
The cache is keyed on the hash of the pom.xml files (handled automatically by setup-java), so it is reused while dependencies are unchanged and only re-created when they change


Testing instructions

  1. Open this PR, expand the CI Build PR run -> Set up JDK step. Look for the cache line. It should be a hit ("Cache restored successfully…") because main's CI has already cached this dependency set (the pom.xml files are unchanged from main). A miss only occurs the first time a new dependency set is ever cached.
  2. On Checks , then hover CI Build PR, then Re-run jobs. The re-run (same commit, same pom.xml) should log a hit again, with a minimal Maven download.
  3. Confirm the Set up JDK step / total run is noticeably faster than a cold run, most artifacts restored, not re-downloaded.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Sep 3, 2026
@krystynaShatkovska krystynaShatkovska moved this from 🆕 New to 🏗 In progress in IDEasy board Sep 3, 2026
@krystynaShatkovska krystynaShatkovska added enhancement New feature or request SCM software-configuration-management (github actions, internal processes, git or github utilization) workflow GitHub actions (CI,CD,update urls/CVEs) labels Sep 3, 2026
@coveralls

coveralls commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 33744754508

Coverage increased (+0.03%) to 73.826%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 18583
Covered Lines: 14336
Line Coverage: 77.15%
Relevant Branches: 8276
Covered Branches: 5493
Branch Coverage: 66.37%
Branches in Coverage %: Yes
Coverage Strength: 3.29 hits per line

💛 - Coveralls

@laert-ll laert-ll self-assigned this Sep 3, 2026
@laert-ll laert-ll moved this from 🏗 In progress to Team Review in IDEasy board Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request SCM software-configuration-management (github actions, internal processes, git or github utilization) workflow GitHub actions (CI,CD,update urls/CVEs)

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

3 participants