aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2023-12-06 16:58:03 +0100
committersonartech <sonartech@sonarsource.com>2023-12-21 20:02:33 +0000
commit0f4fe6e6fb7d11f768c084bbe2ddb7ffd42d7c56 (patch)
tree456c4b2191c11e11f998428384007fb458d70fab /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
parentb0af995a136c1ec1b233337f6ee4a15fcd4e0c95 (diff)
downloadsonarqube-0f4fe6e6fb7d11f768c084bbe2ddb7ffd42d7c56.tar.gz
sonarqube-0f4fe6e6fb7d11f768c084bbe2ddb7ffd42d7c56.zip
SONAR-21195 Enhance scanner engine to download only required plugins
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
index 9b7bd6c4eab..41c81d2fea6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
@@ -54,9 +54,8 @@ import org.sonar.scanner.repository.DefaultMetricsRepositoryLoader;
import org.sonar.scanner.repository.DefaultNewCodePeriodLoader;
import org.sonar.scanner.repository.MetricsRepositoryProvider;
import org.sonar.scanner.repository.settings.DefaultGlobalSettingsLoader;
-import org.sonar.scanner.scan.SpringProjectScanContainer;
-@Priority(3)
+@Priority(4)
public class SpringGlobalContainer extends SpringComponentContainer {
private static final Logger LOG = LoggerFactory.getLogger(SpringGlobalContainer.class);
private final Map<String, String> scannerProperties;
@@ -120,7 +119,7 @@ public class SpringGlobalContainer extends SpringComponentContainer {
@Override
protected void doAfterStart() {
- installPlugins();
+ installRequiredPlugins();
loadCoreExtensions();
long startTime = System.currentTimeMillis();
@@ -136,12 +135,12 @@ public class SpringGlobalContainer extends SpringComponentContainer {
throw MessageException.of("The preview mode, along with the 'sonar.analysis.mode' parameter, is no more supported. You should stop using this parameter.");
}
getComponentByType(RuntimeJavaVersion.class).checkJavaVersion();
- new SpringProjectScanContainer(this).execute();
+ new SpringScannerContainer(this).execute();
LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime));
}
- private void installPlugins() {
+ private void installRequiredPlugins() {
PluginRepository pluginRepository = getComponentByType(PluginRepository.class);
for (PluginInfo pluginInfo : pluginRepository.getPluginInfos()) {
Plugin instance = pluginRepository.getPluginInstance(pluginInfo.getKey());