@Test public void special_orchestrator_property_for_web_port_is_not_used_if_port_defined_explicitly() throws Exception { prepareResolutionOfPackaging(Edition.COMMUNITY, Version.create(VERSION_4_5_6), SQ_ZIP); SonarDistribution distribution = new SonarDistribution().setVersion(VERSION_4_5_6) .setServerProperty("sonar.web.port", "10000"); Configuration.Builder configBuilder = Configuration.builder() .setProperty("orchestrator.container.port", "9999"); Server server = newInstaller(configBuilder).install(distribution); URL serverUrl = new URL(server.getUrl()); assertThat(serverUrl.getPort()).isEqualTo(10000); }
public Server install(SonarDistribution distrib) { Packaging packaging = packagingResolver.resolve(distrib); File homeDir = unzip(packaging); if (!distrib.isKeepBundledPlugins()) { removeBundledPlugins(homeDir); } copyBundledPlugins(distrib.getBundledPluginLocations(), homeDir); copyExternalPlugins(packaging, distrib.getPluginLocations(), homeDir); copyJdbcDriver(homeDir); Properties properties = configureProperties(distrib); writePropertiesFile(properties, homeDir); String host = properties.getProperty(WEB_HOST_PROPERTY); String url = format("http: return new Server(locators, homeDir, packaging.getEdition(), packaging.getVersion(), HttpUrl.parse(url), Integer.parseInt(properties.getProperty(SEARCH_PORT_PROPERTY)), (String) properties.get(SONAR_CLUSTER_NODE_NAME)); }
ServerInstaller { public Server install(SonarDistribution distrib) { Packaging packaging = packagingResolver.resolve(distrib); File homeDir = unzip(packaging); if (!distrib.isKeepBundledPlugins()) { removeBundledPlugins(homeDir); } copyBundledPlugins(distrib.getBundledPluginLocations(), homeDir); copyExternalPlugins(packaging, distrib.getPluginLocations(), homeDir); copyJdbcDriver(homeDir); Properties properties = configureProperties(distrib); writePropertiesFile(properties, homeDir); String host = properties.getProperty(WEB_HOST_PROPERTY); String url = format("http: return new Server(locators, homeDir, packaging.getEdition(), packaging.getVersion(), HttpUrl.parse(url), Integer.parseInt(properties.getProperty(SEARCH_PORT_PROPERTY)), (String) properties.get(SONAR_CLUSTER_NODE_NAME)); } }
ServerInstaller { public Server install(SonarDistribution distrib) { Packaging packaging = packagingResolver.resolve(distrib); File homeDir = unzip(packaging); if (!distrib.isKeepBundledPlugins()) { removeBundledPlugins(homeDir); } copyBundledPlugins(distrib.getBundledPluginLocations(), homeDir); copyExternalPlugins(packaging, distrib.getPluginLocations(), homeDir); copyJdbcDriver(homeDir); Properties properties = configureProperties(distrib); writePropertiesFile(properties, homeDir); String host = properties.getProperty(WEB_HOST_PROPERTY); String url = format("http: return new Server(locators, homeDir, packaging.getEdition(), packaging.getVersion(), HttpUrl.parse(url), Integer.parseInt(properties.getProperty(SEARCH_PORT_PROPERTY)), (String) properties.get(SONAR_CLUSTER_NODE_NAME)); } ServerInstaller(PackagingResolver packagingResolver, Configuration configuration, Locators locators, DatabaseClient databaseClient); }
ServerInstaller { public Server install(SonarDistribution distrib) { Packaging packaging = packagingResolver.resolve(distrib); File homeDir = unzip(packaging); if (!distrib.isKeepBundledPlugins()) { removeBundledPlugins(homeDir); } copyBundledPlugins(distrib.getBundledPluginLocations(), homeDir); copyExternalPlugins(packaging, distrib.getPluginLocations(), homeDir); copyJdbcDriver(homeDir); Properties properties = configureProperties(distrib); writePropertiesFile(properties, homeDir); String host = properties.getProperty(WEB_HOST_PROPERTY); String url = format("http: return new Server(locators, homeDir, packaging.getEdition(), packaging.getVersion(), HttpUrl.parse(url), Integer.parseInt(properties.getProperty(SEARCH_PORT_PROPERTY)), (String) properties.get(SONAR_CLUSTER_NODE_NAME)); } ServerInstaller(PackagingResolver packagingResolver, Configuration configuration, Locators locators, DatabaseClient databaseClient); Server install(SonarDistribution distrib); }
ServerInstaller { public Server install(SonarDistribution distrib) { Packaging packaging = packagingResolver.resolve(distrib); File homeDir = unzip(packaging); if (!distrib.isKeepBundledPlugins()) { removeBundledPlugins(homeDir); } copyBundledPlugins(distrib.getBundledPluginLocations(), homeDir); copyExternalPlugins(packaging, distrib.getPluginLocations(), homeDir); copyJdbcDriver(homeDir); Properties properties = configureProperties(distrib); writePropertiesFile(properties, homeDir); String host = properties.getProperty(WEB_HOST_PROPERTY); String url = format("http: return new Server(locators, homeDir, packaging.getEdition(), packaging.getVersion(), HttpUrl.parse(url), Integer.parseInt(properties.getProperty(SEARCH_PORT_PROPERTY)), (String) properties.get(SONAR_CLUSTER_NODE_NAME)); } ServerInstaller(PackagingResolver packagingResolver, Configuration configuration, Locators locators, DatabaseClient databaseClient); Server install(SonarDistribution distrib);  }