diff options
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap')
27 files changed, 39 insertions, 42 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java index eeb4f04ac9d..b31779a08a3 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/AbstractExtensionDictionary.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java index ef0ceb4a0db..bc9e0376bb0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/BatchComponents.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/EnvironmentConfig.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/EnvironmentConfig.java index d26e5b46416..ec012c819a4 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/EnvironmentConfig.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/EnvironmentConfig.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionInstaller.java index d9561394360..4c58380d8f9 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionInstaller.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionInstaller.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionMatcher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionMatcher.java index 6f16fe87673..c9b837b3f2b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionMatcher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionMatcher.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionUtils.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionUtils.java index a6adeeda92c..50d2340d083 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionUtils.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionUtils.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java index 7c4b1670786..dc31bece5ce 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalAnalysisMode.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java index bcfcb74f9b2..03a43325531 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfiguration.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfigurationProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfigurationProvider.java index 3bc37c9a25a..e427578b9f1 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfigurationProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalConfigurationProvider.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettings.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettings.java index a612bb17a68..bbd721922b6 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettings.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettings.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettingsProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettingsProvider.java index e162f89dcb4..a85482cd50b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettingsProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalServerSettingsProvider.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java index 07711d1b782..7a552fcec53 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginFiles.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginFiles.java index 08a6270e67d..0a852a38efa 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginFiles.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginFiles.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginInstaller.java index e4ae17968be..ae79b74853e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginInstaller.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginInstaller.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionary.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionary.java index f17febf58f9..09190332f52 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionary.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionary.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoder.java index f67b41bf40c..6620ffcf486 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerLogbackEncoder.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerMain.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerMain.java index 3ef1de25629..0fe2c3ad479 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerMain.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerMain.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPlugin.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPlugin.java index 0053009338a..3a8c455f4e0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPlugin.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPlugin.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java index 081410361d6..1ba5658354c 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginJarExploder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginJarExploder.java index 251a12cc8f0..c8cd6ba2663 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginJarExploder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginJarExploder.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginRepository.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginRepository.java index fb2834604f6..3187c2e9aa3 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginRepository.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginRepository.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java index a766101f54a..918c9bc7875 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHome.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHome.java index afbc0bb3c18..3d1180132ec 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHome.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHome.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHomeProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHomeProvider.java index da97e011ba8..0716cc113c6 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHomeProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SonarUserHomeProvider.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java index a6193218f31..dadda1a1482 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringGlobalContainer.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,10 +19,10 @@ */ package org.sonar.scanner.bootstrap; +import jakarta.annotation.Priority; import java.time.Clock; import java.util.List; import java.util.Map; -import jakarta.annotation.Priority; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -141,7 +141,9 @@ public class SpringGlobalContainer extends SpringComponentContainer { } new SpringScannerContainer(this).execute(); - LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime)); + if (LOG.isInfoEnabled()) { + LOG.info("Analysis total time: {}", formatTime(System.currentTimeMillis() - startTime)); + } } private void installRequiredPlugins() { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java index c368316f7fb..29f1389e20c 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or @@ -19,8 +19,8 @@ */ package org.sonar.scanner.bootstrap; -import javax.annotation.Nullable; import jakarta.annotation.Priority; +import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.internal.FileMetadata; @@ -28,7 +28,6 @@ import org.sonar.api.batch.rule.CheckFactory; import org.sonar.api.batch.sensor.issue.internal.DefaultNoSonarFilter; import org.sonar.api.config.PropertyDefinition; import org.sonar.api.scan.filesystem.PathResolver; -import org.sonar.api.utils.MessageException; import org.sonar.core.extension.CoreExtensionsInstaller; import org.sonar.core.metric.ScannerMetrics; import org.sonar.core.platform.SpringComponentContainer; @@ -160,10 +159,12 @@ public class SpringScannerContainer extends SpringComponentContainer { private void addSuffixesDeprecatedProperties() { add( - /* This is needed to support properly the deprecated sonar.rpg.suffixes property when the download optimization feature is enabled. - The value of the property is needed at the preprocessing stage, but being defined by an optional analyzer means that at preprocessing - it won't be properly available. This will be removed in SQ 11.0 together with the drop of the property from the rpg analyzer. - See SONAR-21514 */ + /* + * This is needed to support properly the deprecated sonar.rpg.suffixes property when the download optimization feature is enabled. + * The value of the property is needed at the preprocessing stage, but being defined by an optional analyzer means that at preprocessing + * it won't be properly available. This will be removed in SQ 11.0 together with the drop of the property from the rpg analyzer. + * See SONAR-21514 + */ PropertyDefinition.builder("sonar.rpg.file.suffixes") .deprecatedKey("sonar.rpg.suffixes") .multiValues(true) @@ -308,8 +309,7 @@ public class SpringScannerContainer extends SpringComponentContainer { GitlabCi.class, Jenkins.class, SemaphoreCi.class, - TravisCi.class - ); + TravisCi.class); add(GitScmSupport.getObjects()); add(SvnScmSupport.getObjects()); @@ -336,11 +336,6 @@ public class SpringScannerContainer extends SpringComponentContainer { ScanProperties properties = getComponentByType(ScanProperties.class); properties.validate(); - properties.get("sonar.branch").ifPresent(deprecatedBranch -> { - throw MessageException.of("The 'sonar.branch' parameter is no longer supported. You should stop using it. " + - "Branch analysis is available in Developer Edition and above. See https://www.sonarsource.com/plans-and-pricing/developer/ for more information."); - }); - BranchConfiguration branchConfig = getComponentByType(BranchConfiguration.class); if (branchConfig.branchType() == BranchType.PULL_REQUEST && LOG.isInfoEnabled()) { LOG.info("Pull request {} for merge into {} from {}", branchConfig.pullRequestKey(), pullRequestBaseToDisplayName(branchConfig.targetBranchName()), diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/package-info.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/package-info.java index f9e1ab00a31..e547aa917d2 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/package-info.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/package-info.java @@ -1,6 +1,6 @@ /* * SonarQube - * Copyright (C) 2009-2024 SonarSource SA + * Copyright (C) 2009-2025 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or |