From d671ed5664c30dac695725ec1ce726fe404e20c5 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Wed, 8 Oct 2014 15:10:22 +0200 Subject: [PATCH] SONAR-5370 Deprecate usage of "sonar.profile" as an analysis parameter --- .../batch/referential/DefaultProjectReferentialsLoader.java | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.39.5