aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2018-11-14 22:47:35 +0100
committersonartech <sonartech@sonarsource.com>2019-01-16 09:43:01 +0100
commitf594bf7568192dbfc9b9a8cf4f7c243ea4ad046b (patch)
treeb4d6818199beebf97e5d4d6a10dfcebde10e7ba8 /sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis
parenta0acec09a79485117ab9c8e3c67a8446224d5de9 (diff)
downloadsonarqube-f594bf7568192dbfc9b9a8cf4f7c243ea4ad046b.tar.gz
sonarqube-f594bf7568192dbfc9b9a8cf4f7c243ea4ad046b.zip
SONAR-11465 Deprecate InputModule and introduce InputProject
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisProperties.java40
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/DefaultAnalysisMode.java3
3 files changed, 5 insertions, 44 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisProperties.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisProperties.java
deleted file mode 100644
index 0814ebdf7be..00000000000
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisProperties.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2019 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.scanner.analysis;
-
-import java.util.Map;
-import javax.annotation.Nullable;
-import org.sonar.scanner.bootstrap.UserProperties;
-
-/**
- * Batch properties that are specific to an analysis (for example
- * coming from sonar-project.properties).
- */
-public class AnalysisProperties extends UserProperties {
- public AnalysisProperties(Map<String, String> properties) {
- this(properties, null);
-
- }
-
- public AnalysisProperties(Map<String, String> properties, @Nullable String pathToSecretKey) {
- super(properties, pathToSecretKey);
- }
-
-}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java
index 84f8b64a264..9d263b17667 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java
@@ -25,7 +25,7 @@ import java.nio.file.Path;
import org.picocontainer.ComponentLifecycle;
import org.picocontainer.PicoContainer;
import org.picocontainer.injectors.ProviderAdapter;
-import org.sonar.api.batch.fs.internal.InputModuleHierarchy;
+import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.utils.TempFolder;
import org.sonar.api.utils.internal.DefaultTempFolder;
@@ -34,9 +34,9 @@ public class AnalysisTempFolderProvider extends ProviderAdapter implements Compo
private DefaultTempFolder projectTempFolder;
private boolean started = false;
- public TempFolder provide(InputModuleHierarchy moduleHierarchy) {
+ public TempFolder provide(DefaultInputProject project) {
if (projectTempFolder == null) {
- Path workingDir = moduleHierarchy.root().getWorkDir();
+ Path workingDir = project.getWorkDir();
Path tempDir = workingDir.normalize().resolve(TMP_NAME);
try {
Files.deleteIfExists(tempDir);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/DefaultAnalysisMode.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/DefaultAnalysisMode.java
index fbd3dbc2740..b97e63b9ee1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/DefaultAnalysisMode.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/DefaultAnalysisMode.java
@@ -25,6 +25,7 @@ import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.scanner.bootstrap.GlobalAnalysisMode;
+import org.sonar.scanner.bootstrap.ScannerProperties;
@Immutable
public class DefaultAnalysisMode implements AnalysisMode {
@@ -36,7 +37,7 @@ public class DefaultAnalysisMode implements AnalysisMode {
private boolean scanAllFiles;
- public DefaultAnalysisMode(AnalysisProperties props, GlobalAnalysisMode analysisMode) {
+ public DefaultAnalysisMode(ScannerProperties props, GlobalAnalysisMode analysisMode) {
this.analysisMode = analysisMode;
this.analysisProps = props.properties();
load();