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

Apply recent changes #23

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}
}