diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-26 10:21:36 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-26 10:21:36 +0200 |
commit | b9cbe793a91f738bac414749ac565d27eef715e1 (patch) | |
tree | a38656a72827d796d0223dfa1238732f30a8ca15 | |
parent | 133e4d17df16d3aca749b0181c56a5565e13d56c (diff) | |
download | sonarqube-b9cbe793a91f738bac414749ac565d27eef715e1.tar.gz sonarqube-b9cbe793a91f738bac414749ac565d27eef715e1.zip |
Revert "SONAR-5620 Don't fail build when no provider is detected"
This reverts commit 7fd608ab6c9de5df88b77984dc431ce3066782ac.
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchComponents.java | 8 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scm/ScmConfiguration.java) | 10 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivitySensor.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java) | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchComponents.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchComponents.java index 596400c8948..c600e01f7e9 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchComponents.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchComponents.java @@ -30,8 +30,8 @@ import org.sonar.batch.maven.DefaultMavenPluginExecutor; import org.sonar.batch.maven.MavenProjectBootstrapper; import org.sonar.batch.maven.MavenProjectBuilder; import org.sonar.batch.maven.MavenProjectConverter; -import org.sonar.batch.scm.ScmConfiguration; -import org.sonar.batch.scm.ScmSensor; +import org.sonar.batch.scm.ScmActivityConfiguration; +import org.sonar.batch.scm.ScmActivitySensor; import org.sonar.core.config.CorePropertyDefinitions; import java.util.Collection; @@ -56,8 +56,8 @@ public class BatchComponents { FileTangleIndexDecorator.class, // SCM - ScmConfiguration.class, - ScmSensor.class + ScmActivityConfiguration.class, + ScmActivitySensor.class ); components.addAll(CorePropertyDefinitions.all()); return components; diff --git a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java index 11e00d0964c..36526063b6f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmConfiguration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java @@ -34,8 +34,8 @@ import java.util.LinkedHashMap; import java.util.Map; @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -public final class ScmConfiguration implements BatchComponent, Startable { - private static final Logger LOG = LoggerFactory.getLogger(ScmConfiguration.class); +public final class ScmActivityConfiguration implements BatchComponent, Startable { + private static final Logger LOG = LoggerFactory.getLogger(ScmActivityConfiguration.class); private final ProjectReactor projectReactor; private final Settings settings; @@ -43,7 +43,7 @@ public final class ScmConfiguration implements BatchComponent, Startable { private ScmProvider provider; - public ScmConfiguration(ProjectReactor projectReactor, Settings settings, ScmProvider... providers) { + public ScmActivityConfiguration(ProjectReactor projectReactor, Settings settings, ScmProvider... providers) { this.projectReactor = projectReactor; this.settings = settings; for (ScmProvider scmProvider : providers) { @@ -51,7 +51,7 @@ public final class ScmConfiguration implements BatchComponent, Startable { } } - public ScmConfiguration(ProjectReactor projectReactor, Settings settings) { + public ScmActivityConfiguration(ProjectReactor projectReactor, Settings settings) { this(projectReactor, settings, new ScmProvider[0]); } @@ -82,7 +82,7 @@ public final class ScmConfiguration implements BatchComponent, Startable { } } if (this.provider == null) { - LOG.warn("SCM provider autodetection failed. No SCM provider claims to support this project. Please use " + CoreProperties.SCM_PROVIDER_KEY + throw new IllegalStateException("SCM provider autodetection failed. No provider claim to support this project. Please use " + CoreProperties.SCM_PROVIDER_KEY + " to define SCM of your project."); } } diff --git a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivitySensor.java index 8c729c605ec..ba7a1fe0ee7 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivitySensor.java @@ -45,19 +45,19 @@ import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; -public final class ScmSensor implements Sensor { +public final class ScmActivitySensor implements Sensor { - private static final Logger LOG = LoggerFactory.getLogger(ScmSensor.class); + private static final Logger LOG = LoggerFactory.getLogger(ScmActivitySensor.class); private static final Pattern NON_ASCII_CHARS = Pattern.compile("[^\\x00-\\x7F]"); private static final Pattern ACCENT_CODES = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); private final ProjectDefinition projectDefinition; - private final ScmConfiguration configuration; + private final ScmActivityConfiguration configuration; private final FileSystem fs; private final ProjectReferentials projectReferentials; - public ScmSensor(ProjectDefinition projectDefinition, ScmConfiguration configuration, + public ScmActivitySensor(ProjectDefinition projectDefinition, ScmActivityConfiguration configuration, ProjectReferentials projectReferentials, FileSystem fs) { this.projectDefinition = projectDefinition; this.configuration = configuration; @@ -68,7 +68,7 @@ public final class ScmSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor - .name("SCM Sensor") + .name("SCM Activity Sensor") .provides(CoreMetrics.SCM_AUTHORS_BY_LINE, CoreMetrics.SCM_LAST_COMMIT_DATETIMES_BY_LINE, CoreMetrics.SCM_REVISIONS_BY_LINE); |