From 2b95e07d8e2648dccfbdbd8ba1f2fc3a4f67a303 Mon Sep 17 00:00:00 2001 From: Filip Hrisafov Date: Sat, 10 Oct 2020 10:22:43 +0200 Subject: [PATCH] Turn of Maven connection pooling to avoid connection issues on CI The problem and solution are explained in https://github.com/actions/virtual-environments/issues/1499#issuecomment-689467080 --- .github/workflows/java-ea.yml | 5 ++++- .github/workflows/main.yml | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/java-ea.yml b/.github/workflows/java-ea.yml index a5afa065c..3e901b611 100644 --- a/.github/workflows/java-ea.yml +++ b/.github/workflows/java-ea.yml @@ -2,6 +2,9 @@ name: Java EA on: [push] +env: + MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + jobs: test_jdk_ea: strategy: @@ -18,4 +21,4 @@ jobs: with: java-version: ${{ matrix.java }} - name: 'Test' - run: ./mvnw -V -B --no-transfer-progress install -DskipDistribution=true + run: ./mvnw ${MAVEN_ARGS} install -DskipDistribution=true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08278a1ad..f63a183d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: [push, pull_request] env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + MAVEN_ARGS: -V -B --no-transfer-progress -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 jobs: test_jdk: @@ -22,7 +23,7 @@ jobs: with: java-version: ${{ matrix.java }} - name: 'Test' - run: ./mvnw -V -B --no-transfer-progress install -DskipDistribution=true + run: ./mvnw ${MAVEN_ARGS} install -DskipDistribution=true linux: name: 'Linux JDK 8' runs-on: ubuntu-latest @@ -34,7 +35,7 @@ jobs: with: java-version: 8 - name: 'Test' - run: ./mvnw -V -B --no-transfer-progress install + run: ./mvnw ${MAVEN_ARGS} install - name: 'Generate coverage report' run: ./mvnw jacoco:report - name: 'Upload coverage to Codecov' @@ -52,7 +53,7 @@ jobs: with: java-version: 8 - name: 'Test' - run: ./mvnw -V -B --no-transfer-progress install + run: ./mvnw ${MAVEN_ARGS} install mac: name: 'Mac OS' runs-on: macos-latest @@ -63,4 +64,4 @@ jobs: with: java-version: 8 - name: 'Test' - run: ./mvnw -V -B --no-transfer-progress install + run: ./mvnw ${MAVEN_ARGS} install