aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2022-07-05 15:52:26 +0200
committersonartech <sonartech@sonarsource.com>2022-07-06 20:03:56 +0000
commit6354fe3096b07caf9eb017ab7b4e0565f6d303fc (patch)
tree593d31be7e2902f186e85d6d0a588288162a73fe /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
parent6a401f73236a70f702b64646d8bdec7c5a90e15d (diff)
downloadsonarqube-6354fe3096b07caf9eb017ab7b4e0565f6d303fc.tar.gz
sonarqube-6354fe3096b07caf9eb017ab7b4e0565f6d303fc.zip
SONAR-16567 add an analysis warning when using a token expiring in less than 7 days.
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
index 8e86aa8b0b4..7a45f5cc35a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
@@ -20,6 +20,7 @@
package org.sonar.scanner.bootstrap;
import org.sonar.api.CoreProperties;
+import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.utils.System2;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
import org.sonarqube.ws.client.HttpConnector;
@@ -37,7 +38,7 @@ public class ScannerWsClientProvider {
@Bean("DefaultScannerWsClient")
public DefaultScannerWsClient provide(ScannerProperties scannerProps, EnvironmentInformation env, GlobalAnalysisMode globalMode,
- System2 system) {
+ System2 system, AnalysisWarnings analysisWarnings) {
String url = defaultIfBlank(scannerProps.property("sonar.host.url"), "http://localhost:9000");
HttpConnector.Builder connectorBuilder = HttpConnector.newBuilder();
@@ -58,6 +59,6 @@ public class ScannerWsClientProvider {
}
return new DefaultScannerWsClient(WsClientFactories.getDefault().newClient(connectorBuilder.build()), login != null,
- globalMode);
+ globalMode, analysisWarnings);
}
}