aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-05-03 11:28:33 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2024-05-03 13:07:43 +0200
commit6ffdbb689027f9458a06c28c260bf33570e52434 (patch)
treec9c59137d6e334bdc79bb6c6d2bcd1170b2df285
parent69d6ba48c07b69ddd6cce7361573d3ab46517fb0 (diff)
downloadsonar-scanner-cli-6ffdbb689027f9458a06c28c260bf33570e52434.tar.gz
sonar-scanner-cli-6ffdbb689027f9458a06c28c260bf33570e52434.zip
SCANCLI-145 Update to the latest build
-rw-r--r--it/pom.xml2
-rw-r--r--it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java10
-rw-r--r--pom.xml6
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Main.java4
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java2
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/MainTest.java4
6 files changed, 17 insertions, 11 deletions
diff --git a/it/pom.xml b/it/pom.xml
index 71da0cc..2ad29b7 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -62,7 +62,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
- <version>3.12.2</version>
+ <version>3.24.2</version>
</dependency>
</dependencies>
diff --git a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java
index 899c03c..9129ce2 100644
--- a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java
+++ b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java
@@ -188,7 +188,10 @@ public class ScannerTest extends ScannerTestCase {
assertThat(buildResult.isSuccess()).isFalse();
assertThat(buildResult.getLogs())
- .contains("SonarQube server [http://from-env.org] can not be reached");
+ .containsAnyOf(
+ "No such host is known (from-env.org)", // Windows
+ "from-env.org: Name or service not known" // Linux
+ );
}
@Test
@@ -214,7 +217,10 @@ public class ScannerTest extends ScannerTestCase {
assertThat(result.isSuccess()).isFalse();
// with the following message
assertThat(result.getLogs())
- .contains("SonarQube server [http://foo] can not be reached");
+ .containsAnyOf(
+ "No such host is known (foo)", // Windows
+ "foo: No address associated with hostname" // Linux
+ );
}
// SONARPLUGINS-3574
diff --git a/pom.xml b/pom.xml
index 5fe78e5..7fbf29b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
<dependency>
<groupId>org.sonarsource.scanner.lib</groupId>
<artifactId>sonar-scanner-java-library</artifactId>
- <version>3.0.0.76</version>
+ <version>3.0.0.114</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
@@ -188,8 +188,8 @@
<configuration>
<rules>
<requireFilesSize>
- <minsize>3000000</minsize>
- <maxsize>3100000</maxsize>
+ <minsize>3400000</minsize>
+ <maxsize>3500000</maxsize>
<files>
<file>${project.build.directory}/sonar-scanner-${project.version}.zip</file>
</files>
diff --git a/src/main/java/org/sonarsource/scanner/cli/Main.java b/src/main/java/org/sonarsource/scanner/cli/Main.java
index 8ad0c05..0da03aa 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Main.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Main.java
@@ -21,9 +21,9 @@ package org.sonarsource.scanner.cli;
import java.util.Map;
import java.util.Properties;
-import org.sonarsource.scanner.lib.ScanProperties;
import org.sonarsource.scanner.lib.ScannerEngineBootstrapper;
import org.sonarsource.scanner.lib.ScannerEngineFacade;
+import org.sonarsource.scanner.lib.ScannerProperties;
/**
* Arguments :
@@ -96,7 +96,7 @@ public class Main {
}
private void checkSkip(Properties properties) {
- if ("true".equalsIgnoreCase(properties.getProperty(ScanProperties.SKIP))) {
+ if ("true".equalsIgnoreCase(properties.getProperty(ScannerProperties.SKIP))) {
logger.info("SonarScanner CLI analysis skipped");
exit.exit(Exit.SUCCESS);
}
diff --git a/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java b/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
index b67254c..f9e7fe7 100644
--- a/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
+++ b/src/main/java/org/sonarsource/scanner/cli/ScannerEngineBootstrapperFactory.java
@@ -44,7 +44,7 @@ class ScannerEngineBootstrapperFactory {
}
ScannerEngineBootstrapper newScannerEngineBootstrapper(String appName, String appVersion) {
- return new ScannerEngineBootstrapper(appName, appVersion, logger.getLogOutputAdapter());
+ return ScannerEngineBootstrapper.create(appName, appVersion, logger.getLogOutputAdapter());
}
diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
index 5d4a372..7a2156b 100644
--- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
@@ -29,9 +29,9 @@ import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.sonar.api.utils.MessageException;
-import org.sonarsource.scanner.lib.ScanProperties;
import org.sonarsource.scanner.lib.ScannerEngineBootstrapper;
import org.sonarsource.scanner.lib.ScannerEngineFacade;
+import org.sonarsource.scanner.lib.ScannerProperties;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
@@ -221,7 +221,7 @@ public class MainTest {
@Test
public void should_skip() {
Properties p = new Properties();
- p.setProperty(ScanProperties.SKIP, "true");
+ p.setProperty(ScannerProperties.SKIP, "true");
when(conf.properties()).thenReturn(p);
when(cli.getInvokedFrom()).thenReturn("");