Skip to content

Commit

Permalink
Fix scannerCli download (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
csaba-sagi-sonarsource committed Oct 27, 2021
1 parent 4fadb78 commit 727077e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/package-artifacts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ function Download-ScannerCli() {
$artifactoryUrl = "https://repox.jfrog.io/repox";
}

$scannerCliUrl = $artifactoryUrl + "/sonarsource-public-releases/org/sonarsource/scanner/cli/sonar-scanner-cli/$scannerCliVersion/$scannerCliArtifact";

if (!(Test-Path -LiteralPath $scannerCliDownloadDir)) {
New-Item -Path $scannerCliDownloadDir -ItemType Directory -ErrorAction Stop -Force
}

if (!(Test-Path -LiteralPath $scannerCliDownloadDir\$scannerCliArtifact)) {
Invoke-WebRequest -Uri $scannerCliUrl -OutFile $scannerCliDownloadDir\$scannerCliArtifact
}
mvn org.apache.maven.plugins:maven-dependency-plugin:3.2.0:get -DremoteRepositories=$artifactoryUrl -Dartifact="org.sonarsource.scanner.cli:sonar-scanner-cli:${scannerCliVersion}:zip" -Dtransitive=false

mvn org.apache.maven.plugins:maven-dependency-plugin:3.2.0:copy -Dartifact="org.sonarsource.scanner.cli:sonar-scanner-cli:${scannerCliVersion}:zip" -DoutputDirectory="${scannerCliDownloadDir}"
}

0 comments on commit 727077e

Please sign in to comment.