use setup-java cache
@@ -34,19 +34,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- - name: Set up cache for ~./m2/repository
- uses: actions/cache@v2.1.6
- with:
- path: ~/.m2/repository
- key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- maven-${{ matrix.os }}-java${{ matrix.java }}-
- maven-${{ matrix.os }}-
-
- name: Set up JDK
uses: actions/setup-java@v2
with:
- distribution: adopt
+ cache: 'maven'
+ distribution: temurin
java-version: ${{ matrix.java }}
- name: Build with Maven
