Propagate baseURL to resolved forge modules.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import axios from 'axios'
|
||||
import { createWriteStream, mkdirs, pathExists } from 'fs-extra'
|
||||
import { dirname, resolve } from 'path'
|
||||
import { dirname, join, resolve } from 'path'
|
||||
import { resolve as resolveURL } from 'url'
|
||||
import { MavenUtil } from '../../../util/maven'
|
||||
import { BaseFileStructure } from '../BaseFileStructure'
|
||||
@@ -26,6 +26,12 @@ export abstract class BaseMavenRepo extends BaseFileStructure {
|
||||
MavenUtil.mavenComponentsToString(group, artifact, version, classifier, extension))
|
||||
}
|
||||
|
||||
public getArtifactUrlByComponents(baseURL: string, group: string, artifact: string, version: string,
|
||||
classifier?: string, extension = 'jar'): string {
|
||||
return resolveURL(baseURL, join(this.relativeRoot,
|
||||
MavenUtil.mavenComponentsToString(group, artifact, version, classifier, extension)))
|
||||
}
|
||||
|
||||
public async artifactExists(path: string) {
|
||||
return pathExists(path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user