Add a project-level textfield property in UI that aggregates all previous module-level properties.tags/7.6
@@ -123,7 +123,7 @@ public class ComputeEngineContainerImplTest { | |||
+ 26 // level 1 | |||
+ 60 // content of DaoModule | |||
+ 3 // content of EsModule | |||
+ 54 // content of CorePropertyDefinitions | |||
+ 55 // content of CorePropertyDefinitions | |||
+ 1 // StopFlagContainer | |||
); | |||
assertThat( |
@@ -31,7 +31,7 @@ import org.sonar.server.platform.db.migration.step.Upsert; | |||
@SupportsBlueGreen | |||
public class MigrateModuleProperties extends DataChange { | |||
protected static final String NEW_PROPERTY_NAME = "sonar.modules.archivedSettings"; | |||
protected static final String NEW_PROPERTY_NAME = "sonar.subproject.settings.archived"; | |||
private final System2 system2; | |||
@@ -62,6 +62,16 @@ public class CorePropertyDefinitions { | |||
defs.addAll(ScannerProperties.all()); | |||
defs.addAll(asList( | |||
PropertyDefinition.builder(CoreProperties.MODULE_LEVEL_ARCHIVED_SETTINGS) | |||
.name("Archived Sub-Projects Settings") | |||
.description("DEPRECATED - Recap of the properties that were previously configured at sub-project / module level. " + | |||
"These properties are not used anymore and should now be configured at project level. " + | |||
"Set this parameter to empty to prevent the analysis from displaying a warning.") | |||
.category(CoreProperties.CATEGORY_GENERAL) | |||
.subCategory(CoreProperties.SUBCATEGORY_MODULES) | |||
.onlyOnQualifiers(Qualifiers.PROJECT) | |||
.type(PropertyType.TEXT) | |||
.build(), | |||
PropertyDefinition.builder(CoreProperties.SERVER_BASE_URL) | |||
.name("Server base URL") | |||
.description("HTTP URL of this SonarQube server, such as <i>http://yourhost.yourdomain/sonar</i>. This value is used i.e. to create links in emails.") |
@@ -874,6 +874,7 @@ property.category.general.localization=Localization | |||
property.category.general.databaseCleaner=Database Cleaner | |||
property.category.general.looknfeel=Look & Feel | |||
property.category.general.issues=Issues | |||
property.category.general.subProjects=Sub-projects | |||
property.category.organizations=Organizations | |||
property.category.security=Security | |||
property.category.security.encryption=Encryption |
@@ -30,7 +30,7 @@ public class CorePropertyDefinitionsTest { | |||
@Test | |||
public void all() { | |||
List<PropertyDefinition> defs = CorePropertyDefinitions.all(); | |||
assertThat(defs).hasSize(54); | |||
assertThat(defs).hasSize(55); | |||
} | |||
@Test |
@@ -44,6 +44,11 @@ public interface CoreProperties { | |||
*/ | |||
String SUBCATEGORY_DATABASE_CLEANER = "databaseCleaner"; | |||
/** | |||
* @since 7.6 | |||
*/ | |||
String SUBCATEGORY_MODULES = "subProjects"; | |||
/** | |||
* @since 4.0 | |||
*/ | |||
@@ -530,5 +535,5 @@ public interface CoreProperties { | |||
/** | |||
* @since 7.6 | |||
*/ | |||
String MODULE_LEVEL_ARCHIVED_SETTINGS = "sonar.modules.archivedSettings"; | |||
String MODULE_LEVEL_ARCHIVED_SETTINGS = "sonar.subproject.settings.archived"; | |||
} |
@@ -33,8 +33,8 @@ public class ProjectServerSettingsProvider extends ProviderAdapter { | |||
private static final Logger LOG = Loggers.get(ProjectConfigurationProvider.class); | |||
private static final String MODULE_LEVEL_ARCHIVED_SETTINGS_WARNING = "Please migrate all the properties listed in " + | |||
"`sonar.module.removedProperties` setting to appriopriate project level setting."; | |||
private static final String MODULE_LEVEL_ARCHIVED_SETTINGS_WARNING = String.format("Please configure the settings listed in " + | |||
"`%s` at project level and remove that setting to prevent the analysis from displaying a warning.", CoreProperties.MODULE_LEVEL_ARCHIVED_SETTINGS); | |||
private ProjectServerSettings singleton = null; | |||