Skip to content

Comments

feat: support proxying#24

Open
noahjohnhay wants to merge 4 commits intohalcyon:masterfrom
noahjohnhay:master
Open

feat: support proxying#24
noahjohnhay wants to merge 4 commits intohalcyon:masterfrom
noahjohnhay:master

Conversation

@noahjohnhay
Copy link

No description provided.

Comment on lines +23 to 24
local base="${ASDF_MAVEN_MIRROR:=https://archive.apache.org/dist/maven}"
local url="$base/maven-$major/$version/binaries/apache-maven-$version-bin.tar.gz"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using closer.lua would help direct traffic to CDN for releases available there (example). For older releases, it redirects to archive (example).

Suggested change
local base="${ASDF_MAVEN_MIRROR:=https://archive.apache.org/dist/maven}"
local url="$base/maven-$major/$version/binaries/apache-maven-$version-bin.tar.gz"
local path="maven-$major/$version/binaries/apache-maven-$version-bin.tar.gz"
local url="https://www.apache.org/dyn/closer.lua/maven/$path?action=download"
if [[ -n "${ASDF_MAVEN_MIRROR:-}" ]]; then
url="${ASDF_MAVEN_MIRROR}/$path"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants