diff options
author | Claire Villard <claire.villard@sonarsource.com> | 2024-04-26 15:30:23 +0200 |
---|---|---|
committer | Claire Villard <60586848+claire-villard-sonarsource@users.noreply.github.com> | 2024-04-29 01:20:25 -0600 |
commit | 773c70fc2bc829183d3915bfbcb968eff4941237 (patch) | |
tree | 3d3de9652fa233dfebf6a147a3919d39dab44cd1 /src/main | |
parent | 98f8be682a4f254b2a9f1ed0e51f0f2df12942f1 (diff) | |
download | sonar-scanner-cli-773c70fc2bc829183d3915bfbcb968eff4941237.tar.gz sonar-scanner-cli-773c70fc2bc829183d3915bfbcb968eff4941237.zip |
SCANCLI-130 Set sonar.scanner.bootstrapStartTime
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/sonarsource/scanner/cli/Conf.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Conf.java b/src/main/java/org/sonarsource/scanner/cli/Conf.java index 3004b59..19b020e 100644 --- a/src/main/java/org/sonarsource/scanner/cli/Conf.java +++ b/src/main/java/org/sonarsource/scanner/cli/Conf.java @@ -43,15 +43,18 @@ class Conf { private static final String PROPERTY_PROJECT_CONFIG_FILE = "sonar.projectConfigFile"; private static final String SONAR_PROJECT_PROPERTIES_FILENAME = "sonar-project.properties"; static final String PROPERTY_SONAR_HOST_URL = "sonar.host.url"; + private static final String BOOTSTRAP_START_TIME = "sonar.scanner.bootstrapStartTime"; private final Cli cli; private final Logs logger; private final Map<String, String> env; + private final long startTimeMs; Conf(Cli cli, Logs logger, Map<String, String> env) { this.cli = cli; this.logger = logger; this.env = env; + this.startTimeMs = System.currentTimeMillis(); } Properties properties() { @@ -66,6 +69,8 @@ class Conf { // root project base directory must be present and be absolute result.setProperty(PROPERTY_PROJECT_BASEDIR, getRootProjectBaseDir(result).toString()); result.remove(PROJECT_HOME); + + result.setProperty(BOOTSTRAP_START_TIME, String.valueOf(startTimeMs)); return result; } |