aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2019-04-30 10:52:55 -0500
committersonartech <sonartech@sonarsource.com>2019-05-06 11:01:03 +0200
commita517a4c1b6afe3c3c202801249dcbea41cfdec4c (patch)
treeb3ffb242da45497fb6f3583123f1f7b58d7eb46c /server/sonar-ce
parent140aa8271a5af00a84154698b18dc254d5f7bae9 (diff)
downloadsonarqube-a517a4c1b6afe3c3c202801249dcbea41cfdec4c.tar.gz
sonarqube-a517a4c1b6afe3c3c202801249dcbea41cfdec4c.zip
SONAR-11969 Make Edition available for analyzers in the Scanner API
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
index cc7445e259b..313ac49cdce 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
@@ -23,10 +23,11 @@ import com.google.common.annotations.VisibleForTesting;
import java.time.Clock;
import java.util.List;
import javax.annotation.CheckForNull;
+import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.config.EmailSettings;
-import org.sonar.api.internal.ApiVersion;
+import org.sonar.api.internal.MetadataLoader;
import org.sonar.api.internal.SonarRuntimeImpl;
import org.sonar.api.profiles.AnnotationProfileParser;
import org.sonar.api.profiles.XMLProfileParser;
@@ -265,13 +266,14 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer {
}
private static void populateLevel1(ComponentContainer container, Props props, ComputeEngineStatus computeEngineStatus) {
- Version apiVersion = ApiVersion.load(System2.INSTANCE);
+ Version apiVersion = MetadataLoader.loadVersion(System2.INSTANCE);
+ SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE);
container.add(
props.rawProperties(),
ThreadLocalSettings.class,
new ConfigurationProvider(),
new SonarQubeVersion(apiVersion),
- SonarRuntimeImpl.forSonarQube(ApiVersion.load(System2.INSTANCE), SonarQubeSide.COMPUTE_ENGINE),
+ SonarRuntimeImpl.forSonarQube(apiVersion, SonarQubeSide.COMPUTE_ENGINE, edition),
CeProcessLogging.class,
UuidFactoryImpl.INSTANCE,
NetworkUtilsImpl.INSTANCE,