Skip to content

ci: cache Maven dependencies in Java quickstart validation#1313

Open
javier-aliaga wants to merge 2 commits into
dapr:masterfrom
javier-aliaga:ci/speed-up-java-quickstart-validation-by-caching
Open

ci: cache Maven dependencies in Java quickstart validation#1313
javier-aliaga wants to merge 2 commits into
dapr:masterfrom
javier-aliaga:ci/speed-up-java-quickstart-validation-by-caching

Conversation

@javier-aliaga
Copy link
Copy Markdown
Contributor

Description

Enable the built-in Maven cache on setup-java so the ~30 pom.xml files across the Java quickstarts no longer re-download artifacts from Maven Central on every CI run.

Also bump action versions and switch the JDK distribution off the deprecated 'adopt' value (required by setup-java@v4):

  • actions/checkout@v2 -> @v4
  • actions/setup-java@v3 -> @v4
  • distribution: 'adopt' -> 'temurin'

Issue reference

We strive to have all PRs being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1312

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • The quickstart code compiles correctly
  • You've tested new builds of the quickstart if you changed quickstart code
  • You've updated the quickstart's README if necessary
  • If you have changed the steps for a quickstart be sure that you have updated the automated validation accordingly. All of our quickstarts have annotations that allow them to be executed automatically as code. For more information see mechanical-markdown. For user guide with examples see Examples.

Enable the built-in Maven cache on setup-java so the ~30 pom.xml files
across the Java quickstarts no longer re-download artifacts from Maven
Central on every CI run.

Also bump action versions and switch the JDK distribution off the
deprecated 'adopt' value (required by setup-java@v4):
- actions/checkout@v2 -> @v4
- actions/setup-java@v3 -> @v4
- distribution: 'adopt' -> 'temurin'

Fixes dapr#1312

Signed-off-by: Javier Aliaga <javier@diagrid.io>
@javier-aliaga javier-aliaga requested review from a team as code owners May 20, 2026 09:21
Set MAVEN_ARGS at the job level so every Maven invocation (executed via
mechanical-markdown from quickstart READMEs) runs with
--no-transfer-progress, silencing the noisy "Downloading from central"
and "Progress: ..." lines. Build output is preserved so failures stay
debuggable.

MAVEN_ARGS is honored by Maven 3.9+; ubuntu-latest runners ship 3.9.x.

Signed-off-by: Javier Aliaga <javier@diagrid.io>
@javier-aliaga javier-aliaga force-pushed the ci/speed-up-java-quickstart-validation-by-caching branch from e79bcc8 to ed2d63f Compare May 20, 2026 10:00
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.

[Java] Speed up Java quickstart validation by caching Maven dependencies in CI

1 participant