aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-06-13 17:12:39 +0200
committerJulien HENRY <henryju@yahoo.fr>2016-07-07 10:04:36 +0200
commite5818438a289fe522c87245d5bd18d71406f0e39 (patch)
tree86df13d673acd62016bc8253593bca0154934162 /server/sonar-server
parent2d20c0f3f27356ad1f9aa430f3e5925c50756cfc (diff)
downloadsonarqube-e5818438a289fe522c87245d5bd18d71406f0e39.tar.gz
sonarqube-e5818438a289fe522c87245d5bd18d71406f0e39.zip
SONAR-7755 deploy/plugins/index.txt should expose SonarLint compatibility
Diffstat (limited to 'server/sonar-server')
-rw-r--r--server/sonar-server/pom.xml2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java30
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java6
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java10
4 files changed, 25 insertions, 23 deletions
diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml
index 8fdd868fec4..579e4f8d88b 100644
--- a/server/sonar-server/pom.xml
+++ b/server/sonar-server/pom.xml
@@ -88,7 +88,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.codehaus.sonar</groupId>
+ <groupId>org.sonarsource.update-center</groupId>
<artifactId>sonar-update-center-common</artifactId>
</dependency>
<dependency>
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java b/server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java
index 038ff9fb24a..7625e39e169 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java
@@ -20,21 +20,6 @@
package org.sonar.server.ce.ws;
-import static java.lang.String.format;
-import static java.util.Collections.singletonList;
-import static org.apache.commons.lang.StringUtils.defaultString;
-import static org.sonar.api.utils.DateUtils.parseDateQuietly;
-import static org.sonar.api.utils.DateUtils.parseDateTimeQuietly;
-import static org.sonar.server.ws.WsUtils.checkRequest;
-import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_ID;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_QUERY;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MAX_EXECUTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MIN_SUBMITTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_ONLY_CURRENTS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_STATUS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_TYPE;
-
import com.google.common.base.Joiner;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
@@ -71,6 +56,21 @@ import org.sonarqube.ws.WsCe;
import org.sonarqube.ws.WsCe.ActivityResponse;
import org.sonarqube.ws.client.ce.ActivityWsRequest;
+import static java.lang.String.format;
+import static java.util.Collections.singletonList;
+import static org.apache.commons.lang.StringUtils.defaultString;
+import static org.sonar.api.utils.DateUtils.parseDateQuietly;
+import static org.sonar.api.utils.DateUtils.parseDateTimeQuietly;
+import static org.sonar.server.ws.WsUtils.checkRequest;
+import static org.sonar.server.ws.WsUtils.writeProtobuf;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_ID;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_QUERY;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MAX_EXECUTED_AT;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MIN_SUBMITTED_AT;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_ONLY_CURRENTS;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_STATUS;
+import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_TYPE;
+
public class ActivityAction implements CeWsAction {
private static final int OFFSET = 0;
private static final int MAX_PAGE_SIZE = 1000;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
index 861f6375b39..a248ffef263 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
@@ -21,7 +21,9 @@ package org.sonar.server.platform.platformlevel;
import java.util.Properties;
import javax.annotation.Nullable;
-import org.sonar.api.internal.RuntimeApiVersionFactory;
+import org.sonar.api.SonarProduct;
+import org.sonar.api.SonarQubeSide;
+import org.sonar.api.internal.SonarRuntimeFactory;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.internal.TempFolderCleaner;
import org.sonar.ce.property.CePropertyDefinitions;
@@ -68,7 +70,7 @@ public class PlatformLevel1 extends PlatformLevel {
add(platform, properties);
addExtraRootComponents();
add(
- RuntimeApiVersionFactory.create(System2.INSTANCE, false),
+ SonarRuntimeFactory.create(System2.INSTANCE, SonarProduct.SONARQUBE, SonarQubeSide.SERVER),
ProcessCommandWrapperImpl.class,
RestartFlagHolderImpl.class,
WebServerSettings.class,
diff --git a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java b/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
index e481935ee65..6dba5e491aa 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Annotation;
import java.util.Map;
import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
-import org.sonar.api.RuntimeApiVersion;
+import org.sonar.api.SonarRuntime;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.core.platform.PluginInfo;
@@ -38,14 +38,14 @@ import static java.util.Objects.requireNonNull;
*/
public abstract class ServerExtensionInstaller {
- private final RuntimeApiVersion runtimeApiVersion;
+ private final SonarRuntime sonarRuntime;
private final PluginRepository pluginRepository;
private final Class<? extends Annotation>[] supportedAnnotationTypes;
- protected ServerExtensionInstaller(RuntimeApiVersion runtimeApiVersion, PluginRepository pluginRepository,
+ protected ServerExtensionInstaller(SonarRuntime sonarRuntime, PluginRepository pluginRepository,
Class<? extends Annotation>... supportedAnnotationTypes) {
requireNonNull(supportedAnnotationTypes, "At least one supported annotation type must be specified");
- this.runtimeApiVersion = runtimeApiVersion;
+ this.sonarRuntime = sonarRuntime;
this.pluginRepository = pluginRepository;
this.supportedAnnotationTypes = supportedAnnotationTypes;
}
@@ -59,7 +59,7 @@ public abstract class ServerExtensionInstaller {
Plugin plugin = pluginRepository.getPluginInstance(pluginKey);
container.addExtension(pluginInfo, plugin);
- Plugin.Context context = new Plugin.Context(runtimeApiVersion.get(), runtimeApiVersion.isSonarlintRuntime());
+ Plugin.Context context = new Plugin.Context(sonarRuntime);
plugin.define(context);
for (Object extension : context.getExtensions()) {
if (installExtension(container, pluginInfo, extension, true) != null) {