private Settings settings;
- public CreateSubProjects(ProjectReactor reactor, Settings settings) {
- super(reactor);
-
+ public CreateSubProjects(Settings settings) {
// A real implementation should for example use the configuration
this.settings = settings;
}
+
/*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
public final class RenameProject extends ProjectBuilder {
private Settings settings;
-
- public RenameProject(ProjectReactor reactor, Settings settings) {
- super(reactor);
+
+ public RenameProject(Settings settings) {
this.settings = settings;
}
*/
package org.sonar.ce.container;
-import static java.lang.String.valueOf;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonar.process.ProcessEntryPoint.PROPERTY_PROCESS_INDEX;
-import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH;
-import static org.sonar.process.ProcessProperties.PATH_DATA;
-import static org.sonar.process.ProcessProperties.PATH_HOME;
-import static org.sonar.process.ProcessProperties.PATH_TEMP;
-import static org.sonar.process.ProcessProperties.STARTED_AT;
-
import java.io.File;
import java.io.IOException;
import java.util.Date;
import org.sonar.process.ProcessId;
import org.sonar.process.Props;
+import static java.lang.String.valueOf;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.sonar.process.ProcessEntryPoint.PROPERTY_PROCESS_INDEX;
+import static org.sonar.process.ProcessEntryPoint.PROPERTY_SHARED_PATH;
+import static org.sonar.process.ProcessProperties.PATH_DATA;
+import static org.sonar.process.ProcessProperties.PATH_HOME;
+import static org.sonar.process.ProcessProperties.PATH_TEMP;
+import static org.sonar.process.ProcessProperties.STARTED_AT;
+
public class ComputeEngineContainerImplTest {
private static final int CONTAINER_ITSELF = 1;
private static final int COMPONENTS_IN_LEVEL_1_AT_CONSTRUCTION = CONTAINER_ITSELF + 1;
+ 22 // level 1
+ 46 // content of DaoModule
+ 1 // content of EsSearchModule
- + 56 // content of CorePropertyDefinitions
+ + 55 // content of CorePropertyDefinitions
+ 1 // content of CePropertyDefinitions
);
assertThat(picoContainer.getParent().getParent().getParent().getParent()).isNull();
*/
package org.sonar.core.config;
-import static org.sonar.api.database.DatabaseProperties.PROP_PASSWORD;
-
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import java.util.Arrays;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.resources.Qualifiers;
+import static org.sonar.api.database.DatabaseProperties.PROP_PASSWORD;
+
public class CorePropertyDefinitions {
/* Time machine periods */
// BATCH
- PropertyDefinition.builder(CoreProperties.CORE_VIOLATION_LOCALE_PROPERTY)
- .defaultValue("en")
- .name("Locale used for issue messages")
- .description("Deprecated property. Keep default value for backward compatibility.")
- .hidden()
- .build(),
-
PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 1)
.name("Leak Period")
.description("Period used to compare measures and track new issues. Values are : <ul class='bullet'><li>Number of days before " +
*/
String CATEGORY_CODE_COVERAGE = "codeCoverage";
- /**
- * @see #SUBCATEGORY_DUPLICATIONS
- * @since 2.11
- * @deprecated since 4.0. See http://jira.sonarsource.com/browse/SONAR-4660. Do not forget to remove the properties from core bundles
- */
- @Deprecated
- String CATEGORY_DUPLICATIONS = "duplications";
-
/**
* @since 2.11
*/
String CATEGORY_SECURITY = "security";
/**
- * @see #SUBCATEGORY_L10N
* @since 2.11
- * @deprecated since 4.0. See http://jira.sonarsource.com/browse/SONAR-4660. Do not forget to remove the properties from core bundles
+ * @deprecated since 6.0
*/
@Deprecated
- String CATEGORY_L10N = "localization";
-
- /**
- * @since 2.11
- */
String CATEGORY_JAVA = "java";
- /**
- * @see #SUBCATEGORY_DIFFERENTIAL_VIEWS
- * @since 2.11
- * @deprecated since 4.0. See http://jira.sonarsource.com/browse/SONAR-4660. Do not forget to remove the properties from core bundles
- */
- @Deprecated
- String CATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";
-
/**
* @since 3.3
*/
@Deprecated
String PROJECT_LANGUAGE_PROPERTY = "sonar.language";
- /**
- * @deprecated since 4.3. See http://jira.sonarsource.com/browse/SONAR-5185
- */
- @Deprecated
- String DYNAMIC_ANALYSIS_PROPERTY = "sonar.dynamicAnalysis";
-
/* Exclusions */
String PROJECT_INCLUSIONS_PROPERTY = "sonar.inclusions";
String PROJECT_EXCLUSIONS_PROPERTY = "sonar.exclusions";
/* Sonar Core */
- /**
- * @deprecated since 4.1. See http://jira.sonarsource.com/browse/SONAR-4875
- */
- @Deprecated
- String CORE_VIOLATION_LOCALE_PROPERTY = "sonar.violationLocale";
-
- String CORE_VIOLATION_LOCALE_DEFAULT_VALUE = "en";
-
String CORE_FORCE_AUTHENTICATION_PROPERTY = "sonar.forceAuthentication";
boolean CORE_FORCE_AUTHENTICATION_DEFAULT_VALUE = false;
String CORE_ALLOW_USERS_TO_SIGNUP_PROPERTY = "sonar.allowUsersToSignUp";
*/
String PROFILING_LOG_PROPERTY = "sonar.showProfiling";
- /**
- * @deprecated replaced in v3.4 by properties specific to languages, for example sonar.java.coveragePlugin
- * See http://jira.sonarsource.com/browse/SONARJAVA-39 for more details.
- */
- @Deprecated
- String CORE_COVERAGE_PLUGIN_PROPERTY = "sonar.core.codeCoveragePlugin";
-
- /**
- * @since 3.7
- * @deprecated in 4.0 no more used
- */
- @Deprecated
- String DRY_RUN_READ_TIMEOUT_SEC = "sonar.dryRun.readTimeout";
-
/**
* @since 4.0
* @deprecated in 5.1 no more used
*/
package org.sonar.api.batch.bootstrap;
-import org.sonar.api.batch.ScannerSide;
import org.sonar.api.ExtensionPoint;
import org.sonar.api.batch.InstantiationStrategy;
+import org.sonar.api.batch.ScannerSide;
/**
* This extension point allows to change project structure at runtime. It is executed once during task startup.
ProjectReactor projectReactor();
}
- /**
- * Don't inject ProjectReactor as it may not be available
- * @deprecated since 3.7 use {@link #ProjectBuilder()}
- */
- @Deprecated
- protected ProjectBuilder(final ProjectReactor reactor) {
- }
-
/**
* @since 3.7
*/
Date analysisDate = loadAnalysisDate();
project
.setAnalysisDate(analysisDate)
- .setAnalysisVersion(loadAnalysisVersion())
- .setAnalysisType(loadAnalysisType());
+ .setAnalysisVersion(loadAnalysisVersion());
return this;
}
return date;
}
- private Project.AnalysisType loadAnalysisType() {
- String value = settings.getString(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY);
- if (value == null) {
- return Project.AnalysisType.DYNAMIC;
- }
-
- LOG.warn("'sonar.dynamicAnalysis' is deprecated since version 4.3 and should no longer be used.");
- if ("true".equals(value)) {
- return Project.AnalysisType.DYNAMIC;
- }
- if ("reuseReports".equals(value)) {
- return Project.AnalysisType.REUSE_REPORTS;
- }
- return Project.AnalysisType.STATIC;
- }
-
private String loadAnalysisVersion() {
return settings.getString(CoreProperties.PROJECT_VERSION_PROPERTY);
}
assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.DYNAMIC);
}
- @Test
- public void explicit_dynamic_analysis() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "true");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.DYNAMIC);
- }
-
- @Test
- public void explicit_static_analysis() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "false");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.STATIC);
- }
-
- @Test
- public void explicit_dynamic_analysis_reusing_reports() {
- Settings configuration = new Settings();
- configuration.setProperty(CoreProperties.DYNAMIC_ANALYSIS_PROPERTY, "reuseReports");
- Project project = new Project("key");
- new ProjectConfigurator(configuration, system2).configure(project);
- assertThat(project.getAnalysisType()).isEqualTo(Project.AnalysisType.REUSE_REPORTS);
- }
-
@Test
public void is_dynamic_analysis() {
assertThat(Project.AnalysisType.DYNAMIC.isDynamic(false)).isTrue();