// Download the relevant build-info-extractor jar, if it does not already exist locally.
// By default, the jar is downloaded directly from https://releases.jfrog.io/artifactory/oss-release-local.
//
// downloadPath: download path in the remote server.
// filename: The local file name.
// targetPath: The local download path (without the file name).
Download the relevant build-info-extractor jar, if it does not already exist locally.

download path in the remote server.
filename: The local file name.
targetPath: The local download path (without the file name).
// Download the relevant build - info - extractor jar if it does not already exist locally . // By default the jar is downloaded directly from https : // releases . jfrog . io / artifactory / oss - release - local . // // downloadPath : download path in the remote server . // filename : The local file name . // targetPath : The local download path ( without the file name ) .
func downloadExtractorIfNeeded(downloadTo, filename, downloadPath string, downloadExtractorFunc func(downloadTo, downloadPath string) error, logger Log) error {
	absFileName := filepath.Join(downloadTo, filename)
	exists, err := IsFileExists(absFileName, true)
	if exists || err != nil {
		return err
	}
	if err := os.MkdirAll(downloadTo, 0777); err != nil {
		return err
	}
	if downloadExtractorFunc != nil {
		return downloadExtractorFunc(absFileName, downloadPath)
	}
	extractorUrl := "https://releases.jfrog.io/artifactory/oss-release-local/" + downloadPath
	logger.Info("Downloading build-info-extractor from", extractorUrl, " to ", downloadTo)
	return DownloadFile(absFileName, extractorUrl)
}
func downloadExtractorIfNeeded ( downloadTo , filename , downloadPath string , downloadExtractorFunc func ( downloadTo , downloadPath string ) error , logger Log ) error { absFileName := filepath . Join ( downloadTo , filename ) exists , err := IsFileExists ( absFileName , true ) if exists || err != nil { return err } if err := os . MkdirAll ( downloadTo , 0777 ) ; err != nil { return err } if downloadExtractorFunc != nil { return downloadExtractorFunc ( absFileName , downloadPath ) } extractorUrl := " " + downloadPath logger . Info ( " " , extractorUrl , " " , downloadTo ) return DownloadFile ( absFileName , extractorUrl ) }
Download the relevant build-info-extractor jar, if it does not already exist locally.
Download the relevant build - info - extractor jar if it does not already exist locally .
// If the file exists locally, we're done. // Override default download.