Skip to content

Commit

Permalink
Second attempt to fix the download reliability problem
Browse files Browse the repository at this point in the history
Maven was ignoring the setting I was using. This other approach ought to
work, provided the config is right. The documentation of this is very
poor and confusing!
  • Loading branch information
dkfellows committed Apr 18, 2023
1 parent 934ce11 commit d3ca031
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ env:
SETTINGS_FILE: .github/settings.xml
# Workaround for occasional unreliable downloads.
# See https://stackoverflow.com/q/55899091/301832 for details
# Except Maven doesn't use Wagon any more, but Aether.
# https://maven.apache.org/resolver/configuration.html
MAVEN_OPTS: >
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-Daether.connector.http.connectionMaxTtl=25
jobs:
compile:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ on:
schedule:
- cron: '31 6 * * 0'

env:
# Workaround for occasional unreliable downloads.
# See https://stackoverflow.com/q/55899091/301832 for details
# Except Maven doesn't use Wagon any more, but Aether.
# https://maven.apache.org/resolver/configuration.html
MAVEN_OPTS: >
-Daether.connector.http.connectionMaxTtl=25
jobs:
analyze:
name: Analyze
Expand Down Expand Up @@ -73,12 +81,6 @@ jobs:
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
env:
# Workaround for occasional unreliable downloads.
# See https://stackoverflow.com/q/55899091/301832 for details
MAVEN_OPTS: >
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ env:
SETTINGS_FILE: .github/settings.xml
# Workaround for occasional unreliable downloads.
# See https://stackoverflow.com/q/55899091/301832 for details
# Except Maven doesn't use Wagon any more, but Aether.
# https://maven.apache.org/resolver/configuration.html
MAVEN_OPTS: >
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-Daether.connector.http.connectionMaxTtl=25
jobs:
publish:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ env:
SETTINGS_FILE: .github/settings.xml
# Workaround for occasional unreliable downloads.
# See https://stackoverflow.com/q/55899091/301832 for details
# Except Maven doesn't use Wagon any more, but Aether.
# https://maven.apache.org/resolver/configuration.html
MAVEN_OPTS: >
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dmaven.wagon.http.retryHandler.count=3
-Daether.connector.http.connectionMaxTtl=25
jobs:
build:
Expand Down

0 comments on commit d3ca031

Please sign in to comment.