From 04a0b721dea0ab4b0dd5b5728e61a7309f045e88 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 16 Jun 2022 06:59:28 +1000 Subject: [PATCH] use maven central to download Maven distribution using Apache download too much can lead to IP block --- src/installer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/installer.ts b/src/installer.ts index c8aad35..bbf2109 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -33,8 +33,8 @@ export async function getMaven(version: string) { async function downloadMaven(version: string): Promise { const toolDirectoryName = `apache-maven-${version}` - const downloadUrl = - `https://apache.org/dyn/closer.cgi?filename=maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz&action=download` + const downloadUrl = + `https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${version}/apache-maven-${version}-bin.tar.gz` console.log(`downloading ${downloadUrl}`) try {