SonarQube Runner
  1. SonarQube Runner
  2. SONARUNNER-58

EnvironmentInformation is badly initialized

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When using SonarEmbedder:

      EmbeddedRunner runner = EmbeddedRunner.create()
              .setApp("Maven", getMavenVersion());
      

      we could expect the EnvironmentInformation contains provided values but it is not the case as there is a property name mismatch.

      In IsolatedLauncher:

      EnvironmentInformation env = new EnvironmentInformation(properties.getProperty("sonarRunner.userAgent"), properties.getProperty("sonarRunner.userAgentVersion"));
      

      In Runner:

      public T setApp(String app, String version) {
          setProperty(InternalProperties.RUNNER_APP, app);
          setProperty(InternalProperties.RUNNER_APP_VERSION, version);
          return (T) this;
      }
      

      InternalProperties:

        String RUNNER_APP = "sonarRunner.app";
        String RUNNER_APP_VERSION = "sonarRunner.appVersion";
      

      There is a property name mismatch.

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          Tested!

          Show
          Fabrice Bellingard added a comment - Tested!
          Hide
          Julien HENRY added a comment -

          No need for dedicated IT as it is used by Maven plugin

          Show
          Julien HENRY added a comment - No need for dedicated IT as it is used by Maven plugin

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Julien HENRY
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: