diff options
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap')
7 files changed, 17 insertions, 15 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java index a91a6b38cbc..b1ee308a926 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java @@ -20,7 +20,7 @@ package org.sonar.batch.bootstrap; import org.apache.commons.io.FileUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.ZipUtils; import org.sonar.core.platform.ExplodedPlugin; import org.sonar.core.platform.PluginJarExploder; @@ -33,7 +33,7 @@ import java.io.IOException; import static org.sonar.core.util.FileUtils.deleteQuietly; -@BatchSide +@ScannerSide public class BatchPluginJarExploder extends PluginJarExploder { private final FileCache fileCache; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java index ea4380c44da..6aa3fe77320 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java @@ -31,7 +31,7 @@ import javax.annotation.Nonnull; import org.apache.commons.lang.StringUtils; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.config.Settings; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; @@ -40,7 +40,7 @@ import static com.google.common.collect.Sets.newHashSet; /** * Filters the plugins to be enabled during analysis */ -@BatchSide +@ScannerSide public class BatchPluginPredicate implements Predicate<String> { private static final Logger LOG = Loggers.get(BatchPluginPredicate.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java index 5cd52b3419c..ea6ad1e9139 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java @@ -21,7 +21,7 @@ package org.sonar.batch.bootstrap; import org.picocontainer.injectors.ProviderAdapter; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.batch.bootstrapper.EnvironmentInformation; import org.sonarqube.ws.client.HttpConnector; import org.sonarqube.ws.client.WsClientFactories; @@ -30,7 +30,7 @@ import static java.lang.Integer.parseInt; import static java.lang.String.valueOf; import static org.apache.commons.lang.StringUtils.defaultIfBlank; -@BatchSide +@ScannerSide public class BatchWsClientProvider extends ProviderAdapter { static final int CONNECT_TIMEOUT_MS = 5_000; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java index d38581f572d..d5bd2516af0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java @@ -19,12 +19,12 @@ */ package org.sonar.batch.bootstrap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * @since 3.6 */ -@BatchSide +@ScannerSide public interface ExtensionMatcher { boolean accept(Object extension); } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java index adf16a40315..9d6882420f6 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java @@ -21,6 +21,7 @@ package org.sonar.batch.bootstrap; import org.sonar.api.batch.BatchSide; import org.sonar.api.batch.InstantiationStrategy; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.AnnotationUtils; public class ExtensionUtils { @@ -36,9 +37,10 @@ public class ExtensionUtils { } return InstantiationStrategy.PER_PROJECT.equals(strategy); } - - public static boolean isBatchSide(Object extension) { - return AnnotationUtils.getAnnotation(extension, BatchSide.class) != null; + + public static boolean isScannerSide(Object extension) { + return AnnotationUtils.getAnnotation(extension, BatchSide.class) != null || + AnnotationUtils.getAnnotation(extension, ScannerSide.class) != null; } public static boolean isType(Object extension, Class<?> extensionClass) { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java index 1735ab4a79b..735eeb4089f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java @@ -20,7 +20,7 @@ package org.sonar.batch.bootstrap; import com.google.common.collect.Lists; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionProvider; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.measures.CoreMetrics; @@ -29,7 +29,7 @@ import org.sonar.api.measures.Metrics; import java.util.List; -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) public class MetricProvider extends ExtensionProvider { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java index 4525027dbaa..fc07d4c2a77 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java @@ -21,10 +21,10 @@ package org.sonar.batch.bootstrap; import java.util.Map; import org.sonar.api.Plugin; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.core.platform.PluginInfo; -@BatchSide +@ScannerSide public interface PluginInstaller { /** |