]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
SQSCANNER-117 Only keep JS plugin bundlded
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 8 Aug 2023 15:26:31 +0000 (10:26 -0500)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 15 Aug 2023 14:41:12 +0000 (09:41 -0500)
it/pom.xml
it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java
it/src/test/java/com/sonarsource/scanner/it/SonarScannerTestSuite.java

index 9f96231c7260019f13d8b1a39c3943e86a660170..4ac0b3755fd79fb2a1d41ea55011f9b11bf34c13 100644 (file)
@@ -26,6 +26,7 @@
     <!-- following properties must be set in command-line : sonar.runtimeVersion and sonarRunner.version -->
 
     <maven.compiler.release>17</maven.compiler.release>
+    <orchestrator.version>4.1.0.495</orchestrator.version>
   </properties>
 
   <dependencies>
     <dependency>
       <groupId>org.sonarsource.orchestrator</groupId>
       <artifactId>sonar-orchestrator</artifactId>
-      <version>3.40.0.183</version>
+      <version>${orchestrator.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.sonarsource.orchestrator</groupId>
+      <artifactId>sonar-orchestrator-junit4</artifactId>
+      <version>${orchestrator.version}</version>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
index 906368e08b9fe64423a83e5af0f8f7dee930b5d1..840420ed6c9e3a61d893d8036cafe19190b42896 100644 (file)
@@ -22,6 +22,7 @@ package com.sonarsource.scanner.it;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.http.HttpMethod;
+import com.sonar.orchestrator.junit4.OrchestratorRule;
 import com.sonar.orchestrator.version.Version;
 import java.io.File;
 import java.io.FileInputStream;
@@ -66,7 +67,7 @@ public abstract class ScannerTestCase {
   public ExpectedException thrown = ExpectedException.none();
 
   @ClassRule
-  public static Orchestrator orchestrator = SonarScannerTestSuite.ORCHESTRATOR;
+  public static OrchestratorRule orchestrator = SonarScannerTestSuite.ORCHESTRATOR;
 
   private static Version artifactVersion;
 
index fbaa5b8d9796055190bb26d69ad48604c97a08b0..ebb4aed94479b6cd913a3645b7d34bee02bb21f2 100644 (file)
@@ -20,6 +20,8 @@
 package com.sonarsource.scanner.it;
 
 import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.OrchestratorBuilder;
+import com.sonar.orchestrator.junit4.OrchestratorRule;
 import com.sonar.orchestrator.locator.MavenLocation;
 import org.junit.ClassRule;
 import org.junit.runner.RunWith;
@@ -32,15 +34,15 @@ import org.junit.runners.Suite.SuiteClasses;
 public class SonarScannerTestSuite {
 
   @ClassRule
-  public static final Orchestrator ORCHESTRATOR = createOrchestrator();
+  public static final OrchestratorRule ORCHESTRATOR = createOrchestrator();
 
-  private static Orchestrator createOrchestrator() {
+  private static OrchestratorRule createOrchestrator() {
     String sonarVersion = System
       .getProperty("sonar.runtimeVersion", "LATEST_RELEASE[9.9]");
-    return Orchestrator.builderEnv()
+    return OrchestratorRule.builderEnv()
       .useDefaultAdminCredentialsForBuilds(true)
       .setSonarVersion(sonarVersion)
-      .keepBundledPlugins()
+      .addBundledPluginToKeep("sonar-javascript")
       .addPlugin(MavenLocation.of("org.sonarsource.sonarqube", "sonar-xoo-plugin", sonarVersion))
       .build();
   }