Skip to content

Commit

Permalink
Merge pull request #23 from wborn/update-lib
Browse files Browse the repository at this point in the history
Apply recent changes
  • Loading branch information
stCarolas authored Jul 3, 2022
2 parents e792f67 + 7635506 commit 021645c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports.getMaven = getMaven;
function downloadMaven(version) {
return __awaiter(this, void 0, void 0, function* () {
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}`);
try {
const downloadPath = yield tc.downloadTool(downloadUrl);
Expand Down
17 changes: 8 additions & 9 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ export async function getMaven(version: string) {
}

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

0 comments on commit 021645c

Please # to comment.