ci: fix java 7 build

Maven has been upgraded from 3.8 to 3.9, which is not compatible with JDK 7.

See also: https://github.com/actions/runner-images/issues/11093
This commit is contained in:
Damien Arrachequesne
2025-02-18 22:30:05 +01:00
parent 8519952a51
commit 050dd2653a

View File

@@ -11,24 +11,38 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false
matrix: matrix:
java: [7, 8, 11] java: [7, 8, 11]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install Maven 3.8.x (instead of 3.9.x)
run: |
MAVEN_VERSION=3.8.8
wget https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
tar xzvf apache-maven-$MAVEN_VERSION-bin.tar.gz
sudo mv apache-maven-$MAVEN_VERSION /opt/maven
sudo rm -f /usr/bin/mvn # Remove existing symbolic link if it exists
sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn # Create new symbolic link
- name: Setup java - name: Setup java
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
- name: Cache Maven packages - name: Cache Maven packages
uses: actions/cache@v2 uses: actions/cache@v4
with: with:
path: ~/.m2 path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2 restore-keys: ${{ runner.os }}-m2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 14.x node-version: 14.x
- name: Run the Maven verify phase - name: Run the Maven verify phase
run: mvn verify -Dgpg.skip=true run: mvn verify -Dgpg.skip=true