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-22 10:28:22 +0100
committersonartech <sonartech@sonarsource.com>2023-12-22 20:03:01 +0000
commit6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51 (patch)
tree43710bdc5975d01b9336c229d0aa68a0fa66f4e2 /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java
parent83fe248f66dcc3a909eb411f917795c054445723 (diff)
downloadsonarqube-6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51.tar.gz
sonarqube-6c6de5ad4fac7a44abcc6a0ae7d9cb5c7a53da51.zip
Revert "SONAR-21195 Enhance scanner engine to download only required plugins"
This reverts commit 981e6b85954f413666e8608a4e2f46fa2e4089cc.
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, 5 insertions, 4 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 41c81d2fea6..9b7bd6c4eab 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,8 +54,9 @@ 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(4)
+@Priority(3)
public class SpringGlobalContainer extends SpringComponentContainer {
private static final Logger LOG = LoggerFactory.getLogger(SpringGlobalContainer.class);
private final Map<String, String> scannerProperties;
@@ -119,7 +120,7 @@ public class SpringGlobalContainer extends SpringComponentContainer {
@Override
protected void doAfterStart() {
- installRequiredPlugins();
+ installPlugins();
loadCoreExtensions();
long startTime = System.currentTimeMillis();
@@ -135,12 +136,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 SpringScannerContainer(this).execute();
+ new SpringProjectScanContainer(this).execute();
LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime));
}
- private void installRequiredPlugins() {
+ private void installPlugins() {
PluginRepository pluginRepository = getComponentByType(PluginRepository.class);
for (PluginInfo pluginInfo : pluginRepository.getPluginInfos()) {
Plugin instance = pluginRepository.getPluginInstance(pluginInfo.getKey());