From: Simon Brandhof Date: Wed, 10 Apr 2013 07:16:30 +0000 (+0200) Subject: Revert SONARPLUGINS-2709 X-Git-Tag: 2.5-rc1~150 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9e3a7c3bd2ac4954ae0cd234ca4959ff94067c91;p=sonar-scanner-cli.git Revert SONARPLUGINS-2709 --- diff --git a/sonar-runner-batch/src/main/java/org/sonar/runner/batch/ProjectReactorBuilder.java b/sonar-runner-batch/src/main/java/org/sonar/runner/batch/ProjectReactorBuilder.java index 39d1175..ab82f6a 100644 --- a/sonar-runner-batch/src/main/java/org/sonar/runner/batch/ProjectReactorBuilder.java +++ b/sonar-runner-batch/src/main/java/org/sonar/runner/batch/ProjectReactorBuilder.java @@ -86,8 +86,9 @@ class ProjectReactorBuilder { /** * Array of all mandatory properties required for a project without child. */ - private static final String[] MANDATORY_PROPERTIES_FOR_SIMPLE_PROJECT = {PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION, - PROPERTY_SOURCES}; + private static final String[] MANDATORY_PROPERTIES_FOR_SIMPLE_PROJECT = { + PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION, PROPERTY_SOURCES + }; /** * Array of all mandatory properties required for a project with children. diff --git a/sonar-runner-impl/src/main/java/org/sonar/runner/impl/ServerConnection.java b/sonar-runner-impl/src/main/java/org/sonar/runner/impl/ServerConnection.java index f1c0ff0..7d8efeb 100644 --- a/sonar-runner-impl/src/main/java/org/sonar/runner/impl/ServerConnection.java +++ b/sonar-runner-impl/src/main/java/org/sonar/runner/impl/ServerConnection.java @@ -39,23 +39,17 @@ class ServerConnection { private final String serverUrl; private final String userAgent; - private final String login; - private final String password; - private ServerConnection(String serverUrl, String app, String appVersion, String login, String password) { + private ServerConnection(String serverUrl, String app, String appVersion) { this.serverUrl = serverUrl; this.userAgent = app + "/" + appVersion; - this.login = login; - this.password = password; } static ServerConnection create(Properties properties) { String serverUrl = properties.getProperty("sonar.host.url"); String app = properties.getProperty(InternalProperties.RUNNER_APP); String appVersion = properties.getProperty(InternalProperties.RUNNER_APP_VERSION); - String login = properties.getProperty("sonar.login"); - String password = properties.getProperty("sonar.password"); - return new ServerConnection(serverUrl, app, appVersion, login, password); + return new ServerConnection(serverUrl, app, appVersion); } void download(String path, File toFile) { @@ -108,9 +102,6 @@ class ServerConnection { request.acceptGzipEncoding().uncompress(true); request.connectTimeout(CONNECT_TIMEOUT_MILLISECONDS).readTimeout(READ_TIMEOUT_MILLISECONDS); request.userAgent(userAgent); - if (login != null) { - request.basic(login, password!=null ? password : ""); - } return request; }