aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2022-06-06 15:08:04 +0200
committersonartech <sonartech@sonarsource.com>2022-06-07 20:03:09 +0000
commit784089432581c819d2c369e014f40f37072603f6 (patch)
tree2a22be54b2bf01910d66e8c4506ee68b96381920 /server/sonar-ce
parentd4b2fae972b11c6205a4adc4a0ece1de30e53a1f (diff)
downloadsonarqube-784089432581c819d2c369e014f40f37072603f6.tar.gz
sonarqube-784089432581c819d2c369e014f40f37072603f6.zip
SONAR-13822 Make plugin requirements check consistence between CE and WEB processes
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/CePluginRepository.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/CePluginRepository.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/CePluginRepository.java
index 5e2a0f50a95..319d8efce64 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/CePluginRepository.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/CePluginRepository.java
@@ -28,14 +28,15 @@ import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import org.apache.commons.io.FileUtils;
-import org.sonar.api.Startable;
import org.sonar.api.Plugin;
+import org.sonar.api.Startable;
import org.sonar.api.utils.log.Loggers;
import org.sonar.core.platform.ExplodedPlugin;
import org.sonar.core.platform.PluginClassLoader;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
import org.sonar.server.platform.ServerFileSystem;
+import org.sonar.server.plugins.PluginRequirementsValidator;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
@@ -70,6 +71,9 @@ public class CePluginRepository implements PluginRepository, Startable {
Loggers.get(getClass()).info("Load plugins");
registerPluginsFromDir(fs.getInstalledBundledPluginsDir());
registerPluginsFromDir(fs.getInstalledExternalPluginsDir());
+
+ PluginRequirementsValidator.unloadIncompatiblePlugins(pluginInfosByKeys);
+
Map<String, ExplodedPlugin> explodedPluginsByKey = extractPlugins(pluginInfosByKeys);
pluginInstancesByKeys.putAll(loader.load(explodedPluginsByKey));
started.set(true);