diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2016-04-11 14:27:32 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2016-04-11 16:08:38 +0200 |
commit | ea7aefed7960719825584238ce311d4db71d0cae (patch) | |
tree | e83e33d5e32b4a9b62491de4b8cf578bff602f12 /src/main/java/org/sonarsource/scanner/cli/Conf.java | |
parent | e87f05efbc57e816503f74811bde44859c8f009b (diff) | |
download | sonar-scanner-cli-ea7aefed7960719825584238ce311d4db71d0cae.tar.gz sonar-scanner-cli-ea7aefed7960719825584238ce311d4db71d0cae.zip |
SQSCANNER-7 SQSCANNER-6 Deprecate sonar-runner and SONAR_RUNNER_OPTS
And replace by sonar-scanner and SONAR_SCANNER_OPTS
Diffstat (limited to 'src/main/java/org/sonarsource/scanner/cli/Conf.java')
-rw-r--r-- | src/main/java/org/sonarsource/scanner/cli/Conf.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Conf.java b/src/main/java/org/sonarsource/scanner/cli/Conf.java index 74f0f62..cf2b37f 100644 --- a/src/main/java/org/sonarsource/scanner/cli/Conf.java +++ b/src/main/java/org/sonarsource/scanner/cli/Conf.java @@ -32,8 +32,8 @@ import java.util.Map; import java.util.Properties; class Conf { - private static final String RUNNER_HOME = "runner.home"; - private static final String RUNNER_SETTINGS = "runner.settings"; + private static final String SCANNER_HOME = "scanner.home"; + private static final String SCANNER_SETTINGS = "scanner.settings"; private static final String PROJECT_HOME = "project.home"; private static final String PROJECT_SETTINGS = "project.settings"; private static final String PROPERTY_MODULES = "sonar.modules"; @@ -62,7 +62,7 @@ class Conf { } private Properties loadGlobalProperties() throws IOException { - Path settingsFile = locatePropertiesFile(cli.properties(), RUNNER_HOME, "conf/sonar-runner.properties", RUNNER_SETTINGS); + Path settingsFile = locatePropertiesFile(cli.properties(), SCANNER_HOME, "conf/sonar-scanner.properties", SCANNER_SETTINGS); if (settingsFile != null && Files.isRegularFile(settingsFile)) { logger.info("Scanner configuration file: " + settingsFile); return toProperties(settingsFile); @@ -74,7 +74,7 @@ class Conf { private Properties loadProjectProperties() throws IOException { Properties rootProps = new Properties(); Properties knownProps = new Properties(); - + knownProps.putAll(System.getProperties()); knownProps.putAll(cli.properties()); @@ -121,7 +121,7 @@ class Conf { if (parentProps.containsKey(PROPERTY_MODULES)) { for (String module : getListFromProperty(parentProps, PROPERTY_MODULES)) { Properties moduleProps = extractModuleProperties(module, parentProps); - //higher priority to child configuration files + // higher priority to child configuration files loadModuleConfigFile(parentBaseDir, moduleProps, module); // the child project may have children as well @@ -184,9 +184,9 @@ class Conf { private static Path locatePropertiesFile(Properties props, String homeKey, String relativePathFromHome, String settingsKey) { Path settingsFile = null; - String runnerHome = props.getProperty(homeKey, ""); - if (!"".equals(runnerHome)) { - settingsFile = Paths.get(runnerHome, relativePathFromHome); + String scannerHome = props.getProperty(homeKey, ""); + if (!"".equals(scannerHome)) { + settingsFile = Paths.get(scannerHome, relativePathFromHome); } return locatePropertiesFile(settingsFile, props, settingsKey); |