This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new fb348b31bfe HDDS-17927. Cache Maven Wrapper separately (#12165)
fb348b31bfe is described below
commit fb348b31bfe9ac7d28c697d677ed1f5a3041fe50
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Nov 25 19:20:21 2026 +0100
HDDS-17927. Cache Maven Wrapper separately (#12165)
---
.github/actions/setup-java-with-cache/action.yml | 28 ++++++++++++++++++++----
.github/workflows/populate-cache.yml | 1 -
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/.github/actions/setup-java-with-cache/action.yml
b/.github/actions/setup-java-with-cache/action.yml
index 1f1d2939e67..1371b038182 100644
--- a/.github/actions/setup-java-with-cache/action.yml
+++ b/.github/actions/setup-java-with-cache/action.yml
@@ -70,7 +70,6 @@ runs:
echo "value=maven-repo-${{ hashFiles(
'**/pom.xml',
'.mvn/extensions.xml',
- '.mvn/wrapper/maven-wrapper.properties',
'dev-support/ci/populate-cache.sh'
) }}-$JAVA_VERSION" >> "$GITHUB_OUTPUT"
@@ -78,7 +77,30 @@ runs:
id: cleanup
shell: bash
run: |
- rm -frv ~/.m2/repository
+ rm -frv ~/.m2/repository ~/.m2/wrapper
+
+ - name: Restore Maven Wrapper
+ id: restore-wrapper
+ uses: actions/cache/restore@v6
+ with:
+ path: ~/.m2/wrapper
+ key: maven-wrapper-${{
hashFiles('.mvn/wrapper/maven-wrapper.properties') }}
+
+ # Maven Wrapper is required, small, simple to get,
+ # so download and store it instead of relying on populate-cache.
+ # It also simplifies the action's outputs
+ - name: Get Maven Wrapper
+ if: steps.restore-wrapper.outputs.cache-hit != 'true'
+ shell: bash
+ run: |
+ ./mvnw --version
+
+ - name: Save Maven Wrapper
+ if: steps.restore-wrapper.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: ~/.m2/wrapper
+ key: ${{ steps.restore-wrapper.outputs.cache-primary-key }}
- name: Restore cache with exact key
id: exact-cache
@@ -87,7 +109,6 @@ runs:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/ozone
- ~/.m2/wrapper
key: ${{ steps.cache-key.outputs.value }}
- name: Exact hit?
@@ -114,7 +135,6 @@ runs:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/ozone
- ~/.m2/wrapper
key: maven-repo-
- name: Any hit?
diff --git a/.github/workflows/populate-cache.yml
b/.github/workflows/populate-cache.yml
index 061caa1fd48..478605ec612 100644
--- a/.github/workflows/populate-cache.yml
+++ b/.github/workflows/populate-cache.yml
@@ -164,7 +164,6 @@ jobs:
path: |
~/.m2/repository/*/*/*
!~/.m2/repository/org/apache/ozone
- ~/.m2/wrapper
key: ${{ steps.restore-cache.outputs.cache-key }}
npm:
needs:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]