Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support proxying #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

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