Skip to content

Commit 54852ce

Browse files
ci: fix java 7 build
Maven has been upgraded from 3.8 to 3.9, which is not compatible with JDK 7. See also: actions/runner-images#11093
1 parent 4f45e3c commit 54852ce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,32 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20+
21+
- name: Install Maven 3.8.x (instead of 3.9.x)
22+
run: |
23+
MAVEN_VERSION=3.8.8
24+
wget https://downloads.apache.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
25+
tar xzvf apache-maven-$MAVEN_VERSION-bin.tar.gz
26+
sudo mv apache-maven-$MAVEN_VERSION /opt/maven
27+
sudo rm -f /usr/bin/mvn # Remove existing symbolic link if it exists
28+
sudo ln -s /opt/maven/bin/mvn /usr/bin/mvn # Create new symbolic link
29+
2030
- name: Setup java
2131
uses: actions/setup-java@v1
2232
with:
2333
java-version: ${{ matrix.java }}
34+
2435
- name: Cache Maven packages
2536
uses: actions/cache@v2
2637
with:
2738
path: ~/.m2
2839
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2940
restore-keys: ${{ runner.os }}-m2
41+
3042
- name: Setup Node.js
3143
uses: actions/setup-node@v1
3244
with:
3345
node-version: 14.x
46+
3447
- name: Run the Maven verify phase
3548
run: mvn verify -Dgpg.skip=true

0 commit comments

Comments
 (0)