Skip to content

Commit

Permalink
Remove all hard coded values of the scanner version
Browse files Browse the repository at this point in the history
  • Loading branch information
costin-zaharia-sonarsource committed Dec 11, 2023
1 parent 49e580f commit defc81f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
35 changes: 0 additions & 35 deletions its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</organization>

<properties>
<scannerMsbuild.version>6.0.0.81631</scannerMsbuild.version>
<surefire.argLine>-server</surefire.argLine>
</properties>

Expand All @@ -30,13 +29,6 @@
<artifactId>sonar-orchestrator-junit5</artifactId>
<version>4.6.0.1748</version>
</dependency>
<dependency>
<groupId>org.sonarsource.scanner.msbuild</groupId>
<artifactId>sonar-scanner</artifactId>
<version>${scannerMsbuild.version}</version>
<type>zip</type>
<classifier>net-framework</classifier>
</dependency>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-ws</artifactId>
Expand Down Expand Up @@ -70,36 +62,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<systemProperties>
<scannerMsbuild.version>${scannerMsbuild.version}</scannerMsbuild.version>
</systemProperties>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>get-scanner-2.1</id>
<phase>initialize</phase>
<goals>
<goal>get</goal>
</goals>
<configuration>
<artifactId>sonar-scanner-msbuild</artifactId>
<groupId>org.sonarsource.scanner.msbuild</groupId>
<packaging>zip</packaging>
<version>2.1.0.0</version>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
2 changes: 1 addition & 1 deletion its/src/test/java/com/sonar/it/shared/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private static String getProjectBaseDir(Path projectDir, String subProjectName)
private static Build<ScannerForMSBuild> newScanner(Path projectDir) {
// We need to set the fallback version to run from inside the IDE when the property isn't set
return ScannerForMSBuild.create(projectDir.toFile())
.setScannerVersion(System.getProperty("scannerMsbuild.version", "LATEST_RELEASE"))
.setScannerVersion(ScannerForMSBuild.LATEST_RELEASE)

// In order to be able to run tests on Azure pipelines, the AGENT_BUILDDIRECTORY environment variable
// needs to be set to the analyzed project directory.
Expand Down

0 comments on commit defc81f

Please sign in to comment.