(doc) cleanup toolchain setup
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 4349be0..294504a 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,41 +34,15 @@
- name: Checkout
uses: actions/checkout@v3
- - name: Set up cache for ~./m2/repository
- uses: actions/cache@v3
- 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 }}-
+# https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#modifying-maven-toolchains
- name: Install Toolchain JDK
if: ${{ matrix.java == '8' }}
- uses: AdoptOpenJDK/install-jdk@v1
+ uses: actions/setup-java@v3
with:
- version: '11'
- targets: 'TOOLCHAIN_JDK'
- impl: 'hotspot'
- - name: Set up Toolchain
- if: ${{ matrix.java == '8' }}
- shell: bash
- run: |
- mkdir -p $HOME/.m2 \
- && cat << EOF > $HOME/.m2/toolchains.xml
- <?xml version="1.0" encoding="UTF8"?>
- <toolchains>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>11</version>
- <vendor>adopt</vendor>
- </provides>
- <configuration>
- <jdkHome>${{ env.TOOLCHAIN_JDK }}</jdkHome>
- </configuration>
- </toolchain>
- </toolchains>
- EOF
+ distribution: 'temurin'
+ java-version: 11
+ cache: 'maven'
+
- name: Set up JDK
uses: actions/setup-java@v3
with:
@@ -77,5 +51,4 @@
cache: 'maven'
- name: Build with Maven
- run: mvn verify -e -B -V -Prun-its
-
+ run: mvn verify --errors --batch-mode --show-version -Prun-its