From: Julien HENRY Date: Wed, 8 Oct 2014 13:10:22 +0000 (+0200) Subject: SONAR-5370 Deprecate usage of "sonar.profile" as an analysis parameter X-Git-Tag: 4.5.1-RC1~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d671ed5664c30dac695725ec1ce726fe404e20c5;p=sonarqube.git SONAR-5370 Deprecate usage of "sonar.profile" as an analysis parameter --- 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) {