package org.sonar.server.plugins;
import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ListMultimap;
import java.lang.annotation.Annotation;
+import java.util.Collection;
import java.util.Map;
+import java.util.Set;
+import javax.annotation.Nullable;
import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
+import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;
/**
private final SonarRuntime sonarRuntime;
private final PluginRepository pluginRepository;
- private final Class<? extends Annotation>[] supportedAnnotationTypes;
+ private final Set<Class<? extends Annotation>> supportedAnnotationTypes;
+
+ protected ServerExtensionInstaller(SonarRuntime sonarRuntime, PluginRepository pluginRepository,
+ @Nullable Collection<Class<? extends Annotation>> supportedAnnotationTypes) {
+ checkArgument(supportedAnnotationTypes != null && !supportedAnnotationTypes.isEmpty(),
+ "At least one supported annotation type must be specified");
+ this.sonarRuntime = sonarRuntime;
+ this.pluginRepository = pluginRepository;
+ this.supportedAnnotationTypes = ImmutableSet.copyOf(supportedAnnotationTypes);
+
+ }
protected ServerExtensionInstaller(SonarRuntime sonarRuntime, PluginRepository pluginRepository,
Class<? extends Annotation>... supportedAnnotationTypes) {
requireNonNull(supportedAnnotationTypes, "At least one supported annotation type must be specified");
this.sonarRuntime = sonarRuntime;
this.pluginRepository = pluginRepository;
- this.supportedAnnotationTypes = supportedAnnotationTypes;
+ this.supportedAnnotationTypes = ImmutableSet.copyOf(supportedAnnotationTypes);
}
public void installExtensions(ComponentContainer container) {
import com.sonar.orchestrator.OrchestratorBuilder;
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.SonarScanner;
+import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
import org.sonarqube.tests.plugins.checks.AbapCheck;
import org.sonarqube.tests.plugins.checks.CCheck;
import org.sonarqube.tests.plugins.checks.Check;
import org.sonarqube.tests.plugins.checks.JavaCheck;
import org.sonarqube.tests.plugins.checks.JavascriptCheck;
import org.sonarqube.tests.plugins.checks.PhpCheck;
-import org.sonarqube.tests.plugins.checks.PliCheck;
import org.sonarqube.tests.plugins.checks.PythonCheck;
import org.sonarqube.tests.plugins.checks.RpgCheck;
import org.sonarqube.tests.plugins.checks.SwiftCheck;
import org.sonarqube.tests.plugins.checks.Validation;
-import org.sonarqube.tests.plugins.checks.VbCheck;
import org.sonarqube.tests.plugins.checks.WebCheck;
-import java.io.File;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
import static com.sonar.orchestrator.locator.FileLocation.byWildcardMavenFilename;
import static org.assertj.core.api.Assertions.fail;
new JavaCheck(),
new JavascriptCheck(),
new PhpCheck(),
- new PliCheck(),
+ // SONAR-7618 SonarPLI 1.5.0.702 not compatible with CE not loading @ServerSide
+ // new PliCheck(),
new PythonCheck(),
new RpgCheck(),
new SwiftCheck(),
- new VbCheck(),
+ // SONAR-7618 Visual Basic 2.2 not compatible with CE not loading @ServerSide
+ // new VbCheck(),
new WebCheck());
private static Orchestrator ORCHESTRATOR;
installPlugin(builder, "lua");
installPlugin(builder, "php");
installPlugin(builder, "pitest");
- installPlugin(builder, "pli");
- installPlugin(builder, "plsql");
+ // SONAR-7618 SonarPLI 1.5.0.702 not compatible with CE not loading @ServerSide
+ // installPlugin(builder, "pli");
+ // SONAR-7618 SonarPLSQL 2.9.0.901 not compatible with CE not loading @ServerSide
+ // installPlugin(builder, "plsql");
installPlugin(builder, "pmd");
// FIXME puppet plugin is temporarily disabled because it is not compatible with SQ 6.4 until usage of Colorizer API is removed
installPlugin(builder, "python");
installPlugin(builder, "sonargraphintegration");
installPlugin(builder, "status");
installPlugin(builder, "swift");
- installPlugin(builder, "vb");
+ // SONAR-7618 Visual Basic 2.2 not compatible with CE not loading @ServerSide
+ // installPlugin(builder, "vb");
installPlugin(builder, "vbnet");
installPlugin(builder, "web");
installPlugin(builder, "xanitizer");
private static void activateLicenses(OrchestratorBuilder builder) {
LICENSED_PLUGINS.forEach(builder::activateLicense);
}
-
+
private static void installPlugin(OrchestratorBuilder builder, String pluginKey) {
builder.setOrchestratorProperty(pluginKey + "Version", "LATEST_RELEASE");
builder.addPlugin(pluginKey);