Use GitHub Actions setup-java Maven cache property

This commit is contained in:
Alex Herbert 2022-06-29 13:59:21 +01:00
parent e85dd59990
commit dd9ed7a104
2 changed files with 2 additions and 12 deletions

View File

@ -30,17 +30,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven including the docs-archive module using a profile
run: mvn -V -Pdocs test jacoco:report-aggregate --no-transfer-progress

View File

@ -30,17 +30,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
# Use the default goal
run: mvn -V --no-transfer-progress