diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-09-25 17:43:38 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-02 17:52:23 +0200 |
commit | 6122d2708aa9b2e43e6f7be50b54d6d8f7319e9b (patch) | |
tree | 01c0a7045224b59415c1dad4d54aa251c738c96d /sonar-batch | |
parent | 9ec029871a41413d38e975a075b6d0997a08da6a (diff) | |
download | sonarqube-6122d2708aa9b2e43e6f7be50b54d6d8f7319e9b.tar.gz sonarqube-6122d2708aa9b2e43e6f7be50b54d6d8f7319e9b.zip |
SONAR-5620 Don't fail build when no provider is detected
Diffstat (limited to 'sonar-batch')
-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/ScmConfiguration.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java) | 10 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java (renamed from sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivitySensor.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 c600e01f7e9..596400c8948 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.ScmActivityConfiguration; -import org.sonar.batch.scm.ScmActivitySensor; +import org.sonar.batch.scm.ScmConfiguration; +import org.sonar.batch.scm.ScmSensor; import org.sonar.core.config.CorePropertyDefinitions; import java.util.Collection; @@ -56,8 +56,8 @@ public class BatchComponents { FileTangleIndexDecorator.class, // SCM - ScmActivityConfiguration.class, - ScmActivitySensor.class + ScmConfiguration.class, + ScmSensor.class ); components.addAll(CorePropertyDefinitions.all()); return components; diff --git a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmConfiguration.java index 36526063b6f..11e00d0964c 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivityConfiguration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmConfiguration.java @@ -34,8 +34,8 @@ import java.util.LinkedHashMap; import java.util.Map; @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -public final class ScmActivityConfiguration implements BatchComponent, Startable { - private static final Logger LOG = LoggerFactory.getLogger(ScmActivityConfiguration.class); +public final class ScmConfiguration implements BatchComponent, Startable { + private static final Logger LOG = LoggerFactory.getLogger(ScmConfiguration.class); private final ProjectReactor projectReactor; private final Settings settings; @@ -43,7 +43,7 @@ public final class ScmActivityConfiguration implements BatchComponent, Startable private ScmProvider provider; - public ScmActivityConfiguration(ProjectReactor projectReactor, Settings settings, ScmProvider... providers) { + public ScmConfiguration(ProjectReactor projectReactor, Settings settings, ScmProvider... providers) { this.projectReactor = projectReactor; this.settings = settings; for (ScmProvider scmProvider : providers) { @@ -51,7 +51,7 @@ public final class ScmActivityConfiguration implements BatchComponent, Startable } } - public ScmActivityConfiguration(ProjectReactor projectReactor, Settings settings) { + public ScmConfiguration(ProjectReactor projectReactor, Settings settings) { this(projectReactor, settings, new ScmProvider[0]); } @@ -82,7 +82,7 @@ public final class ScmActivityConfiguration implements BatchComponent, Startable } } if (this.provider == null) { - throw new IllegalStateException("SCM provider autodetection failed. No provider claim to support this project. Please use " + CoreProperties.SCM_PROVIDER_KEY + LOG.warn("SCM provider autodetection failed. No SCM provider claims 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/ScmActivitySensor.java b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java index ba7a1fe0ee7..8c729c605ec 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scm/ScmActivitySensor.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scm/ScmSensor.java @@ -45,19 +45,19 @@ import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; -public final class ScmActivitySensor implements Sensor { +public final class ScmSensor implements Sensor { - private static final Logger LOG = LoggerFactory.getLogger(ScmActivitySensor.class); + private static final Logger LOG = LoggerFactory.getLogger(ScmSensor.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 ScmActivityConfiguration configuration; + private final ScmConfiguration configuration; private final FileSystem fs; private final ProjectReferentials projectReferentials; - public ScmActivitySensor(ProjectDefinition projectDefinition, ScmActivityConfiguration configuration, + public ScmSensor(ProjectDefinition projectDefinition, ScmConfiguration configuration, ProjectReferentials projectReferentials, FileSystem fs) { this.projectDefinition = projectDefinition; this.configuration = configuration; @@ -68,7 +68,7 @@ public final class ScmActivitySensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor - .name("SCM Activity Sensor") + .name("SCM Sensor") .provides(CoreMetrics.SCM_AUTHORS_BY_LINE, CoreMetrics.SCM_LAST_COMMIT_DATETIMES_BY_LINE, CoreMetrics.SCM_REVISIONS_BY_LINE); |