Apply recent changes

This is the result of "npm run build && npm run format", see:

417e1a9899/package.json (L37)

Fixes #18

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2022-06-27 11:58:12 +02:00
parent 417e1a9899
commit 7635506a32
No known key found for this signature in database
GPG Key ID: A58E5C231E0E72B5
2 changed files with 9 additions and 10 deletions

View File

@ -51,7 +51,7 @@ exports.getMaven = getMaven;
function downloadMaven(version) { function downloadMaven(version) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const toolDirectoryName = `apache-maven-${version}`; const toolDirectoryName = `apache-maven-${version}`;
const downloadUrl = `https://archive.apache.org/dist/maven/maven-3/${version}/binaries/${toolDirectoryName}-bin.tar.gz`; const downloadUrl = `https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${version}/apache-maven-${version}-bin.tar.gz`;
console.log(`downloading ${downloadUrl}`); console.log(`downloading ${downloadUrl}`);
try { try {
const downloadPath = yield tc.downloadTool(downloadUrl); const downloadPath = yield tc.downloadTool(downloadUrl);

View File

@ -32,17 +32,16 @@ export async function getMaven(version: string) {
} }
async function downloadMaven(version: string): Promise<string> { async function downloadMaven(version: string): Promise<string> {
const toolDirectoryName = `apache-maven-${version}` const toolDirectoryName = `apache-maven-${version}`;
const downloadUrl = const downloadUrl = `https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${version}/apache-maven-${version}-bin.tar.gz`;
`https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/${version}/apache-maven-${version}-bin.tar.gz` console.log(`downloading ${downloadUrl}`);
console.log(`downloading ${downloadUrl}`)
try { try {
const downloadPath = await tc.downloadTool(downloadUrl) const downloadPath = await tc.downloadTool(downloadUrl);
const extractedPath = await tc.extractTar(downloadPath) const extractedPath = await tc.extractTar(downloadPath);
let toolRoot = path.join(extractedPath, toolDirectoryName) let toolRoot = path.join(extractedPath, toolDirectoryName);
return await tc.cacheDir(toolRoot, 'maven', version) return await tc.cacheDir(toolRoot, 'maven', version);
} catch (err) { } catch (err) {
throw err throw err;
} }
} }