<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
- <version>3.12.2</version>
+ <version>3.24.2</version>
</dependency>
</dependencies>
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
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
<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>
<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>
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 :
}
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);
}
}
ScannerEngineBootstrapper newScannerEngineBootstrapper(String appName, String appVersion) {
- return new ScannerEngineBootstrapper(appName, appVersion, logger.getLogOutputAdapter());
+ return ScannerEngineBootstrapper.create(appName, appVersion, logger.getLogOutputAdapter());
}
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;
@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("");