3030 with :
3131 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
3232 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
33- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
33+ - name : Restore existing cache
34+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
35+ with :
36+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
37+ key : maven-repository-${{ hashFiles('pom.xml') }}
38+ path : ~/.m2/repository
39+ restore-keys : maven-repository-
3440 - name : Run CheckStyle
3541 run : ./src/main/scripts/execute-command.sh checkstyle
3642
4955 with :
5056 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
5157 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
52- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
58+ - name : Restore existing cache
59+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
60+ with :
61+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
62+ key : maven-repository-${{ hashFiles('pom.xml') }}
63+ path : ~/.m2/repository
64+ restore-keys : maven-repository-
5365 - name : Run PMD
5466 run : ./src/main/scripts/execute-command.sh pmd
5567
6880 with :
6981 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
7082 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
71- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
83+ - name : Restore existing cache
84+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
85+ with :
86+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
87+ key : maven-repository-${{ hashFiles('pom.xml') }}
88+ path : ~/.m2/repository
89+ restore-keys : maven-repository-
7290 - name : Check license header
7391 run : ./src/main/scripts/execute-command.sh check-license
7492
@@ -87,7 +105,13 @@ jobs:
87105 with :
88106 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
89107 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
90- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
108+ - name : Restore existing cache
109+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
110+ with :
111+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
112+ key : maven-repository-${{ hashFiles('pom.xml') }}
113+ path : ~/.m2/repository
114+ restore-keys : maven-repository-
91115 - name : Check pom.xml
92116 run : ./src/main/scripts/execute-command.sh check-pom
93117
@@ -192,7 +216,13 @@ jobs:
192216 with :
193217 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
194218 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
195- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
219+ - name : Restore existing cache
220+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
221+ with :
222+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
223+ key : maven-repository-${{ hashFiles('pom.xml') }}
224+ path : ~/.m2/repository
225+ restore-keys : maven-repository-
196226 - name : Run maven-enforcer-plugin
197227 run : ./src/main/scripts/execute-command.sh enforcer
198228
@@ -211,7 +241,13 @@ jobs:
211241 with :
212242 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
213243 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
214- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
244+ - name : Restore existing cache
245+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
246+ with :
247+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
248+ key : maven-repository-${{ hashFiles('pom.xml') }}
249+ path : ~/.m2/repository
250+ restore-keys : maven-repository-
215251 - name : Compile sources
216252 run : >-
217253 mvn \
@@ -237,7 +273,13 @@ jobs:
237273 with :
238274 distribution : ' adopt' # https://github.com/actions/setup-java#supported-distributions
239275 java-version : ' 8' # https://github.com/actions/setup-java#supported-version-syntax
240- cache : ' maven' # https://github.com/actions/setup-java#caching-packages-dependencies
276+ - name : Restore existing cache
277+ uses : actions/cache@v3.3.2 # https://github.com/actions/cache
278+ with :
279+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#input-parameters-for-the-cache-action
280+ key : maven-repository-${{ hashFiles('pom.xml') }}
281+ path : ~/.m2/repository
282+ restore-keys : maven-repository-
241283 - name : Compile sources
242284 run : >-
243285 mvn \
0 commit comments