Skip to content

Commit 2b95e07

Browse files
committed
Turn of Maven connection pooling to avoid connection issues on CI
The problem and solution are explained in actions/runner-images#1499 (comment)
1 parent 53a5c34 commit 2b95e07

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/java-ea.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Java EA
22

33
on: [push]
44

5+
env:
6+
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
7+
58
jobs:
69
test_jdk_ea:
710
strategy:
@@ -18,4 +21,4 @@ jobs:
1821
with:
1922
java-version: ${{ matrix.java }}
2023
- name: 'Test'
21-
run: ./mvnw -V -B --no-transfer-progress install -DskipDistribution=true
24+
run: ./mvnw ${MAVEN_ARGS} install -DskipDistribution=true

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: [push, pull_request]
55
env:
66
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
77
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
8+
MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
89

910
jobs:
1011
test_jdk:
@@ -22,7 +23,7 @@ jobs:
2223
with:
2324
java-version: ${{ matrix.java }}
2425
- name: 'Test'
25-
run: ./mvnw -V -B --no-transfer-progress install -DskipDistribution=true
26+
run: ./mvnw ${MAVEN_ARGS} install -DskipDistribution=true
2627
linux:
2728
name: 'Linux JDK 8'
2829
runs-on: ubuntu-latest
@@ -34,7 +35,7 @@ jobs:
3435
with:
3536
java-version: 8
3637
- name: 'Test'
37-
run: ./mvnw -V -B --no-transfer-progress install
38+
run: ./mvnw ${MAVEN_ARGS} install
3839
- name: 'Generate coverage report'
3940
run: ./mvnw jacoco:report
4041
- name: 'Upload coverage to Codecov'
@@ -52,7 +53,7 @@ jobs:
5253
with:
5354
java-version: 8
5455
- name: 'Test'
55-
run: ./mvnw -V -B --no-transfer-progress install
56+
run: ./mvnw ${MAVEN_ARGS} install
5657
mac:
5758
name: 'Mac OS'
5859
runs-on: macos-latest
@@ -63,4 +64,4 @@ jobs:
6364
with:
6465
java-version: 8
6566
- name: 'Test'
66-
run: ./mvnw -V -B --no-transfer-progress install
67+
run: ./mvnw ${MAVEN_ARGS} install

0 commit comments

Comments
 (0)