]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Revert SONARPLUGINS-2709
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 10 Apr 2013 07:16:30 +0000 (09:16 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 10 Apr 2013 07:16:30 +0000 (09:16 +0200)
sonar-runner-batch/src/main/java/org/sonar/runner/batch/ProjectReactorBuilder.java
sonar-runner-impl/src/main/java/org/sonar/runner/impl/ServerConnection.java

index 39d11750d25fefd0299335ba7b702cb70258c1c1..ab82f6aa0b41b9650aceaa9046bdb5a3a1dca97c 100644 (file)
@@ -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.
index f1c0ff01af4454a218b016c6eef3cd831ac9a6b7..7d8efeb2fb9ec837da9ed8e7c1e621f8fb3a1e26 100644 (file)
@@ -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;
   }