diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-08 15:10:22 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-08 15:10:22 +0200 |
commit | d671ed5664c30dac695725ec1ce726fe404e20c5 (patch) | |
tree | 380c3bf5c758bcca98ba79aa7e8bf57a8a91130d | |
parent | 1d05be2d33309c07476298e974c6cd62ef586b01 (diff) | |
download | sonarqube-d671ed5664c30dac695725ec1ce726fe404e20c5.tar.gz sonarqube-d671ed5664c30dac695725ec1ce726fe404e20c5.zip |
SONAR-5370 Deprecate usage of "sonar.profile" as an analysis parameter
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java b/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java index bcde2f88a05..8340c63a681 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java +++ b/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java @@ -19,6 +19,8 @@ */ package org.sonar.batch.referential; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.batch.bootstrap.AnalysisMode; import org.sonar.batch.bootstrap.ServerClient; @@ -31,6 +33,8 @@ import java.net.URLEncoder; public class DefaultProjectReferentialsLoader implements ProjectReferentialsLoader { + private static final Logger LOG = LoggerFactory.getLogger(DefaultProjectReferentialsLoader.class); + private static final String BATCH_PROJECT_URL = "/batch/project"; private final ServerClient serverClient; @@ -45,6 +49,8 @@ public class DefaultProjectReferentialsLoader implements ProjectReferentialsLoad public ProjectReferentials load(ProjectReactor reactor, TaskProperties taskProperties) { String url = BATCH_PROJECT_URL + "?key=" + reactor.getRoot().getKeyWithBranch(); if (taskProperties.properties().containsKey(ModuleQProfiles.SONAR_PROFILE_PROP)) { + LOG.warn("Ability to set quality profile from command line using '" + ModuleQProfiles.SONAR_PROFILE_PROP + + "' is deprecated and will be dropped in a future SonarQube version. Please configure quality profile used by your project on SonarQube server."); try { url += "&profile=" + URLEncoder.encode(taskProperties.properties().get(ModuleQProfiles.SONAR_PROFILE_PROP), "UTF-8"); } catch (UnsupportedEncodingException e) { |