aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-xoo-plugin/build.gradle3
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java4
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java2
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java10
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java10
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java8
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java8
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java10
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java4
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java6
-rw-r--r--server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java6
-rw-r--r--server/sonar-ce-task-projectanalysis/build.gradle1
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactory.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filesystem/ComputationTempFolderProvider.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/api/measurecomputer/MeasureComputerContextImplTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/batch/BatchReportReaderImplTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/IntegrateCrossProjectDuplicationsTest.java4
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/filemove/ScoreMatrixDumperImplTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/filter/IssueFilterTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/ProjectCleanerTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/PurgeDatastoresStepTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitymodel/RatingSettingsTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCacheTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepositoryImplTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java2
-rw-r--r--server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStepTest.java2
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeConfigurationImplTest.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeWorkerCountSettingWarningTest.java2
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueCleanerTest.java2
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java2
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskInterrupterProviderTest.java2
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskProcessorModuleTest.java1
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java2
-rw-r--r--server/sonar-db-core/build.gradle1
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java2
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java2
-rw-r--r--server/sonar-db-dao/build.gradle1
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/alm/OrganizationAlmBindingDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java10
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/AnalysisPropertiesDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/BranchDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/es/EsQueueDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java5
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java2
-rw-r--r--server/sonar-db-dao/src/test/java/org/sonar/db/user/UserPropertiesDaoTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/engine/MigrationEngineImplTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateOrgQProfilesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateTableDefaultQProfilesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateUsersOnboardedTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/FixEmptyIdentityProviderInUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/PopulateMainProjectBranchesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v67/CleanupDisabledUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/CreateBuiltInQualityGateTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/DeletePersonMeasuresTest.java1
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateDefaultQualityGateTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasuresTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateQualityGatesIsBuiltInTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateUuidOnQualityGatesTest.java3
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/ReadGlobalSonarQualityGateSettingToDefaultOrgTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGateTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/PopulateTableProjectLinks2Test.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/SetKeyTypeToBranchInProjectBranchesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/FixDuplicationInExternalLoginOnUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateHashMethodOnUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateOrganizationUuidOnUsersTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateUUIDOnUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/UpdateNullValuesFromExternalColumnsAndLoginOfUsersTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/FixMissingQualityProfilesOnOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateMainApplicationBranchesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizationsTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/AddApplicationCreatorAndPortfolioCreatorToSonarAdministratorTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/CleanOrphanRowsInCeTablesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateDefaultPermTemplateOnOrganizationsTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateIsAdHocOnRulesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateNullValuesOfIsExternalOnRulesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/DeleteModuleAndFolderMeasuresTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateModulePropertiesTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateNoMoreUsedQualityGateConditionsTest.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v78/UpdateSecurityHotspotsStatusesTest.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v79/ReindexIssuesAndRulesTest.java2
-rw-r--r--server/sonar-server-common/build.gradle5
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/config/ConfigurationProvider.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/measure/index/ProjectMeasuresIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/platform/TempFolderProvider.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/setting/ChildSettings.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/view/index/ViewIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/config/ConfigurationProviderTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/BulkIndexerTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/EsClientProviderTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/metadata/MetadataIndexDefinitionBridge.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/FakeIndexDefinition.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewAuthorizedIndexTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewIndexTest.java3
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewRegularIndexTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesEmailTemplateTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/l18n/ServerI18nTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/log/ServerLoggingTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java4
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/ServerImplTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java4
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/UrlSettingsTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/WebServerImplTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/platform/serverid/ServerIdChecksumTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexDefinitionTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/setting/ChildSettingsTest.java5
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java6
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/view/index/ViewIndexDefinitionTest.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCallerImplTest.java6
-rw-r--r--server/sonar-server/build.gradle1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java6
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TempFolderCleaner.java)3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java5
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java3
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java5
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java4
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java4
-rw-r--r--settings.gradle1
-rw-r--r--sonar-application/build.gradle4
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java2
-rw-r--r--sonar-core/build.gradle1
-rw-r--r--sonar-core/src/main/java/org/sonar/core/extension/CoreExtensionsInstaller.java8
-rw-r--r--sonar-core/src/test/java/org/sonar/core/extension/CoreExtensionsInstallerTest.java5
-rw-r--r--sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/util/DefaultHttpDownloaderTest.java10
-rw-r--r--sonar-plugin-api-impl/build.gradle87
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRule.java)5
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRule.java)6
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRuleParam.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MapSettings.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/internal/MetadataLoader.java)19
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/internal/PluginContextImpl.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/AbstractProjectOrModule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultFileSystem.java)18
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultIndexedFile.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputComponent.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputDir.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputFile.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputModule.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputProject.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextPointer.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextRange.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/FileMetadata.java)13
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/TestInputFileBuilder.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/CharHandler.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/FileHashComputer.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/IntArrayList.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineCounter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineHashComputer.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineOffsetCounter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbsolutePathPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbstractFilePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AndPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/DefaultFilePredicates.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FalsePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FileExtensionPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FilenamePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/LanguagePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/NotPredicate.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OperatorPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicateAdapter.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OrPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/PathPatternPredicate.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/RelativePathPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/StatusPredicate.java)3
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TruePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TypePredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/URIPredicate.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/AbstractDefaultIssue.java)10
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssue.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssueLocation.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultNoSonarFilter.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/package-info.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesBuilder.java)14
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRules.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRules.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesBuilder.java)8
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAdHocRule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAnalysisError.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCoverage.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCpdTokens.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultExternalIssue.java)6
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultHighlighting.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultMeasure.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/DefaultPostJobDescriptor.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorDescriptor.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSignificantCode.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultStorable.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSymbolTable.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/InMemorySensorStorage.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SensorContextTester.java)24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SyntaxHighlightingRule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultDebtRemediationFunctions.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewParam.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRule.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultParam.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRepository.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRule.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java (renamed from server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java)4
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/DefaultTempFolder.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/DefaultTempFolder.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/JUnitTempFolder.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/JUnitTempFolder.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/ScannerUtils.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/util/ScannerUtils.java)7
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/TestSystem2.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TestSystem2.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/WorkDuration.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/package-info.java24
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/PartImpl.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/PartImpl.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/SimpleGetRequest.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/SimpleGetRequest.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/ValidatingRequest.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/ValidatingRequest.java)2
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/package-info.java23
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java)103
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java)11
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java)7
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultFileSystemTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputDirTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputFileTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputModuleTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputProjectTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/FileMetadataTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/MetadataTest.java)5
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java)15
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/TestInputFileBuilderTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/charhandler/IntArrayListTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/AndPredicateTest.java)60
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/DefaultFilePredicatesTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FileExtensionPredicateTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FilenamePredicateTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/OrPredicateTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/RelativePathPredicateTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesTest.java)9
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/RulesBuilderTest.java)8
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAdHocRuleTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAnalysisErrorTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultCpdTokensTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultExternalIssueTest.java)10
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultHighlightingTest.java)8
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueLocationTest.java)6
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueTest.java)16
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultMeasureTest.java)8
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorDescriptorTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSignificantCodeTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSymbolTableTest.java)5
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/InMemorySensorStorageTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/SensorContextTesterTest.java)18
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/server/DefaultNewRuleTest.java98
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2Test.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2Test.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/DefaultTempFolderTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java)3
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/JUnitTempFolderTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/JUnitTempFolderTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/ScannerUtilsTest.java52
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/WorkDurationTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java)2
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/ws/SimpleGetRequestTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java)4
-rw-r--r--sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff (renamed from sonar-scanner-engine/src/test/resources/org/sonar/scanner/fs/glyphicons-halflings-regular.woff)bin16448 -> 16448 bytes
-rw-r--r--sonar-plugin-api/build.gradle3
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/LoadedActiveRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/LoadedActiveRule.java)2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewActiveRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewActiveRule.java)6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRule.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRule.java)2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRuleParam.java (renamed from sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRuleParam.java)2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Configuration.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinition.java90
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/package-info.java23
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java4
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/PluginTest.java6
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectBuilderTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java3
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/NewActiveRuleTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/NewActiveRuleTest.java)6
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java6
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java8
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java4
-rw-r--r--sonar-scanner-engine/build.gradle2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/DefaultFileLinesContext.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java151
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ExtensionInstaller.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalTempFolderProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/PluginFiles.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerPluginInstaller.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClient.java129
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdExecutor.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdSettings.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensor.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/index/SonarCpdBlockIndex.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultCoverageBlock.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestCase.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestable.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestPlanBuilder.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestableBuilder.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/InputModuleHierarchy.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssueFilters.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScanner.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/AnalysisResult.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobOptimizer.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobWrapper.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ActiveRulesPublisher.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/MetadataPublisher.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java8
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/SourcePublisher.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java8
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java12
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ProjectRepositories.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java8
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoader.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoader.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesLoader.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesProvider.java3
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java13
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRulesLoader.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DefaultInputModuleHierarchy.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputModuleHierarchyProvider.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputProjectProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleConfigurationProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleIndexer.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleScanContainer.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectConfigurationProvider.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectLock.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java8
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ScanProperties.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/WorkDirectoriesInitializer.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractCoverageAndDuplicationExclusions.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicates.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultModuleFileSystem.java7
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultProjectFileSystem.java7
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java10
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/InputComponentStore.java8
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/MetadataGenerator.java6
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleCoverageAndDuplicationExclusions.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStore.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectCoverageAndDuplicationExclusions.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorOptimizer.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorWrapper.java1
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java12
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java2
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorsExecutor.java4
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java14
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/DefaultFileLinesContextTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/ProjectInfoTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/WsTestUtil.java16
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisTempFolderProviderTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/DefaultScannerWsClientTest.java (renamed from sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientTest.java)18
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ExtensionInstallerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ModuleSensorExtensionDictionnaryTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PluginFilesTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionnaryTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerPluginInstallerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientProviderTest.java8
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/CiConfigurationProviderTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdSettingsTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensorTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/externalissue/ExternalIssueImporterTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericCoverageReportParserTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensorTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/DefaultFilterableIssueTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/IssuePublisherTest.java16
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoaderTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScannerTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/BranchMediumTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/ChecksMediumTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/IssuesMediumTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleCoverageAndDuplicationExclusionsTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleSensorsExecutorTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ProjectCoverageExclusionsTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java12
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/DefaultPostJobContextTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/PostJobOptimizerTest.java3
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ActiveRulesPublisherTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java62
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ChangedLinesPublisherTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ComponentsPublisherTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/report/SourcePublisherTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoaderTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java8
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoaderTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoaderTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesBuilderTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java1
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultActiveRulesLoaderTest.java7
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesLoaderTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/QProfileVerifierTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/DefaultInputModuleHierarchyTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ModuleIndexerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectLockTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ScanPropertiesTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/WorkDirectoriesInitializerTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicatesTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/InputComponentStoreTest.java8
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/LanguageDetectionTest.java3
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/MetadataGeneratorTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStoreTest.java6
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ProjectExclusionFiltersTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/StatusDetectionTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/DefaultBlameOutputTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/ScmChangedFilesProviderTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorStorageTest.java21
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorContextTest.java10
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorOptimizerTest.java11
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/util/ScannerUtilsTest.java1
604 files changed, 1687 insertions, 1313 deletions
diff --git a/plugins/sonar-xoo-plugin/build.gradle b/plugins/sonar-xoo-plugin/build.gradle
index eb6a3c603b5..675726d0a6e 100644
--- a/plugins/sonar-xoo-plugin/build.gradle
+++ b/plugins/sonar-xoo-plugin/build.gradle
@@ -11,11 +11,10 @@ dependencies {
runtime project(path: ':sonar-plugin-api', configuration: 'shadow')
compileOnly project(path: ':sonar-plugin-api')
- testCompile project(path: ':sonar-scanner-engine')
testCompile 'junit:junit'
testCompile 'org.assertj:assertj-core'
testCompile 'org.mockito:mockito-core'
- testCompile project(':server:sonar-server')
+ testCompile project(':sonar-plugin-api-impl')
}
jar {
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java
index 892081dc202..7455f077caa 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java
@@ -25,8 +25,8 @@ import org.junit.Test;
import org.sonar.api.Plugin;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.internal.PluginContextImpl;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.PluginContextImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
import org.sonar.xoo.global.GlobalProjectSensor;
import org.sonar.xoo.rule.OneExternalIssuePerLineSensor;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
index 1f5128ddc79..161cac8649f 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/ItCoverageSensorTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
index a6c88780840..71c336163f2 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/OverallCoverageSensorTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
index 429a64722fd..dde6eddac2c 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/coverage/UtCoverageSensorTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java
index 5474f266af6..0754cdc12c0 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.batch.postjob.PostJobContext;
import org.sonar.api.utils.log.LogTester;
-import org.sonar.scanner.postjob.DefaultPostJobDescriptor;
+import org.sonar.api.impl.sensor.DefaultPostJobDescriptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java
index 1464eaa8e62..aaad31d3da4 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/CpdTokenizerSensorTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
index 5d36dcf4097..bc6e6b00500 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
@@ -30,11 +30,11 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.measure.MetricFinder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java
index 5bd1c1377a5..6acb0ed39e1 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SignificantCodeSensorTest.java
@@ -29,11 +29,11 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.DefaultTextRange;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.DefaultTextRange;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java
index a15596379af..1e91363bbed 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SymbolReferencesSensorTest.java
@@ -27,11 +27,11 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.DefaultTextRange;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.DefaultTextRange;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import org.sonar.xoo.Xoo;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java
index 8cc02238d0a..fc4e865dc01 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/SyntaxHighlightingSensorTest.java
@@ -27,10 +27,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java
index 2f7d074ca10..060925067e4 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java
@@ -30,10 +30,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.sensor.error.AnalysisError;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java
index 67f9325575c..24bec8caf7d 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java
@@ -27,12 +27,12 @@ import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.issue.Issue;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
+import org.sonar.api.impl.sensor.SensorContextTester;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
-import org.sonar.scanner.sensor.SensorContextTester;
import org.sonar.xoo.Xoo;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
index 2a4c1eda98b..e37c8f5df6a 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
@@ -23,11 +23,11 @@ import org.sonar.api.SonarEdition;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.SonarQubeSide;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.server.debt.DebtRemediationFunction;
import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.api.utils.Version;
-import org.sonar.server.rule.RuleDefinitionContext;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java
index 2b02d2df949..13a780e7dc7 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java
@@ -31,10 +31,10 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.scm.BlameCommand.BlameInput;
import org.sonar.api.batch.scm.BlameCommand.BlameOutput;
import org.sonar.api.batch.scm.BlameLine;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.api.utils.DateUtils;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
import org.sonar.xoo.Xoo;
import static java.util.Collections.singletonList;
diff --git a/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java
index 6f44b7e42b0..099da826dea 100644
--- a/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java
+++ b/server/sonar-ce-common/src/test/java/org/sonar/ce/queue/CeQueueImplTest.java
@@ -28,8 +28,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.ce.queue.CeTaskSubmit.Component;
import org.sonar.ce.task.CeTask;
import org.sonar.core.util.UuidFactory;
@@ -215,7 +215,6 @@ public class CeQueueImplTest {
CeTaskSubmit taskSubmit2 = createTaskSubmit("some type");
UserDto userDto1 = db.getDbClient().userDao().selectByUuid(db.getSession(), taskSubmit1.getSubmitterUuid());
-
List<CeTask> tasks = underTest.massSubmit(asList(taskSubmit1, taskSubmit2));
assertThat(tasks).hasSize(2);
@@ -370,7 +369,7 @@ public class CeQueueImplTest {
assertThat(tasks)
.hasSize(2)
- .extracting(task -> task.getComponent().get().getUuid(),task -> task.getMainComponent().get().getUuid())
+ .extracting(task -> task.getComponent().get().getUuid(), task -> task.getMainComponent().get().getUuid())
.containsOnly(tuple(componentForMainComponentUuid2.getUuid(), componentForMainComponentUuid2.getMainComponentUuid()),
tuple(componentForMainComponentUuid4.getUuid(), componentForMainComponentUuid4.getMainComponentUuid()));
assertThat(db.getDbClient().ceQueueDao().selectAllInAscOrder(db.getSession()))
@@ -609,6 +608,7 @@ public class CeQueueImplTest {
}
private static int newComponentIdGenerator = new Random().nextInt(8_999_333);
+
private static Component newComponent(String mainComponentUuid) {
return new Component("uuid_" + newComponentIdGenerator++, mainComponentUuid);
}
diff --git a/server/sonar-ce-task-projectanalysis/build.gradle b/server/sonar-ce-task-projectanalysis/build.gradle
index 82d6f4af842..62914da5e86 100644
--- a/server/sonar-ce-task-projectanalysis/build.gradle
+++ b/server/sonar-ce-task-projectanalysis/build.gradle
@@ -33,6 +33,7 @@ dependencies {
compileOnly project(':server:sonar-process')
compileOnly project(':server:sonar-server-common')
compileOnly project(':sonar-plugin-api')
+ compileOnly project(':sonar-plugin-api-impl')
compileOnly project(':sonar-duplications')
testCompile 'com.google.code.findbugs:jsr305'
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactory.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactory.java
index 75f7c852187..1c7af5ed99c 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactory.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactory.java
@@ -22,7 +22,7 @@ package org.sonar.ce.task.projectanalysis.analysis;
import org.sonar.api.ce.ComputeEngineSide;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.ConfigurationBridge;
+import org.sonar.api.impl.config.ConfigurationBridge;
import org.sonar.db.DbClient;
import org.sonar.db.component.BranchType;
import org.sonar.server.setting.ChildSettings;
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filesystem/ComputationTempFolderProvider.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filesystem/ComputationTempFolderProvider.java
index 718329b6302..be955030af4 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filesystem/ComputationTempFolderProvider.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/filesystem/ComputationTempFolderProvider.java
@@ -26,8 +26,8 @@ import org.apache.commons.io.FileUtils;
import org.picocontainer.ComponentLifecycle;
import org.picocontainer.PicoContainer;
import org.picocontainer.injectors.ProviderAdapter;
+import org.sonar.api.impl.utils.DefaultTempFolder;
import org.sonar.api.utils.TempFolder;
-import org.sonar.api.utils.internal.DefaultTempFolder;
import org.sonar.server.platform.ServerFileSystem;
/**
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java
index 8b91d9fe5b5..1587d3f49bf 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/analysis/ProjectConfigurationFactoryTest.java
@@ -22,7 +22,7 @@ package org.sonar.ce.task.projectanalysis.analysis;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.ce.task.projectanalysis.component.DefaultBranchImpl;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/api/measurecomputer/MeasureComputerContextImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/api/measurecomputer/MeasureComputerContextImplTest.java
index 783adc1ab6c..ad305a455ce 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/api/measurecomputer/MeasureComputerContextImplTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/api/measurecomputer/MeasureComputerContextImplTest.java
@@ -28,7 +28,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.ce.measure.Component;
import org.sonar.api.ce.measure.MeasureComputer;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.Duration;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/batch/BatchReportReaderImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/batch/BatchReportReaderImplTest.java
index 8c44a3418e8..dec49ef29d7 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/batch/BatchReportReaderImplTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/batch/BatchReportReaderImplTest.java
@@ -26,7 +26,7 @@ import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.internal.JUnitTempFolder;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.core.util.CloseableIterator;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java
index 240637cc3e6..948f94f4fde 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/component/ConfigurationRepositoryTest.java
@@ -23,7 +23,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolderRule;
import org.sonar.ce.task.projectanalysis.analysis.Branch;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/IntegrateCrossProjectDuplicationsTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/IntegrateCrossProjectDuplicationsTest.java
index a2a66c69f7c..dfd6311e802 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/IntegrateCrossProjectDuplicationsTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/duplication/IntegrateCrossProjectDuplicationsTest.java
@@ -25,8 +25,8 @@ import java.util.Collection;
import java.util.Collections;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.ce.task.log.CeTaskMessages;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/filemove/ScoreMatrixDumperImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/filemove/ScoreMatrixDumperImplTest.java
index 63d6cd19a90..00d9a76ac19 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/filemove/ScoreMatrixDumperImplTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/filemove/ScoreMatrixDumperImplTest.java
@@ -34,7 +34,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.ce.task.CeTask;
import org.sonar.ce.task.projectanalysis.filemove.ScoreMatrix.ScoreFile;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderTest.java
index 5224fe99cba..cd7249ce51f 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ComponentIssuesLoaderTest.java
@@ -36,7 +36,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.issue.Issue;
import org.sonar.api.utils.System2;
import org.sonar.core.issue.DefaultIssue;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeTest.java
index 934a2546730..1bcc1485405 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/DefaultAssigneeTest.java
@@ -23,7 +23,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolderImpl;
import org.sonar.ce.task.projectanalysis.analysis.Organization;
import org.sonar.ce.task.projectanalysis.component.ConfigurationRepository;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java
index 4c4ba86943e..9be4ccbc5b0 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.issue.Issue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputTest.java
index 44dc2af2e1f..ecec8084479 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/ProjectTrackerBaseLazyInputTest.java
@@ -25,7 +25,7 @@ import java.util.Date;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolderRule;
import org.sonar.ce.task.projectanalysis.component.Component;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerTest.java
index 16e7419b628..fbafc6ba257 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/SiblingsIssueMergerTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.issue.Issue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.System2;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/filter/IssueFilterTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/filter/IssueFilterTest.java
index 01178f2275e..0672bf65c12 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/filter/IssueFilterTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/issue/filter/IssueFilterTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.rule.RuleKey;
import org.sonar.ce.task.projectanalysis.component.Component;
import org.sonar.ce.task.projectanalysis.component.ConfigurationRepository;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/ProjectCleanerTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/ProjectCleanerTest.java
index 1315ab2f7d6..d1cef3b521e 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/ProjectCleanerTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/ProjectCleanerTest.java
@@ -23,7 +23,7 @@ import org.junit.Before;
import org.junit.Test;
import org.sonar.api.CoreProperties;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.config.PurgeConstants;
import org.sonar.core.config.PurgeProperties;
import org.sonar.db.DbSession;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/PurgeDatastoresStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/PurgeDatastoresStepTest.java
index dbf8227eaee..877fa6965a9 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/PurgeDatastoresStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/purge/PurgeDatastoresStepTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolderRule;
import org.sonar.ce.task.projectanalysis.component.Component;
import org.sonar.ce.task.projectanalysis.component.ConfigurationRepository;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitymodel/RatingSettingsTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitymodel/RatingSettingsTest.java
index 58331574756..6e83dd97d61 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitymodel/RatingSettingsTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/qualitymodel/RatingSettingsTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.CoreProperties;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.utils.MessageException;
import org.sonar.core.config.CorePropertyDefinitions;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCacheTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCacheTest.java
index e361c519083..34de2e37170 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCacheTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashCacheTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.JUnitTempFolder;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.ce.task.projectanalysis.component.Component;
import org.sonar.ce.task.projectanalysis.component.ReportComponent;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepositoryImplTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepositoryImplTest.java
index 67bce16c807..0d7f00d10f9 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepositoryImplTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/source/SourceLinesHashRepositoryImplTest.java
@@ -25,7 +25,7 @@ import java.util.Optional;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.internal.JUnitTempFolder;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.ce.task.projectanalysis.component.Component;
import org.sonar.ce.task.projectanalysis.component.Component.Type;
import org.sonar.ce.task.projectanalysis.component.ReportComponent;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepTest.java
index a31a5ddbb79..0e565f84b85 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/ExtractReportStepTest.java
@@ -26,10 +26,10 @@ import org.apache.commons.io.FileUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.ZipUtils;
-import org.sonar.api.utils.internal.JUnitTempFolder;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.ce.task.CeTask;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java
index c2b3b13c679..a5389373f8e 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadPeriodsStepTest.java
@@ -33,7 +33,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.LogAndArguments;
diff --git a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStepTest.java b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStepTest.java
index 809c2505fd6..eaee9b9da1b 100644
--- a/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStepTest.java
+++ b/server/sonar-ce-task-projectanalysis/src/test/java/org/sonar/ce/task/projectanalysis/step/LoadQualityGateStepTest.java
@@ -25,7 +25,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.ce.task.projectanalysis.analysis.AnalysisMetadataHolder;
import org.sonar.ce.task.projectanalysis.component.ConfigurationRepository;
import org.sonar.ce.task.projectanalysis.metric.Metric;
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
index 2358876fb0e..51eabf72207 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
@@ -27,8 +27,8 @@ import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.config.EmailSettings;
-import org.sonar.api.internal.MetadataLoader;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.MetadataLoader;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.profiles.AnnotationProfileParser;
import org.sonar.api.profiles.XMLProfileParser;
import org.sonar.api.profiles.XMLProfileSerializer;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeConfigurationImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeConfigurationImplTest.java
index ac9b41655fb..eb6c5923d59 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeConfigurationImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeConfigurationImplTest.java
@@ -23,8 +23,8 @@ import java.util.Random;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import static java.lang.Math.abs;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeWorkerCountSettingWarningTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeWorkerCountSettingWarningTest.java
index d308f13ae07..a271c5747dd 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeWorkerCountSettingWarningTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/configuration/CeWorkerCountSettingWarningTest.java
@@ -21,7 +21,7 @@ package org.sonar.ce.configuration;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueCleanerTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueCleanerTest.java
index 771b13c21a2..fd96fe75b70 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueCleanerTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueCleanerTest.java
@@ -23,7 +23,7 @@ import java.util.Optional;
import org.apache.commons.io.IOUtils;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.ServerUpgradeStatus;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
index e54545f4181..fc24e02b9f9 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
@@ -29,8 +29,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.ce.container.ComputeEngineStatus;
import org.sonar.ce.monitoring.CEQueueStatus;
import org.sonar.ce.monitoring.CEQueueStatusImpl;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskInterrupterProviderTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskInterrupterProviderTest.java
index 284c8efc3f0..3bb899e9ff2 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskInterrupterProviderTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskInterrupterProviderTest.java
@@ -24,7 +24,7 @@ import java.util.Random;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.ce.task.CeTaskInterrupter;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskProcessorModuleTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskProcessorModuleTest.java
index cd224040256..6f31cabdf47 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskProcessorModuleTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeTaskProcessorModuleTest.java
@@ -21,7 +21,6 @@ package org.sonar.ce.taskprocessor;
import org.junit.Test;
import org.picocontainer.ComponentAdapter;
-import org.sonar.api.config.internal.MapSettings;
import org.sonar.ce.notification.ReportAnalysisFailureNotificationExecutionListener;
import org.sonar.ce.task.CeTaskInterrupter;
import org.sonar.core.platform.ComponentContainer;
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
index 08d19ce3ad5..a84aa27024b 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
@@ -38,9 +38,9 @@ import org.mockito.ArgumentCaptor;
import org.mockito.InOrder;
import org.mockito.Mockito;
import org.mockito.stubbing.Answer;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.api.utils.log.LogAndArguments;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/server/sonar-db-core/build.gradle b/server/sonar-db-core/build.gradle
index 34228167f41..5e1cfc7b748 100644
--- a/server/sonar-db-core/build.gradle
+++ b/server/sonar-db-core/build.gradle
@@ -20,6 +20,7 @@ dependencies {
compile project(':sonar-core')
compile project(':sonar-scanner-protocol')
compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile project(':sonar-plugin-api-impl')
compileOnly 'com.google.code.findbugs:jsr305'
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
index e673d167ac4..035c4049ed4 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
@@ -38,7 +38,7 @@ import org.dbunit.IDatabaseTester;
import org.dbunit.dataset.datatype.IDataTypeFactory;
import org.junit.AssumptionViolatedException;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.db.dialect.H2;
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java
index 45a55796ff5..6c27183b954 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/DefaultDatabaseTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.dialect.PostgreSql;
import org.sonar.process.logging.LogbackHelper;
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
index 01cc6e29841..12e9ed4500f 100644
--- a/server/sonar-db-dao/build.gradle
+++ b/server/sonar-db-dao/build.gradle
@@ -21,6 +21,7 @@ dependencies {
testCompile 'org.mockito:mockito-core'
testCompile project(':sonar-testing-harness')
testCompile project(':server:sonar-db-core').sourceSets.test.output
+ testCompile project(':sonar-plugin-api-impl')
testCompileOnly 'com.google.code.findbugs:jsr305'
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/alm/OrganizationAlmBindingDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/alm/OrganizationAlmBindingDaoTest.java
index b104f9a6dd4..7e16fe34713 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/alm/OrganizationAlmBindingDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/alm/OrganizationAlmBindingDaoTest.java
@@ -24,7 +24,7 @@ import java.util.Optional;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.util.UuidFactory;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
index 549f3bb20e2..5478d3ab969 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java
@@ -39,7 +39,7 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.util.CloseableIterator;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.core.util.stream.MoreCollectors;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
index 7e6bce920e5..dd2b3a3aab8 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueDaoTest.java
@@ -34,9 +34,9 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mockito;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.DbTester;
import static com.google.common.collect.FluentIterable.from;
@@ -178,7 +178,7 @@ public class CeQueueDaoTest {
long time = alwaysIncreasingSystem2.now() + 10_000;
insertPending("p1", dto -> {
dto.setCreatedAt(time);
- dto.setUpdatedAt(time+500);
+ dto.setUpdatedAt(time + 500);
dto.setMainComponentUuid("c1");
});
insertPending("p2", dto -> {
@@ -198,7 +198,7 @@ public class CeQueueDaoTest {
long time = alwaysIncreasingSystem2.now() + 10_000;
insertPending("p1", dto -> {
dto.setCreatedAt(time);
- dto.setUpdatedAt(time+500);
+ dto.setUpdatedAt(time + 500);
dto.setMainComponentUuid("c2");
});
insertPending("p2", dto -> {
@@ -215,7 +215,7 @@ public class CeQueueDaoTest {
makeInProgress("w1", alwaysIncreasingSystem2.now(), insertPending("i1", dto -> dto.setMainComponentUuid("c1")));
assertThat(underTest.selectCreationDateOfOldestPendingByMainComponentUuid(db.getSession(), "c1"))
- .isEqualTo(Optional.of(time+2000));
+ .isEqualTo(Optional.of(time + 2000));
}
@Test
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/AnalysisPropertiesDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/AnalysisPropertiesDaoTest.java
index 2ddbc0c36c6..cd739ae558e 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/AnalysisPropertiesDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/AnalysisPropertiesDaoTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/BranchDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/BranchDaoTest.java
index e43fca45abd..08ef36f8c54 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/BranchDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/BranchDaoTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.protobuf.DbProjectBranches;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDaoTest.java
index 17bb6b45f24..3c8509ee851 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDaoTest.java
@@ -23,7 +23,7 @@ import java.util.Collections;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import static java.util.Arrays.asList;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/es/EsQueueDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/es/EsQueueDaoTest.java
index 41707c4e73c..00776044ce6 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/es/EsQueueDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/es/EsQueueDaoTest.java
@@ -25,7 +25,7 @@ import java.util.Random;
import java.util.stream.IntStream;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java
index ed19baa0efb..04bd0f63e8b 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueMapperTest.java
@@ -35,11 +35,11 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.issue.Issue;
import org.sonar.api.rules.RuleType;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.issue.FieldDiffs;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.DbSession;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
index 849dd53dfe7..716c1e30337 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeCommandsTest.java
@@ -23,8 +23,8 @@ import java.util.List;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
@@ -36,7 +36,6 @@ import static com.google.common.collect.Lists.newArrayList;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
-
public class PurgeCommandsTest {
@Rule
@@ -106,7 +105,6 @@ public class PurgeCommandsTest {
assertThat(dbTester.countRowsOfTable("issue_changes")).isEqualTo(1);
}
-
@Test
public void shouldDeleteAnalyses() {
dbTester.prepareDbUnit(getClass(), "shouldDeleteResource.xml");
@@ -122,7 +120,6 @@ public class PurgeCommandsTest {
assertThat(dbTester.countRowsOfTable("issue_changes")).isEqualTo(1);
}
-
@Test
public void shouldDeleteIssuesAndIssueChanges() {
dbTester.prepareDbUnit(getClass(), "shouldDeleteResource.xml");
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
index 4d83aa022e7..fe0d5668a76 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/purge/PurgeConfigurationTest.java
@@ -23,7 +23,7 @@ import java.util.Date;
import java.util.Optional;
import org.junit.Test;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Scopes;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
index abfb197c980..a9db8b7a367 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/ActiveRuleDaoTest.java
@@ -32,7 +32,7 @@ import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.rule.RuleParamType;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
index 530239bc91a..4d26dcc207a 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileChangeDaoTest.java
@@ -25,8 +25,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.core.util.UuidFactory;
import org.sonar.db.DbSession;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoTest.java
index c95aeca5fe0..06b3aa1ccee 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditGroupsDaoTest.java
@@ -22,7 +22,7 @@ package org.sonar.db.qualityprofile;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.Pagination;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoTest.java
index cb915cd8044..5331f8d3098 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QProfileEditUsersDaoTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.Pagination;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
index 520636d1eaf..d011fa394cb 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleRepositoryDaoTest.java
@@ -27,8 +27,8 @@ import java.util.stream.IntStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java
index 5e55b7a7706..e739b57e69a 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDaoTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.user.UserQuery;
import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DatabaseUtils;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserPropertiesDaoTest.java b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserPropertiesDaoTest.java
index 89029d67899..8fba61e47b4 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserPropertiesDaoTest.java
+++ b/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserPropertiesDaoTest.java
@@ -23,7 +23,7 @@ import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/engine/MigrationEngineImplTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/engine/MigrationEngineImplTest.java
index 9f02622b7a8..cab3aa7752e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/engine/MigrationEngineImplTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/engine/MigrationEngineImplTest.java
@@ -23,8 +23,8 @@ import java.sql.SQLException;
import java.util.List;
import java.util.Optional;
import org.junit.Test;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.process.ProcessProperties;
import org.sonar.server.platform.db.migration.SupportsBlueGreen;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
index 5ce23f921d9..aeaf1e615b8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v62/PopulateOrganizationUuidOfGroupsTest.java
@@ -23,8 +23,8 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
index c35da8cec84..e26d65919a2 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v63/UnsetUserRootFlagsTest.java
@@ -24,7 +24,7 @@ import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateOrgQProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateOrgQProfilesTest.java
index d143144ed0b..1ba1f93d07d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateOrgQProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateOrgQProfilesTest.java
@@ -27,8 +27,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.CoreDbTester;
import static java.lang.String.format;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateTableDefaultQProfilesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateTableDefaultQProfilesTest.java
index 3b2842b00ac..63441a8b0ff 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateTableDefaultQProfilesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateTableDefaultQProfilesTest.java
@@ -23,8 +23,8 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateUsersOnboardedTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateUsersOnboardedTest.java
index 08026834445..32f20211fa9 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateUsersOnboardedTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v65/PopulateUsersOnboardedTest.java
@@ -24,8 +24,8 @@ import java.util.stream.Collectors;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/FixEmptyIdentityProviderInUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/FixEmptyIdentityProviderInUsersTest.java
index 1d217b27460..b66f41554ce 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/FixEmptyIdentityProviderInUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/FixEmptyIdentityProviderInUsersTest.java
@@ -26,8 +26,8 @@ import javax.annotation.Nullable;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/PopulateMainProjectBranchesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/PopulateMainProjectBranchesTest.java
index 84ee674eeda..19ba119e1ea 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/PopulateMainProjectBranchesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/PopulateMainProjectBranchesTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v67/CleanupDisabledUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v67/CleanupDisabledUsersTest.java
index 1a8bbc3faba..67b31d2f00d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v67/CleanupDisabledUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v67/CleanupDisabledUsersTest.java
@@ -31,8 +31,8 @@ import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/CreateBuiltInQualityGateTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/CreateBuiltInQualityGateTest.java
index fcec9f0a724..0cf21171490 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/CreateBuiltInQualityGateTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/CreateBuiltInQualityGateTest.java
@@ -25,8 +25,8 @@ import java.util.List;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/DeletePersonMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/DeletePersonMeasuresTest.java
index e0d21418e16..35bf49c8363 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/DeletePersonMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/DeletePersonMeasuresTest.java
@@ -24,6 +24,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.lang.math.RandomUtils;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.step.DataChange;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateDefaultQualityGateTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateDefaultQualityGateTest.java
index 58a4d4f2103..878af9a627f 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateDefaultQualityGateTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateDefaultQualityGateTest.java
@@ -24,8 +24,8 @@ import java.util.Date;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasuresTest.java
index f125ad3f0fb..6368c94bfaf 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateLiveMeasuresTest.java
@@ -26,8 +26,8 @@ import java.util.function.Function;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateQualityGatesIsBuiltInTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateQualityGatesIsBuiltInTest.java
index e06f71fb0cb..b0b29531c76 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateQualityGatesIsBuiltInTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateQualityGatesIsBuiltInTest.java
@@ -27,8 +27,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateUuidOnQualityGatesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateUuidOnQualityGatesTest.java
index 24063694929..103c1012ee4 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateUuidOnQualityGatesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/PopulateUuidOnQualityGatesTest.java
@@ -24,13 +24,12 @@ import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.annotation.Nullable;
-import org.assertj.core.api.AbstractListAssert;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/ReadGlobalSonarQualityGateSettingToDefaultOrgTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/ReadGlobalSonarQualityGateSettingToDefaultOrgTest.java
index 0365cc03dd1..f75e4689705 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/ReadGlobalSonarQualityGateSettingToDefaultOrgTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/ReadGlobalSonarQualityGateSettingToDefaultOrgTest.java
@@ -27,8 +27,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.step.DataChange;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGateTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGateTest.java
index 21859785b13..2caa9acb40e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGateTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGateTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/PopulateTableProjectLinks2Test.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/PopulateTableProjectLinks2Test.java
index 4f20285bf16..6781b442b39 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/PopulateTableProjectLinks2Test.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/PopulateTableProjectLinks2Test.java
@@ -25,8 +25,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.core.util.UuidFactory;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/SetKeyTypeToBranchInProjectBranchesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/SetKeyTypeToBranchInProjectBranchesTest.java
index c82890e4fa2..42eb8745fb4 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/SetKeyTypeToBranchInProjectBranchesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v71/SetKeyTypeToBranchInProjectBranchesTest.java
@@ -24,8 +24,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/FixDuplicationInExternalLoginOnUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/FixDuplicationInExternalLoginOnUsersTest.java
index c3f9c827e31..9212a8b2d13 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/FixDuplicationInExternalLoginOnUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/FixDuplicationInExternalLoginOnUsersTest.java
@@ -25,8 +25,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateHashMethodOnUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateHashMethodOnUsersTest.java
index eb39027bc76..21d33f7e27c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateHashMethodOnUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateHashMethodOnUsersTest.java
@@ -25,8 +25,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateOrganizationUuidOnUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateOrganizationUuidOnUsersTest.java
index b67086a24ec..a80ce88316c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateOrganizationUuidOnUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateOrganizationUuidOnUsersTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
@@ -127,4 +127,4 @@ public class PopulateOrganizationUuidOnUsersTest {
"UPDATED_AT", PAST);
}
-} \ No newline at end of file
+}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateUUIDOnUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateUUIDOnUsersTest.java
index a3acdbdedc4..fc8f82b864d 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateUUIDOnUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/PopulateUUIDOnUsersTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.UuidFactory;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/UpdateNullValuesFromExternalColumnsAndLoginOfUsersTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/UpdateNullValuesFromExternalColumnsAndLoginOfUsersTest.java
index f0287e2a1e7..313ad1b2dbb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/UpdateNullValuesFromExternalColumnsAndLoginOfUsersTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/UpdateNullValuesFromExternalColumnsAndLoginOfUsersTest.java
@@ -25,8 +25,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.util.SequenceUuidFactory;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/FixMissingQualityProfilesOnOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/FixMissingQualityProfilesOnOrganizationsTest.java
index 3d9cc81d151..787dec23b93 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/FixMissingQualityProfilesOnOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/FixMissingQualityProfilesOnOrganizationsTest.java
@@ -25,9 +25,9 @@ import java.util.stream.Collectors;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateMainApplicationBranchesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateMainApplicationBranchesTest.java
index 65bcc39bfc0..83a78d80beb 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateMainApplicationBranchesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateMainApplicationBranchesTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizationsTest.java
index 80d62cff865..de32e5f0730 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizationsTest.java
@@ -26,9 +26,9 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.Uuids;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/AddApplicationCreatorAndPortfolioCreatorToSonarAdministratorTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/AddApplicationCreatorAndPortfolioCreatorToSonarAdministratorTest.java
index f50108a334d..82077969b15 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/AddApplicationCreatorAndPortfolioCreatorToSonarAdministratorTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/AddApplicationCreatorAndPortfolioCreatorToSonarAdministratorTest.java
@@ -26,7 +26,7 @@ import javax.annotation.Nullable;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.version.v63.DefaultOrganizationUuidProvider;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/CleanOrphanRowsInCeTablesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/CleanOrphanRowsInCeTablesTest.java
index 51361b81e2b..06193a6f394 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/CleanOrphanRowsInCeTablesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/CleanOrphanRowsInCeTablesTest.java
@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateDefaultPermTemplateOnOrganizationsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateDefaultPermTemplateOnOrganizationsTest.java
index d0e5a6db821..70f4b3844d7 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateDefaultPermTemplateOnOrganizationsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateDefaultPermTemplateOnOrganizationsTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateIsAdHocOnRulesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateIsAdHocOnRulesTest.java
index da1b1f07136..17282511c53 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateIsAdHocOnRulesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateIsAdHocOnRulesTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateNullValuesOfIsExternalOnRulesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateNullValuesOfIsExternalOnRulesTest.java
index a67bcfbaa0f..72104c6da71 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateNullValuesOfIsExternalOnRulesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v74/PopulateNullValuesOfIsExternalOnRulesTest.java
@@ -26,8 +26,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/DeleteModuleAndFolderMeasuresTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/DeleteModuleAndFolderMeasuresTest.java
index 5c69599cd7a..c29ac6af95e 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/DeleteModuleAndFolderMeasuresTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/DeleteModuleAndFolderMeasuresTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform.db.migration.version.v76;
import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.CoreDbTester;
import static java.lang.String.valueOf;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateModulePropertiesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateModulePropertiesTest.java
index aba95537cce..155663653e8 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateModulePropertiesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateModulePropertiesTest.java
@@ -25,10 +25,10 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.core.util.UuidFactory;
import org.sonar.db.CoreDbTester;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateNoMoreUsedQualityGateConditionsTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateNoMoreUsedQualityGateConditionsTest.java
index c725577ec8a..06b384ce19c 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateNoMoreUsedQualityGateConditionsTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v76/MigrateNoMoreUsedQualityGateConditionsTest.java
@@ -30,8 +30,8 @@ import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.db.CoreDbTester;
import static java.util.stream.Collectors.toList;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v78/UpdateSecurityHotspotsStatusesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v78/UpdateSecurityHotspotsStatusesTest.java
index a3b10a97883..05f63284b71 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v78/UpdateSecurityHotspotsStatusesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v78/UpdateSecurityHotspotsStatusesTest.java
@@ -26,8 +26,8 @@ import org.apache.commons.lang.math.RandomUtils;
import org.assertj.core.groups.Tuple;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.util.UuidFactoryFast;
import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.es.MigrationEsClient;
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v79/ReindexIssuesAndRulesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v79/ReindexIssuesAndRulesTest.java
index be656e9750a..1175dae3ce6 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v79/ReindexIssuesAndRulesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v79/ReindexIssuesAndRulesTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform.db.migration.version.v79;
import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.CoreDbTester;
import org.sonar.server.platform.db.migration.es.MigrationEsClient;
import org.sonar.server.platform.db.migration.step.DataChange;
diff --git a/server/sonar-server-common/build.gradle b/server/sonar-server-common/build.gradle
index bbf75de41b5..32537555a28 100644
--- a/server/sonar-server-common/build.gradle
+++ b/server/sonar-server-common/build.gradle
@@ -25,8 +25,8 @@ dependencies {
compile project(':sonar-markdown')
compile project(':sonar-ws')
- compileOnly project(path: ':sonar-plugin-api')
- compileOnly project(path: ':server:sonar-process')
+ compileOnly project(':sonar-plugin-api')
+ compileOnly project(':server:sonar-process')
compileOnly 'com.google.code.findbugs:jsr305'
@@ -46,6 +46,7 @@ dependencies {
testCompile 'org.assertj:assertj-guava'
testCompile 'org.mockito:mockito-core'
testCompile project(':server:sonar-db-testing')
+ testCompile project(':sonar-plugin-api-impl')
}
task testJar(type: Jar) {
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java
index dde34c989a0..4a9cc66d6b9 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/component/index/ComponentIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.component.index;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/config/ConfigurationProvider.java b/server/sonar-server-common/src/main/java/org/sonar/server/config/ConfigurationProvider.java
index bd3ff03f8f8..8ed3a8044c4 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/config/ConfigurationProvider.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/config/ConfigurationProvider.java
@@ -28,7 +28,7 @@ import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.Settings;
import static java.util.function.Function.identity;
-import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
public class ConfigurationProvider extends ProviderAdapter {
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java
index aafb2941f8e..c34bdf1863a 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/index/IssueIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.issue.index;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/measure/index/ProjectMeasuresIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/measure/index/ProjectMeasuresIndexDefinition.java
index ed1c40ea8b8..2f5b24d0d34 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/measure/index/ProjectMeasuresIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/measure/index/ProjectMeasuresIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.measure.index;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/platform/TempFolderProvider.java b/server/sonar-server-common/src/main/java/org/sonar/server/platform/TempFolderProvider.java
index 169f89c18a3..df2b15f5714 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/platform/TempFolderProvider.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/platform/TempFolderProvider.java
@@ -23,8 +23,8 @@ import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.picocontainer.injectors.ProviderAdapter;
+import org.sonar.api.impl.utils.DefaultTempFolder;
import org.sonar.api.utils.TempFolder;
-import org.sonar.api.utils.internal.DefaultTempFolder;
public class TempFolderProvider extends ProviderAdapter {
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java b/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
index 97a8b68d1cc..9e4e4382532 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/plugins/ServerExtensionInstaller.java
@@ -30,7 +30,7 @@ import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
-import org.sonar.api.internal.PluginContextImpl;
+import org.sonar.api.impl.context.PluginContextImpl;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.core.platform.PluginInfo;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndexDefinition.java
index f1cf0f9ab59..81fba7331d3 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndexDefinition.java
@@ -22,7 +22,7 @@ package org.sonar.server.rule.index;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/setting/ChildSettings.java b/server/sonar-server-common/src/main/java/org/sonar/server/setting/ChildSettings.java
index 60ff20dca26..63b91d0f8bb 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/setting/ChildSettings.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/setting/ChildSettings.java
@@ -25,7 +25,7 @@ import java.util.Map;
import java.util.Optional;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.ConfigurationBridge;
+import org.sonar.api.impl.config.ConfigurationBridge;
import static java.util.Objects.requireNonNull;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexDefinition.java
index a887b55ffdc..4e88707992a 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/user/index/UserIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.user.index;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/view/index/ViewIndexDefinition.java b/server/sonar-server-common/src/main/java/org/sonar/server/view/index/ViewIndexDefinition.java
index 2abc9030b7b..f4ddef479ef 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/view/index/ViewIndexDefinition.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/view/index/ViewIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.view.index;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/config/ConfigurationProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/config/ConfigurationProviderTest.java
index 3d09555029e..83691ad7349 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/config/ConfigurationProviderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/config/ConfigurationProviderTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonar.api.config.PropertyDefinition.builder;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/BulkIndexerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/BulkIndexerTest.java
index 3a49dfdaf8a..1635995263d 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/BulkIndexerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/BulkIndexerTest.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.index.query.QueryBuilders;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/EsClientProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/EsClientProviderTest.java
index d78d03734a8..d0195af76a0 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/EsClientProviderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/EsClientProviderTest.java
@@ -27,7 +27,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java
index ed7adadab3e..149f67ad33f 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionContextTest.java
@@ -27,7 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.newindex.SettingsConfiguration;
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java
index c746a57f812..705b8054bb2 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/IndexDefinitionHashTest.java
@@ -25,7 +25,7 @@ import java.util.Set;
import java.util.function.Consumer;
import org.junit.Test;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.IndexType.IndexMainType;
import org.sonar.server.es.newindex.SettingsConfiguration;
import org.sonar.server.es.newindex.TestNewIndex;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/metadata/MetadataIndexDefinitionBridge.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/metadata/MetadataIndexDefinitionBridge.java
index a86914e28f9..542a89545b7 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/metadata/MetadataIndexDefinitionBridge.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/metadata/MetadataIndexDefinitionBridge.java
@@ -19,7 +19,7 @@
*/
package org.sonar.server.es.metadata;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.IndexDefinition;
class MetadataIndexDefinitionBridge implements IndexDefinition {
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/FakeIndexDefinition.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/FakeIndexDefinition.java
index d6dfd760540..e6a8fb11631 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/FakeIndexDefinition.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/FakeIndexDefinition.java
@@ -20,7 +20,7 @@
package org.sonar.server.es.newindex;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.FakeDoc;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewAuthorizedIndexTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewAuthorizedIndexTest.java
index 4628a01025f..90170c90d6d 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewAuthorizedIndexTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewAuthorizedIndexTest.java
@@ -25,7 +25,7 @@ import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewIndexTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewIndexTest.java
index 835fe681d4c..8f5f29e4b52 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewIndexTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewIndexTest.java
@@ -30,7 +30,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexType;
import org.sonar.server.es.IndexType.IndexMainType;
@@ -52,7 +52,6 @@ public class NewIndexTest {
private MapSettings settings = new MapSettings();
private SettingsConfiguration defaultSettingsConfiguration = newBuilder(settings.asConfig()).build();
-
@Test
@UseDataProvider("indexWithAndWithoutRelations")
public void getRelations_returns_empty_if_no_relation_added(Index index) {
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewRegularIndexTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewRegularIndexTest.java
index 92894309005..b63225dceca 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewRegularIndexTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/es/newindex/NewRegularIndexTest.java
@@ -29,7 +29,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java
index 43bd47022fb..5d253e97247 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/index/IssueIndexDefinitionTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.issue.index;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesEmailTemplateTest.java
index ec1fc186f39..07bc93ec941 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesEmailTemplateTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MyNewIssuesEmailTemplateTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.config.EmailSettings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.platform.Server;
import org.sonar.server.l18n.I18nRule;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest.java
index df611026d05..1aa43d4f3d9 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/NewIssuesEmailTemplateTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.config.EmailSettings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.platform.Server;
import org.sonar.server.l18n.I18nRule;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/l18n/ServerI18nTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/l18n/ServerI18nTest.java
index e6d90285013..6845ebe99fa 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/l18n/ServerI18nTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/l18n/ServerI18nTest.java
@@ -24,7 +24,7 @@ import java.util.Locale;
import java.util.stream.Stream;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.extension.CoreExtension;
import org.sonar.core.extension.CoreExtensionRepository;
import org.sonar.core.platform.PluginInfo;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/log/ServerLoggingTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/log/ServerLoggingTest.java
index f96745ffc27..e08a3991f7b 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/log/ServerLoggingTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/log/ServerLoggingTest.java
@@ -31,7 +31,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.db.Database;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java
index 050fc56cbac..b3fed77da5e 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/DefaultServerUpgradeStatusTest.java
@@ -22,8 +22,8 @@ package org.sonar.server.platform;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.platform.db.migration.step.MigrationSteps;
import org.sonar.server.platform.db.migration.version.DatabaseVersion;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/ServerImplTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/ServerImplTest.java
index 1c9797aad40..c0fc2330255 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/ServerImplTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/ServerImplTest.java
@@ -26,7 +26,7 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.CoreProperties;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.Version;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
index deaca33baf2..27fd0c40f5d 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/StartupMetadataProviderTest.java
@@ -19,14 +19,14 @@
*/
package org.sonar.server.platform;
-import org.sonar.api.SonarEdition;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.CoreProperties;
+import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/UrlSettingsTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/UrlSettingsTest.java
index cb4f0c3dbb1..e3758bb181f 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/UrlSettingsTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/UrlSettingsTest.java
@@ -23,7 +23,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.config.CorePropertyDefinitions;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/WebServerImplTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/WebServerImplTest.java
index ae97dd927d3..da41c4238be 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/WebServerImplTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/WebServerImplTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/platform/serverid/ServerIdChecksumTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/platform/serverid/ServerIdChecksumTest.java
index fd7aac44d4d..8192345a929 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/platform/serverid/ServerIdChecksumTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/platform/serverid/ServerIdChecksumTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform.serverid;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexDefinitionTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexDefinitionTest.java
index 81bd2172c74..782480eade4 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexDefinitionTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexDefinitionTest.java
@@ -25,7 +25,7 @@ import org.apache.commons.lang.StringUtils;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.EsTester;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java
index d11ab122cad..3c854ffef63 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java
@@ -29,10 +29,10 @@ import org.elasticsearch.search.SearchHit;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
import org.sonar.db.qualityprofile.QProfileDto;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/setting/ChildSettingsTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/setting/ChildSettingsTest.java
index 1e68ad3ecd5..e3fa70e6f9e 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/setting/ChildSettingsTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/setting/ChildSettingsTest.java
@@ -28,7 +28,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
@@ -58,7 +58,7 @@ public class ChildSettingsTest {
parent.setProperty(randomAlphanumeric(16), new Date(RANDOM.nextInt()));
parent.setProperty(randomAlphanumeric(17), new Date(RANDOM.nextInt()), true);
parent.setProperty(randomAlphanumeric(18), new Date(RANDOM.nextInt()), false);
- parent.setProperty(multipleValuesKey, new String[] { randomAlphanumeric(10), randomAlphanumeric(20) });
+ parent.setProperty(multipleValuesKey, new String[] {randomAlphanumeric(10), randomAlphanumeric(20)});
assertThat(underTest.getProperties()).isEqualTo(parent.getProperties());
}
@@ -71,7 +71,6 @@ public class ChildSettingsTest {
underTest.set(null, "");
}
-
@Test
public void set_will_throw_NPE_if_value_is_null() {
expectedException.expect(NullPointerException.class);
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java
index 4e7e8fedc09..cac317cb074 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/user/index/UserIndexDefinitionTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.user.index;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java
index b5c880269bb..b495b63b4e7 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/util/OkHttpClientProviderTest.java
@@ -28,13 +28,13 @@ import okhttp3.Response;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
-import org.sonar.api.SonarEdition;
import org.junit.Rule;
import org.junit.Test;
+import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/view/index/ViewIndexDefinitionTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/view/index/ViewIndexDefinitionTest.java
index e18c49b422f..fece8070b3c 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/view/index/ViewIndexDefinitionTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/view/index/ViewIndexDefinitionTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.view.index;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCallerImplTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCallerImplTest.java
index ee8b5cf1e03..4ad418c9d4a 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCallerImplTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/webhook/WebhookCallerImplTest.java
@@ -32,11 +32,11 @@ import org.junit.rules.Timeout;
import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.server.util.OkHttpClientProvider;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle
index 11001b42e03..1ba49c4c7da 100644
--- a/server/sonar-server/build.gradle
+++ b/server/sonar-server/build.gradle
@@ -60,6 +60,7 @@ dependencies {
compile project(':sonar-duplications')
runtime project(path: ':sonar-plugin-api', configuration: 'shadow')
compileOnly project(path: ':sonar-plugin-api')
+ compile project(':sonar-plugin-api-impl')
compile project(':sonar-ws')
compileOnly 'com.google.code.findbugs:jsr305'
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
index a9082abcdc3..cbbf9034210 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
@@ -25,11 +25,11 @@ import javax.annotation.Nullable;
import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarQubeVersion;
-import org.sonar.api.internal.MetadataLoader;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.MetadataLoader;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
-import org.sonar.api.utils.internal.TempFolderCleaner;
+import org.sonar.server.util.TempFolderCleaner;
import org.sonar.core.config.CorePropertyDefinitions;
import org.sonar.core.extension.CoreExtensionRepositoryImpl;
import org.sonar.core.extension.CoreExtensionsLoader;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java
index ebe02c77f98..b503863846b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionsLoader.java
@@ -20,6 +20,7 @@
package org.sonar.server.rule;
import org.sonar.api.server.rule.RulesDefinition;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import org.sonar.server.plugins.ServerPluginRepository;
/**
diff --git a/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java b/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java
index b71f3fe2f49..84ad9580067 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/user/ws/UpdateAction.java
@@ -19,13 +19,13 @@
*/
package org.sonar.server.user.ws;
+import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-import org.sonar.api.internal.google.common.base.Preconditions;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TempFolderCleaner.java b/server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java
index 3a7836cff4f..812af0edb85 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TempFolderCleaner.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/util/TempFolderCleaner.java
@@ -17,9 +17,10 @@
* 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.api.utils.internal;
+package org.sonar.server.util;
import org.sonar.api.Startable;
+import org.sonar.api.impl.utils.DefaultTempFolder;
import org.sonar.api.server.ServerSide;
import org.sonar.api.utils.TempFolder;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java b/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java
index 09716e0b961..849ce475240 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ws/LocalRequestAdapter.java
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.sonar.api.server.ws.LocalConnector;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.ValidatingRequest;
public class LocalRequestAdapter extends ValidatingRequest {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java b/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java
index 7a449840507..966e0422315 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ws/ServletRequest.java
@@ -31,8 +31,8 @@ import java.util.Map;
import java.util.Optional;
import javax.annotation.CheckForNull;
import javax.servlet.http.HttpServletRequest;
-import org.sonar.api.server.ws.internal.PartImpl;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.PartImpl;
+import org.sonar.api.impl.ws.ValidatingRequest;
import org.sonar.api.utils.log.Loggers;
import org.sonarqube.ws.MediaTypes;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java b/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java
index b9871f8b0c2..e7569e60350 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ws/WebServiceEngine.java
@@ -33,7 +33,7 @@ import org.sonar.api.server.ws.LocalConnector;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.ValidatingRequest;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.text.JsonWriter;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java
index de5f24347fc..2ad32ba9333 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/app/ProcessCommandWrapperImplTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.process.sharedmemoryfile.DefaultProcessCommands;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java
index ee90eb0d094..290e5309433 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/CredentialsExternalAuthenticationTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.security.Authenticator;
import org.sonar.api.security.ExternalGroupsProvider;
import org.sonar.api.security.ExternalUsersProvider;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java
index 9f26430ab8c..05fe52566e3 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/HttpHeadersAuthenticationTest.java
@@ -31,9 +31,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.DbTester;
import org.sonar.db.user.GroupDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java
index ed1f5c22084..f7b68650c27 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtHttpHandlerTest.java
@@ -33,7 +33,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java
index 08aae1e567e..e4ae8ff6bcf 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/JwtSerializerTest.java
@@ -32,7 +32,7 @@ import javax.crypto.spec.SecretKeySpec;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.core.util.UuidFactory;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java
index cc3501e4fc0..f20e6c6bdf0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserLastConnectionDatesUpdaterImplTest.java
@@ -23,7 +23,7 @@ package org.sonar.server.authentication;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.user.UserDto;
import org.sonar.db.user.UserTokenDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java
index f37b861518a..3a633f733bc 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplOrgMembershipSyncTest.java
@@ -23,12 +23,12 @@ import com.google.common.collect.ImmutableSet;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceTypes;
import org.sonar.api.server.authentication.UserIdentity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.alm.AlmAppInstallDto;
import org.sonar.db.component.ResourceTypesRule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java
index 5b733411282..d81029a2c54 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserRegistrarImplTest.java
@@ -24,10 +24,10 @@ import java.util.stream.Collectors;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.server.authentication.UserIdentity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java
index cac1b7ceaf7..14dc0e5fa11 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.authentication.BaseIdentityProvider;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java
index 649818cbc64..cc6376e9a3a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/ws/ValidateActionTest.java
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.authentication.BasicAuthentication;
import org.sonar.server.authentication.JwtHttpHandler;
import org.sonar.server.authentication.event.AuthenticationException;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java
index 59ddc6217ab..fbfc5ccabf7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/MeasureActionTest.java
@@ -30,7 +30,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric.Level;
import org.sonar.api.server.ws.WebService;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java
index d1897463493..924462809fd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/QualityGateActionTest.java
@@ -27,7 +27,7 @@ import java.util.Locale;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.Metric.Level;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.server.ws.WebService.Param;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java
index d34710a619e..5706c2699fa 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/badge/ws/SvgGeneratorTest.java
@@ -24,7 +24,7 @@ import org.apache.commons.io.IOUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.Metric;
import org.sonar.db.DbTester;
import org.sonar.server.tester.UserSessionRule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java
index c357b96495c..480ac6fc207 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.batch;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
import org.sonar.api.web.UserRole;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java
index c53cf871bf4..227bf05fd8a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ce/http/CeHttpClientTest.java
@@ -30,7 +30,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.process.sharedmemoryfile.DefaultProcessCommands;
import org.sonar.process.ProcessEntryPoint;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java
index 62994f1e503..002d03aba0f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ce/ws/CancelActionTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.ce.queue.CeQueue;
import org.sonar.ce.queue.CeQueueImpl;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java
index b2b26d951a7..319683819e6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexCreatorTest.java
@@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.server.es.IndexType.IndexMainType;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java
index de10b8e1905..515056beb85 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/es/IndexerStartupTaskTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mockito;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.metadata.MetadataIndex;
import org.sonar.server.es.metadata.MetadataIndexImpl;
import org.sonar.server.es.newindex.FakeIndexDefinition;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java
index 4f6633793b6..8394828fffe 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/es/MigrationEsClientImplTest.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.server.platform.db.migration.es.MigrationEsClient;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java b/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java
index cad24375750..9c898e9611e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/es/RecoveryIndexerTest.java
@@ -35,9 +35,9 @@ import org.junit.rules.DisableOnDebug;
import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.db.DbSession;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java
index 4e278877bad..c0a61c8f573 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthModuleTest.java
@@ -26,7 +26,7 @@ import java.util.Random;
import java.util.stream.Collectors;
import org.junit.Test;
import org.picocontainer.ComponentAdapter;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.api.utils.System2;
import org.sonar.core.platform.ComponentContainer;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java
index 72366851eb6..015d5f62db7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/health/NodeHealthProviderImplTest.java
@@ -26,7 +26,7 @@ import java.util.stream.IntStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.process.NetworkUtils;
import org.sonar.process.cluster.health.NodeDetails;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java
index 91ef4b62709..f103c91017e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/WebIssueStorageTest.java
@@ -28,7 +28,7 @@ import org.sonar.api.rules.RuleType;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.Duration;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.core.issue.DefaultIssue;
import org.sonar.core.issue.DefaultIssueComment;
import org.sonar.core.issue.IssueChangeContext;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java
index 62bd3b09a36..e46f938784c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexDebtTest.java
@@ -27,7 +27,7 @@ import org.sonar.api.issue.Issue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.component.ComponentTesting;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java
index bbf2838cea6..e72f44a18b7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFacetsTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java
index 94e91c80676..7bdb1edfdae 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexFiltersTest.java
@@ -32,7 +32,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.issue.Issue;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java
index 426243cd7d6..46ba1e80a12 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityHotspotsTest.java
@@ -30,7 +30,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.server.es.EsTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java
index 577c835d490..facee47775b 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSecurityReportsTest.java
@@ -30,7 +30,7 @@ import org.sonar.api.issue.Issue;
import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java
index ae7f70540a8..e5c1ec193dd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexSortTest.java
@@ -30,7 +30,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.issue.Issue;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java
index 336d049ba05..e34a915f808 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java
@@ -34,7 +34,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.issue.Issue;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java
index 412b3311037..aa81a36fdc9 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/AssignActionTest.java
@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
index edcfca9ce0f..d4d4bc6375e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
@@ -33,7 +33,7 @@ import org.mockito.ArgumentCaptor;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
import org.sonar.db.component.BranchType;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java
index 9634f8ee931..4c755e96cbc 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/DoTransitionActionTest.java
@@ -28,7 +28,7 @@ import org.mockito.ArgumentCaptor;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java
index 9a4bacc317d..6f97d04f0e3 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsTest.java
@@ -25,7 +25,7 @@ import java.util.Date;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Languages;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.rule.RuleKey;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java
index 1d5d65750a9..1d5abf53edc 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionFacetsTest.java
@@ -26,7 +26,7 @@ import java.util.stream.IntStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Languages;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.ws.WebService;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java
index 07ded448839..d1287a495f3 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java
@@ -28,7 +28,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Languages;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rules.RuleType;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java
index b029c512d7e..a12c5715697 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTestOnSonarCloud.java
@@ -26,7 +26,7 @@ import java.util.Arrays;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Languages;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.Durations;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java
index 872c5777b2c..63257d007b9 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/measure/custom/ws/UpdateActionTest.java
@@ -23,7 +23,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.measure.custom.CustomMeasureDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java
index df8fff10315..1dc8030a294 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/measure/live/LiveMeasureComputerImplTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
import org.sonar.api.resources.Qualifiers;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java
index 8a24e6b092c..7d7fb37fc96 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationDaemonTest.java
@@ -26,7 +26,7 @@ import org.mockito.InOrder;
import org.mockito.Mockito;
import org.mockito.verification.Timeout;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.Notification;
import static java.util.Collections.singleton;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java
index a8d6d52544d..7e343ea2f28 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/notification/NotificationMediumTest.java
@@ -19,18 +19,15 @@
*/
package org.sonar.server.notification;
-import com.google.common.collect.Sets;
-import java.util.Arrays;
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.db.DbClient;
-import org.sonar.db.property.PropertiesDao;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java
index a6354115e83..89f6bc086f4 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/notification/ws/DispatchersImplTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.notification.ws;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.server.issue.notification.FPOrWontFixNotificationHandler;
import org.sonar.server.issue.notification.MyNewIssuesNotificationHandler;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java
index 75720a17016..58474092b70 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/organization/OrganizationUpdaterImplTest.java
@@ -27,11 +27,11 @@ import org.apache.commons.lang.RandomStringUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceTypes;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.core.config.CorePropertyDefinitions;
import org.sonar.core.permission.GlobalPermissions;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java
index 93f3479c185..760a904b9be 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/CreateActionTest.java
@@ -26,12 +26,12 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceTypes;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.core.permission.GlobalPermissions;
import org.sonar.core.util.UuidFactoryFast;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java
index ce3eaed9160..9946f312fd4 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/organization/ws/OrganizationsWsModuleTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.organization.ws;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java
index 88ae06abbc8..c859ea7c39d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/PermissionTemplateServiceTest.java
@@ -24,9 +24,9 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceTypes;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java b/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java
index 2dfe93c4c29..71ad3c3bb93 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/index/FooIndexDefinition.java
@@ -19,7 +19,7 @@
*/
package org.sonar.server.permission.index;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.es.Index;
import org.sonar.server.es.IndexDefinition;
import org.sonar.server.es.IndexType;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java
index ac233f2d622..a6516b61993 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/BasePermissionWsTest.java
@@ -22,8 +22,8 @@ package org.sonar.server.permission.ws;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Qualifiers;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
import org.sonar.db.component.ResourceTypesRule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java
index 80843e037bb..0efc112c1d8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/CreateTemplateActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.permission.ws.template;
import javax.annotation.Nullable;
import org.junit.Test;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.permission.template.PermissionTemplateDto;
import org.sonar.server.exceptions.BadRequestException;
import org.sonar.server.exceptions.ForbiddenException;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java
index afcca28802a..a0eeba405a5 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/DeleteTemplateActionTest.java
@@ -25,8 +25,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Qualifiers;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java
index 3de7281760b..ce8e98ccb7e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/DatabaseServerCompatibilityTest.java
@@ -23,7 +23,7 @@ import java.util.Optional;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
index 812b3d9254b..04cab75b384 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/PersistentSettingsTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java
index 7e30958d539..3d149ac81b4 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseFactoryTest.java
@@ -20,7 +20,7 @@
package org.sonar.server.platform.db;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java
index 5672b7b60cf..3f3520c4893 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/db/EmbeddedDatabaseTest.java
@@ -31,7 +31,7 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.process.NetworkUtilsImpl;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java
index 5860ed73671..d1010a5ad2a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/SettingsSectionTest.java
@@ -24,7 +24,7 @@ import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
import static org.apache.commons.lang.StringUtils.repeat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
index bc233dab4e9..1c4495f1a95 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/StandaloneSystemSectionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform.monitoring;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.api.security.SecurityRealm;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java
index 3b06b895c33..2f87bef1aad 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/WebSystemInfoModuleTest.java
@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.picocontainer.ComponentAdapter;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.server.platform.WebServer;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java
index f12c7461f1e..adffc0b91a2 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/GlobalSystemSectionTest.java
@@ -21,7 +21,7 @@ package org.sonar.server.platform.monitoring.cluster;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.api.security.SecurityRealm;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java
index 9fdb245d475..9e3d15d6c71 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/cluster/NodeSystemSectionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.platform.monitoring.cluster;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.process.systeminfo.protobuf.ProtobufSystemInfo;
import org.sonar.server.platform.OfficialDistribution;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java
index 3756ca14b58..a256be06728 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ServerId;
import org.sonar.core.util.UuidFactory;
import org.sonar.core.util.Uuids;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java
index 0875ad0fcb2..22a4550d8d5 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/serverid/ServerIdManagerTest.java
@@ -30,7 +30,7 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.CoreProperties;
import org.sonar.api.SonarQubeSide;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
import org.sonar.core.platform.ServerId;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java
index 5551c269c15..f9bf7d29a92 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/web/WebPagesCacheTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.stubbing.Answer;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.server.platform.OfficialDistribution;
import org.sonar.server.platform.Platform;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java
index 5f52cee93c1..d07cb6a34c8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/ChangeLogLevelActionModuleTest.java
@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.picocontainer.ComponentAdapter;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.server.platform.WebServer;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java
index bc353f99778..cfd4360fcfd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/PluginFileSystemTest.java
@@ -29,7 +29,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.PluginInfo;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java
index b1e50cba77c..6bd1c7dba91 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/plugins/UpdateCenterClientTest.java
@@ -24,7 +24,7 @@ import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.SonarException;
import org.sonar.api.utils.UriReader;
import org.sonar.process.ProcessProperties;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java
index 383177f51c8..4b558c8ce92 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/project/ws/ProjectsWsModuleTest.java
@@ -20,8 +20,8 @@
package org.sonar.server.project.ws;
import org.junit.Test;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.process.ProcessProperties;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java
index af66710a957..0013337d241 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/project/ws/UpdateDefaultVisibilityActionTest.java
@@ -22,7 +22,6 @@ package org.sonar.server.project.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.WebService;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java
index ba56ae7b267..76d1c9facf6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualitygate/ProjectsInWarningDaemonTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
import org.sonar.api.utils.System2;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java
index f35fb4cd915..c5e0685517c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileInsertImplTest.java
@@ -24,11 +24,11 @@ import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.Severity;
import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition;
import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.NewBuiltInQualityProfile;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.core.util.UuidFactory;
import org.sonar.db.DbSession;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java
index f15fe281fca..ee0f3fbfae8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQProfileUpdateImplTest.java
@@ -33,7 +33,7 @@ import org.sonar.api.rules.RulePriority;
import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition;
import org.sonar.api.server.profile.BuiltInQualityProfilesDefinition.NewBuiltInQualityProfile;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.qualityprofile.ActiveRuleDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java
index d796ff9e6fd..d87e2b3fc72 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/BuiltInQualityProfilesUpdateListenerTest.java
@@ -25,7 +25,7 @@ import java.util.Random;
import org.assertj.core.groups.Tuple;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.resources.Language;
import org.sonar.api.resources.Languages;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java
index 6f3f63dba08..6bf85ee8932 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileBackuperImplTest.java
@@ -29,9 +29,9 @@ import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java
index b5be108fc50..a084f72f5b6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileCopierTest.java
@@ -28,9 +28,9 @@ import org.apache.commons.io.IOUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
-import org.sonar.api.utils.internal.JUnitTempFolder;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java
index b6c2221b9c4..dd57f191db2 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileExportersTest.java
@@ -28,6 +28,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.profiles.ProfileExporter;
import org.sonar.api.profiles.ProfileImporter;
import org.sonar.api.profiles.RulesProfile;
@@ -36,7 +37,6 @@ import org.sonar.api.rules.RuleFinder;
import org.sonar.api.rules.RulePriority;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.ValidationMessages;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
import org.sonar.db.qualityprofile.QProfileDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
index bdf494dde38..176bddc24c6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileFactoryImplTest.java
@@ -27,9 +27,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.core.util.Uuids;
import org.sonar.db.DbSession;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java
index f2c5e27eafc..b53733b9cd1 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileResetImplTest.java
@@ -22,8 +22,8 @@ package org.sonar.server.qualityprofile;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.qualityprofile.ActiveRuleKey;
import org.sonar.db.qualityprofile.OrgActiveRuleDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java
index 97c24b81ba1..c2c813f10d8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileRuleImplTest.java
@@ -30,10 +30,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.PropertyType;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.qualityprofile.ActiveRuleParamDto;
import org.sonar.db.qualityprofile.OrgActiveRuleDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java
index cfee6896258..77e3fcc903e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/QProfileTreeImplTest.java
@@ -26,10 +26,10 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.qualityprofile.ActiveRuleParamDto;
import org.sonar.db.qualityprofile.OrgActiveRuleDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java
index ec409c97cd2..6b7d6a6dd73 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java
@@ -26,9 +26,9 @@ import java.util.Optional;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Language;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.util.UuidFactoryFast;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java
index 865b237d917..7c8b2b93bcc 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ChangelogActionTest.java
@@ -31,7 +31,7 @@ import org.sonar.api.resources.Languages;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
import org.sonar.db.qualityprofile.QProfileChangeDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java
index 7de05d6229c..8551cdcb44f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CopyActionTest.java
@@ -25,10 +25,10 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.JUnitTempFolder;
import org.sonar.api.resources.Languages;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.JUnitTempFolder;
import org.sonar.core.util.SequenceUuidFactory;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java
index 8320116e216..2a4d83ccc9c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfileReferenceTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.resources.Languages;
import org.sonar.api.server.ws.WebService;
-import org.sonar.api.server.ws.internal.SimpleGetRequest;
+import org.sonar.api.impl.ws.SimpleGetRequest;
import org.sonar.server.ws.WsTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java
index 366119aa08c..6c19c1a0ef0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/CachingRuleFinderTest.java
@@ -26,11 +26,11 @@ import java.util.Random;
import java.util.function.Consumer;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleQuery;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java
index 3637ea75755..2f55c987a57 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/DeprecatedRulesDefinitionLoaderTest.java
@@ -36,6 +36,7 @@ import org.sonar.api.server.debt.DebtRemediationFunction;
import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.api.utils.ValidationMessages;
import org.sonar.core.i18n.RuleI18nManager;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import org.sonar.server.debt.DebtModelPluginRepository;
import org.sonar.server.debt.DebtModelXMLExporter;
import org.sonar.server.debt.DebtRulesXMLImporter;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java
index e2b547cf151..2be421542b4 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/RuleQueryFactoryTest.java
@@ -25,7 +25,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
-import org.sonar.api.server.ws.internal.SimpleGetRequest;
+import org.sonar.api.impl.ws.SimpleGetRequest;
import org.sonar.api.utils.System2;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java
index e1272f7aa5e..8384d7176f0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java
@@ -27,6 +27,7 @@ import org.assertj.core.api.iterable.Extractor;
import org.junit.Before;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.resources.Languages;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
@@ -34,7 +35,6 @@ import org.sonar.api.rules.RuleType;
import org.sonar.api.server.debt.DebtRemediationFunction;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.util.stream.MoreCollectors;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java
index bb86e37ce02..d8064914819 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/CheckSecretKeyActionTest.java
@@ -27,8 +27,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.config.Encryption;
-import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.server.exceptions.ForbiddenException;
import org.sonar.server.tester.UserSessionRule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java
index 59acdbde22f..230264e218c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/EncryptActionTest.java
@@ -28,7 +28,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.config.Encryption;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.server.exceptions.BadRequestException;
import org.sonar.server.exceptions.ForbiddenException;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java
index e49e7914437..56930de1154 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/GenerateSecretKeyActionTest.java
@@ -27,13 +27,11 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.config.Encryption;
-import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.server.exceptions.ForbiddenException;
import org.sonar.server.tester.UserSessionRule;
import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.MediaTypes;
import org.sonarqube.ws.Settings.GenerateSecretKeyWsResponse;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java
index bd778c40aed..07b05d46f3e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/setting/ws/ValuesActionTest.java
@@ -32,7 +32,7 @@ import org.sonar.api.config.Configuration;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.PropertyFieldDefinition;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
import org.sonar.api.web.UserRole;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java
index 60944a2a608..f3266fade4e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/settings/ProjectConfigurationLoaderImplTest.java
@@ -26,7 +26,7 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.component.ComponentDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java
index 60fdc81e5d6..9dc9c216651 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java
@@ -26,7 +26,7 @@ import okhttp3.Request;
import okio.Buffer;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java
index 227aff02c15..197b196328f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/telemetry/TelemetryDaemonTest.java
@@ -29,9 +29,8 @@ import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.mockito.internal.matchers.Any;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.utils.internal.TestSystem2;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.platform.EditionProvider;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java
index 1a20d2e87fe..c55f40f90b6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/GlobalActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.ui.ws;
import java.util.Optional;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.api.resources.ResourceType;
import org.sonar.api.resources.ResourceTypeTree;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java
index 03d177395e2..cb92f591fdc 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ui/ws/SettingsActionTest.java
@@ -21,7 +21,7 @@ package org.sonar.server.ui.ws;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.web.page.Page;
import org.sonar.api.web.page.PageDefinition;
import org.sonar.core.platform.PluginInfo;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java
index d680692abd6..9abfeb01669 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/SecurityRealmFactoryTest.java
@@ -21,7 +21,7 @@ package org.sonar.server.user;
import org.junit.Test;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.security.LoginPasswordAuthenticator;
import org.sonar.api.security.SecurityRealm;
import org.sonar.api.utils.SonarException;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java
index 352070eacf3..8b86153904b 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/SystemPasscodeImplTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.user;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.server.ws.TestRequest;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java
index af9a0eca653..2b111c3a9e0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterCreateTest.java
@@ -28,10 +28,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.platform.NewUserHandler;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java
index 2d8d686a8f2..7bf516e79c5 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterReactivateTest.java
@@ -23,9 +23,9 @@ import com.google.common.collect.Multimap;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java
index 8bd07c24f8a..f10ac9b212d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/UserUpdaterUpdateTest.java
@@ -25,9 +25,9 @@ import org.elasticsearch.search.SearchHit;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java
index a20573fc2ca..0c5915c47f7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/ChangePasswordActionTest.java
@@ -23,10 +23,10 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.server.authentication.CredentialsLocalAuthentication;
import org.sonar.server.es.EsTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java
index 3cf1855426d..c8a60f681d8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java
@@ -25,10 +25,10 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.core.config.CorePropertyDefinitions;
import org.sonar.db.DbTester;
import org.sonar.db.user.GroupDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java
index 38de2bb71af..cd3bb4523da 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionHomepageTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.user.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceType;
import org.sonar.api.resources.ResourceTypeTree;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java
index fc3c15eae83..b1d23d8eee5 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java
@@ -23,7 +23,7 @@ import java.util.Collections;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.ResourceType;
import org.sonar.api.resources.ResourceTypeTree;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java
index 54aac993829..2f7bebc48fb 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/DeactivateActionTest.java
@@ -24,8 +24,8 @@ import javax.annotation.Nullable;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.utils.System2;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.DbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java
index 1da5327451a..498bf6adedb 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/HomepageTypesImplTest.java
@@ -21,7 +21,7 @@ package org.sonar.server.user.ws;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.db.DbTester;
import org.sonar.server.organization.TestOrganizationFlags;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java
index 8901a4c7dd5..40bcb63f881 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateActionTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.System2;
import org.sonar.db.DbClient;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java
index c7f89fc8e42..b5696869de2 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UpdateLoginActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.user.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.server.ws.WebService.Param;
import org.sonar.api.utils.System2;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java
index 1fbd80a8f78..50ce373b592 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/user/ws/UsersWsModuleTest.java
@@ -20,8 +20,8 @@
package org.sonar.server.user.ws;
import org.junit.Test;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.process.ProcessProperties;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
index 1b73b2ba8b5..5050def00f0 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/AddUserActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
import org.sonar.db.user.GroupDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java
index a98bbe1085d..7d96370e5cf 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/DeleteActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.api.web.UserRole;
import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDbTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
index 7e738bec02e..72d8529dbb6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/RemoveUserActionTest.java
@@ -22,7 +22,7 @@ package org.sonar.server.usergroups.ws;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.utils.internal.AlwaysIncreasingSystem2;
+import org.sonar.api.impl.utils.AlwaysIncreasingSystem2;
import org.sonar.core.permission.GlobalPermissions;
import org.sonar.db.DbTester;
import org.sonar.db.organization.OrganizationDto;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java
index 6313f12b811..aea0e0d69bd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java
@@ -34,8 +34,8 @@ import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.commons.io.IOUtils;
-import org.sonar.api.server.ws.internal.PartImpl;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.PartImpl;
+import org.sonar.api.impl.ws.ValidatingRequest;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java
index 1e58673735d..c3e7f7e1596 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WebServiceFilterTest.java
@@ -32,7 +32,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.RequestHandler;
import org.sonar.api.server.ws.Response;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java
index fdd896fec52..e69153b5033 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java
@@ -37,8 +37,8 @@ import javax.annotation.Nullable;
import org.apache.commons.io.IOUtils;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
-import org.sonar.api.server.ws.internal.PartImpl;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.PartImpl;
+import org.sonar.api.impl.ws.ValidatingRequest;
import org.sonar.api.utils.text.JsonWriter;
import org.sonar.api.utils.text.XmlWriter;
import org.sonar.server.ws.WsTester.TestResponse.TestStream;
diff --git a/settings.gradle b/settings.gradle
index 87a6131a714..669cd2dde6b 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -24,6 +24,7 @@ include 'sonar-core'
include 'sonar-duplications'
include 'sonar-markdown'
include 'sonar-plugin-api'
+include 'sonar-plugin-api-impl'
include 'sonar-scanner-engine'
include 'sonar-scanner-engine-shaded'
include 'sonar-scanner-protocol'
diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle
index b6ec4aae2d3..edf70929c6b 100644
--- a/sonar-application/build.gradle
+++ b/sonar-application/build.gradle
@@ -203,8 +203,8 @@ zip.doFirst {
}
// Check the size of the archive
zip.doLast {
- def minLength = 185000000
- def maxLength = 199000000
+ def minLength = 198000000
+ def maxLength = 206000000
def length = archiveFile.get().asFile.length()
if (length < minLength)
throw new GradleException("$archiveName size ($length) too small. Min is $minLength")
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index c37aff811d4..b547f2cd76c 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -21,7 +21,7 @@ package org.sonar.application;
import java.io.IOException;
import org.sonar.api.SonarEdition;
-import org.sonar.api.internal.MetadataLoader;
+import org.sonar.api.impl.context.MetadataLoader;
import org.sonar.application.command.CommandFactory;
import org.sonar.application.command.CommandFactoryImpl;
import org.sonar.application.command.JavaVersion;
diff --git a/sonar-core/build.gradle b/sonar-core/build.gradle
index aad84e6dbfe..5a84d542070 100644
--- a/sonar-core/build.gradle
+++ b/sonar-core/build.gradle
@@ -17,6 +17,7 @@ dependencies {
compile 'org.slf4j:slf4j-api'
compile 'org.sonarsource.update-center:sonar-update-center-common'
compile project(path: ':sonar-plugin-api', configuration: 'shadow')
+ compile project(':sonar-plugin-api-impl')
compileOnly 'com.google.code.findbugs:jsr305'
diff --git a/sonar-core/src/main/java/org/sonar/core/extension/CoreExtensionsInstaller.java b/sonar-core/src/main/java/org/sonar/core/extension/CoreExtensionsInstaller.java
index b26a382ebd1..bd93edf4cca 100644
--- a/sonar-core/src/main/java/org/sonar/core/extension/CoreExtensionsInstaller.java
+++ b/sonar-core/src/main/java/org/sonar/core/extension/CoreExtensionsInstaller.java
@@ -29,7 +29,7 @@ import java.util.function.Predicate;
import org.sonar.api.ExtensionProvider;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
@@ -60,9 +60,9 @@ public abstract class CoreExtensionsInstaller {
}
/**
- * @param container the container into which extensions will be installed
- * @param extensionFilter filters extensions added to {@link CoreExtension.Context}. When it returns false, the
- * extension is ignored as if it had never been added to the context.
+ * @param container the container into which extensions will be installed
+ * @param extensionFilter filters extensions added to {@link CoreExtension.Context}. When it returns false, the
+ * extension is ignored as if it had never been added to the context.
* @param additionalSideFilter applied on top of filtering on {@link #supportedAnnotationType} to decide whether
* extension should be added to container as an object or only as a PropertyDefinition.
*/
diff --git a/sonar-core/src/test/java/org/sonar/core/extension/CoreExtensionsInstallerTest.java b/sonar-core/src/test/java/org/sonar/core/extension/CoreExtensionsInstallerTest.java
index 1c793f31d9b..c8f5baa5bcc 100644
--- a/sonar-core/src/test/java/org/sonar/core/extension/CoreExtensionsInstallerTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/extension/CoreExtensionsInstallerTest.java
@@ -46,7 +46,7 @@ import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import static org.assertj.core.api.Assertions.assertThat;
@@ -227,7 +227,8 @@ public class CoreExtensionsInstallerTest {
@Test
@UseDataProvider("allMethodsToAddExtension")
- public void install_adds_providers_to_container_and_install_extensions_they_provide_when_annotated_with_expected_annotation(BiConsumer<CoreExtension.Context, Collection<Object>> extensionAdder) {
+ public void install_adds_providers_to_container_and_install_extensions_they_provide_when_annotated_with_expected_annotation(
+ BiConsumer<CoreExtension.Context, Collection<Object>> extensionAdder) {
List<Object> extensions = ImmutableList.of(WestSideProvider.class, PartiallyWestSideProvider.class, EastSideProvider.class);
CoreExtension coreExtension = newCoreExtension(context -> extensionAdder.accept(context, extensions));
when(coreExtensionRepository.loadedCoreExtensions()).thenReturn(Stream.of(coreExtension));
diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
index aedf30248af..0c764b62e36 100644
--- a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
@@ -26,10 +26,10 @@ import java.util.Locale;
import java.util.TimeZone;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.api.impl.utils.TestSystem2;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
diff --git a/sonar-core/src/test/java/org/sonar/core/util/DefaultHttpDownloaderTest.java b/sonar-core/src/test/java/org/sonar/core/util/DefaultHttpDownloaderTest.java
index 62bc8f33338..8944bfbf181 100644
--- a/sonar-core/src/test/java/org/sonar/core/util/DefaultHttpDownloaderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/util/DefaultHttpDownloaderTest.java
@@ -52,7 +52,7 @@ import org.simpleframework.http.Response;
import org.simpleframework.http.core.Container;
import org.simpleframework.transport.connect.SocketConnection;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import org.sonar.api.utils.SonarException;
@@ -138,10 +138,10 @@ public class DefaultHttpDownloaderTest {
@Override
public boolean matches(Object ex) {
return
- // Java 8
- ex instanceof NoRouteToHostException || ex instanceof SocketException
- // Java 7 or before
- || ex instanceof SocketTimeoutException;
+ // Java 8
+ ex instanceof NoRouteToHostException || ex instanceof SocketException
+ // Java 7 or before
+ || ex instanceof SocketTimeoutException;
}
@Override
diff --git a/sonar-plugin-api-impl/build.gradle b/sonar-plugin-api-impl/build.gradle
new file mode 100644
index 00000000000..6046e6eef9a
--- /dev/null
+++ b/sonar-plugin-api-impl/build.gradle
@@ -0,0 +1,87 @@
+sonarqube {
+ properties {
+ property 'sonar.projectName', "${projectTitle} :: Plugin API Implementation"
+ }
+}
+
+apply plugin: 'com.github.johnrengelman.shadow'
+
+dependencies {
+ // please keep the list grouped by configuration and ordered by name
+
+ compile 'commons-codec:commons-codec'
+ compile 'commons-io:commons-io'
+ compile 'commons-lang:commons-lang'
+ compile 'com.google.code.gson:gson'
+ compile 'org.apache.commons:commons-csv'
+
+ // shaded, but not relocated
+ compile project(':sonar-check-api')
+ compile project(':sonar-plugin-api')
+ compile project(':sonar-ws')
+
+
+ shadow 'org.codehaus.staxmate:staxmate'
+ shadow 'org.codehaus.woodstox:stax2-api'
+ shadow 'org.codehaus.woodstox:woodstox-core-lgpl'
+
+ compileOnly 'ch.qos.logback:logback-classic'
+ compileOnly 'ch.qos.logback:logback-core'
+ compileOnly 'com.google.code.findbugs:jsr305'
+ compileOnly 'javax.servlet:javax.servlet-api'
+ compileOnly 'junit:junit'
+ compileOnly 'org.slf4j:slf4j-api'
+
+ testCompile 'com.google.guava:guava'
+ testCompile 'com.tngtech.java:junit-dataprovider'
+ testCompile 'org.assertj:assertj-core'
+ testCompile 'org.mockito:mockito-core'
+ testCompile project(':sonar-scanner-engine')
+ testCompile project(':server:sonar-server')
+
+}
+
+sourceSets {
+ // Make the compileOnly dependencies available when compiling/running tests
+ test.compileClasspath += configurations.compileOnly + configurations.shadow
+ test.runtimeClasspath += configurations.compileOnly + configurations.shadow
+}
+
+def on3Digits(version) {
+ def projectversion3digits = version - ~/-\w+/
+ projectversion3digits = projectversion3digits.tokenize('.').plus(0).take(3).join('.')
+}
+
+import org.apache.tools.ant.filters.ReplaceTokens
+processResources {
+ filter ReplaceTokens, tokens: [
+ // The build version is composed of 4 fields, including the semantic version and the build number provided by Travis.
+ 'project.buildVersion': project.version.endsWith('SNAPSHOT') ? project.version : on3Digits(project.version) + '.' + System.getProperty("buildNumber"),
+ 'project.version.3digits': project.version.endsWith('SNAPSHOT') ? project.version : on3Digits(project.version)
+ ]
+}
+
+shadowJar {
+ configurations = [project.configurations.default]
+ relocate('com.google', 'org.sonar.api.internal.google')
+ relocate('org.apache.commons', 'org.sonar.api.internal.apachecommons')
+ dependencies {
+ exclude(dependency('org.codehaus.woodstox:woodstox-core-lgpl'))
+ exclude(dependency('org.codehaus.woodstox:stax2-api'))
+ exclude(dependency('org.codehaus.staxmate:staxmate'))
+ }
+}
+
+artifactoryPublish.skip = false
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifact source: shadowJar, classifier: null
+ if (release) {
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+ }
+}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java
index 68bdf1ed3af..a46bf1a2e82 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultActiveRule.java
@@ -17,13 +17,12 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
-import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.rule.RuleKey;
@Immutable
@@ -38,7 +37,7 @@ public class DefaultActiveRule implements ActiveRule {
private final long updatedAt;
private final String qProfileKey;
- DefaultActiveRule(NewActiveRule newActiveRule) {
+ public DefaultActiveRule(NewActiveRule newActiveRule) {
this.severity = newActiveRule.severity;
this.internalKey = newActiveRule.internalKey;
this.templateRuleKey = newActiveRule.templateRuleKey;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java
index d53859ad348..b8938529024 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRule.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import java.util.Collection;
import java.util.Collections;
@@ -25,8 +25,6 @@ import java.util.HashMap;
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
-import org.sonar.api.batch.rule.Rule;
-import org.sonar.api.batch.rule.RuleParam;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
@@ -43,7 +41,7 @@ public class DefaultRule implements Rule {
private final RuleStatus status;
private final Map<String, RuleParam> params;
- DefaultRule(NewRule newRule) {
+ public DefaultRule(NewRule newRule) {
this.key = newRule.key;
this.id = newRule.id;
this.name = newRule.name;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRuleParam.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java
index 31fed46d547..eb714dcfeda 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRuleParam.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/rule/DefaultRuleParam.java
@@ -17,9 +17,7 @@
* 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.rule;
-
-import org.sonar.api.batch.rule.RuleParam;
+package org.sonar.api.batch.rule;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java
index 5455cf03191..fea9800f3a8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/ConfigurationBridge.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/ConfigurationBridge.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.impl.config;
import java.util.Optional;
import org.sonar.api.config.Settings;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MapSettings.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java
index 5d07d607923..61ac6013c3f 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MapSettings.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MapSettings.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.impl.config;
import java.util.HashMap;
import java.util.Map;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java
index dab98c55781..3d7d9f009c7 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/MultivalueProperty.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/MultivalueProperty.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.impl.config;
import java.io.IOException;
import java.io.StringReader;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java
index f6774798046..bcccfddddd4 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/config/package-info.java
@@ -18,6 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.config.internal;
+package org.sonar.api.impl.config;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/MetadataLoader.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java
index bb155753d55..575fc472592 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/internal/MetadataLoader.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/MetadataLoader.java
@@ -17,7 +17,7 @@
* 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.api.internal;
+package org.sonar.api.impl.context;
import java.io.IOException;
import java.net.URL;
@@ -44,9 +44,9 @@ public class MetadataLoader {
}
public static Version loadVersion(System2 system) {
- try {
- URL url = system.getResource(VERSION_FILE_PATH);
- Scanner scanner = new Scanner(url.openStream(), StandardCharsets.UTF_8.name());
+ URL url = system.getResource(VERSION_FILE_PATH);
+
+ try (Scanner scanner = new Scanner(url.openStream(), StandardCharsets.UTF_8.name())) {
String versionInFile = scanner.nextLine();
return Version.parse(versionInFile);
} catch (IOException e) {
@@ -55,12 +55,11 @@ public class MetadataLoader {
}
public static SonarEdition loadEdition(System2 system) {
- try {
- URL url = system.getResource(EDITION_FILE_PATH);
- if (url == null) {
- return SonarEdition.COMMUNITY;
- }
- Scanner scanner = new Scanner(url.openStream(), StandardCharsets.UTF_8.name());
+ URL url = system.getResource(EDITION_FILE_PATH);
+ if (url == null) {
+ return SonarEdition.COMMUNITY;
+ }
+ try (Scanner scanner = new Scanner(url.openStream(), StandardCharsets.UTF_8.name())) {
String editionInFile = scanner.nextLine();
return parseEdition(editionInFile);
} catch (IOException e) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/PluginContextImpl.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java
index 3fccb4c59cc..211e5cedbc2 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/internal/PluginContextImpl.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/PluginContextImpl.java
@@ -17,12 +17,12 @@
* 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.api.internal;
+package org.sonar.api.impl.context;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
/**
* Implementation of {@link Plugin.Context} that plugins could use in their unit tests.
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java
index 3f69f36bb4e..4e4074efdbb 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/internal/SonarRuntimeImpl.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/SonarRuntimeImpl.java
@@ -17,7 +17,7 @@
* 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.api.internal;
+package org.sonar.api.impl.context;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java
index f3fea3220e9..632005ca779 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/context/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.utils.internal;
+package org.sonar.api.impl.context;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/AbstractProjectOrModule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java
index 9fc2d130f4a..2834b345a93 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/AbstractProjectOrModule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/AbstractProjectOrModule.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultFileSystem.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java
index 1c1729634e1..db015d9277d 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultFileSystem.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultFileSystem.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
@@ -37,11 +37,11 @@ import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputDir;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.impl.fs.predicates.DefaultFilePredicates;
+import org.sonar.api.impl.fs.predicates.FileExtensionPredicate;
+import org.sonar.api.impl.fs.predicates.OptimizedFilePredicateAdapter;
import org.sonar.api.scan.filesystem.PathResolver;
import org.sonar.api.utils.PathUtils;
-import org.sonar.scanner.fs.predicates.DefaultFilePredicates;
-import org.sonar.scanner.fs.predicates.FileExtensionPredicate;
-import org.sonar.scanner.fs.predicates.OptimizedFilePredicateAdapter;
/**
* @since 4.2
@@ -49,29 +49,29 @@ import org.sonar.scanner.fs.predicates.OptimizedFilePredicateAdapter;
public class DefaultFileSystem implements FileSystem {
private final Cache cache;
+ private final FilePredicates predicates;
private final Path baseDir;
private Path workDir;
private Charset encoding;
- protected final FilePredicates predicates;
/**
* Only for testing
*/
public DefaultFileSystem(Path baseDir) {
- this(baseDir, new MapCache());
+ this(baseDir, new MapCache(), new DefaultFilePredicates(baseDir));
}
/**
* Only for testing
*/
public DefaultFileSystem(File baseDir) {
- this(baseDir.toPath(), new MapCache());
+ this(baseDir.toPath(), new MapCache(), new DefaultFilePredicates(baseDir.toPath()));
}
- protected DefaultFileSystem(Path baseDir, Cache cache) {
+ protected DefaultFileSystem(Path baseDir, Cache cache, FilePredicates filePredicates) {
this.baseDir = baseDir;
this.cache = cache;
- this.predicates = new DefaultFilePredicates(this.baseDir);
+ this.predicates = filePredicates;
}
public Path baseDirPath() {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultIndexedFile.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java
index e52e0b46e1f..5dae95717c4 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultIndexedFile.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultIndexedFile.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
@@ -31,7 +31,6 @@ import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.fs.IndexedFile;
import org.sonar.api.batch.fs.InputFile.Type;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
import org.sonar.api.utils.PathUtils;
/**
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputComponent.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java
index 11601e0265f..14acba4e1fe 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputComponent.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputComponent.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.util.HashSet;
import java.util.Set;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputDir.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java
index 13eb77be1c4..53f1800c720 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputDir.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputDir.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.net.URI;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputFile.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java
index c74f1c41296..61561b0541a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputFile.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputFile.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -43,7 +43,6 @@ import org.apache.commons.io.input.BOMInputStream;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.fs.TextRange;
-import org.sonar.api.batch.fs.internal.Metadata;
import static org.sonar.api.utils.Preconditions.checkArgument;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputModule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java
index a729bff7856..476a719da81 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputModule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputModule.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.nio.file.Path;
@@ -30,7 +30,7 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputModule;
import org.sonar.api.scan.filesystem.PathResolver;
-import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
@Immutable
public class DefaultInputModule extends AbstractProjectOrModule implements InputModule {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputProject.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java
index 9dcd0254b00..0ed150065ed 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultInputProject.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultInputProject.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextPointer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java
index 5cfc84fc712..541ee958bba 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextPointer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextPointer.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import org.sonar.api.batch.fs.TextPointer;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextRange.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java
index f83c330e7ea..0bf0e5151ab 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/DefaultTextRange.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/DefaultTextRange.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.fs.TextRange;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/FileMetadata.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java
index 1b984168d51..8078db10b67 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/FileMetadata.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/FileMetadata.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.BufferedReader;
import java.io.IOException;
@@ -29,12 +29,11 @@ import java.nio.charset.StandardCharsets;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.batch.fs.internal.Metadata;
-import org.sonar.scanner.fs.charhandler.CharHandler;
-import org.sonar.scanner.fs.charhandler.FileHashComputer;
-import org.sonar.scanner.fs.charhandler.LineCounter;
-import org.sonar.scanner.fs.charhandler.LineHashComputer;
-import org.sonar.scanner.fs.charhandler.LineOffsetCounter;
+import org.sonar.api.impl.fs.charhandler.CharHandler;
+import org.sonar.api.impl.fs.charhandler.FileHashComputer;
+import org.sonar.api.impl.fs.charhandler.LineCounter;
+import org.sonar.api.impl.fs.charhandler.LineHashComputer;
+import org.sonar.api.impl.fs.charhandler.LineOffsetCounter;
/**
* Computes hash of files. Ends of Lines are ignored, so files with
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java
index 50c0d753bcd..e17704135ce 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/Metadata.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/Metadata.java
@@ -17,7 +17,7 @@
* 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.api.batch.fs.internal;
+package org.sonar.api.impl.fs;
import java.util.Arrays;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java
index 41287d42011..30a813d5a60 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/PathPattern.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/PathPattern.java
@@ -17,7 +17,7 @@
* 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.api.batch.fs.internal;
+package org.sonar.api.impl.fs;
import java.nio.file.Path;
import javax.annotation.concurrent.ThreadSafe;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java
index adde73809f6..d956d061f91 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/SensorStrategy.java
@@ -17,7 +17,7 @@
* 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.api.batch.fs.internal;
+package org.sonar.api.impl.fs;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/TestInputFileBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java
index 6764b6180d5..e731e7ff7ab 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/TestInputFileBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/TestInputFileBuilder.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
@@ -31,8 +31,6 @@ import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.batch.fs.internal.Metadata;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
import org.sonar.api.utils.PathUtils;
/**
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/CharHandler.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java
index 737f6c29071..06218a6a9f2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/CharHandler.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/CharHandler.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
public abstract class CharHandler {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/FileHashComputer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java
index 46229a5c70b..eaa5672eef6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/FileHashComputer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/FileHashComputer.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/IntArrayList.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java
index 12674145399..b298b0524c5 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/IntArrayList.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/IntArrayList.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineCounter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java
index 7cac0f2b0a0..ba5093b29e8 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineCounter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineCounter.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
import java.nio.charset.Charset;
import org.sonar.api.CoreProperties;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineHashComputer.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java
index 5435499e505..8384258161c 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineHashComputer.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineHashComputer.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
import java.io.File;
import java.nio.ByteBuffer;
@@ -28,7 +28,7 @@ import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import org.apache.commons.codec.digest.DigestUtils;
-import org.sonar.scanner.fs.FileMetadata;
+import org.sonar.api.impl.fs.FileMetadata;
public class LineHashComputer extends CharHandler {
private final MessageDigest lineMd5Digest = DigestUtils.getMd5Digest();
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineOffsetCounter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java
index 74b7f4867ba..1b0ad31fed1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/LineOffsetCounter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/LineOffsetCounter.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
public class LineOffsetCounter extends CharHandler {
private long currentOriginalLineStartOffset = 0;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java
new file mode 100644
index 00000000000..9c9bce61dbc
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/charhandler/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.impl.fs.charhandler;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java
index 17dc1220665..10a797893e5 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.internal;
+package org.sonar.api.impl.fs;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbsolutePathPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java
index c55099a8884..c83cc6463a1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbsolutePathPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbsolutePathPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.io.File;
import java.nio.file.Path;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbstractFilePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java
index 4f6952611d7..1a964b49b6b 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AbstractFilePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AbstractFilePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.stream.StreamSupport;
import org.sonar.api.batch.fs.FileSystem.Index;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AndPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java
index 024964256ba..d2ea1f35f59 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/AndPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/AndPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/DefaultFilePredicates.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java
index bcda1ac7351..fe005c608e7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/DefaultFilePredicates.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicates.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.io.File;
import java.net.URI;
@@ -30,7 +30,7 @@ import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.impl.fs.PathPattern;
/**
* Factory of {@link FilePredicate}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FalsePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java
index e76bb84e6ae..d6c1d78a696 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FalsePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FalsePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.Collections;
import org.sonar.api.batch.fs.FilePredicate;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FileExtensionPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java
index 46f257f25a4..7775c567832 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FileExtensionPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.Locale;
import org.sonar.api.batch.fs.FileSystem;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FilenamePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java
index a99d9314c77..94fac58852f 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/FilenamePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/FilenamePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/LanguagePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java
index 5492e224558..e553625789a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/LanguagePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/LanguagePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/NotPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java
index 5bc68adfbe7..4841c558826 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/NotPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/NotPredicate.java
@@ -17,14 +17,12 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.Arrays;
import java.util.List;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.predicates.AbstractFilePredicate;
-import org.sonar.scanner.fs.predicates.OperatorPredicate;
/**
* @since 4.2
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OperatorPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java
index c4493091865..bf8e566e144 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OperatorPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OperatorPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.List;
import org.sonar.api.batch.fs.FilePredicate;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java
index 9b5216d5549..aaba4c890d6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicateAdapter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java
index ba46aff6847..5de4fee72b5 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OptimizedFilePredicateAdapter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OptimizedFilePredicateAdapter.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OrPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java
index 2690a1261d9..3f93903c4da 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/OrPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/OrPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/PathPatternPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java
index 032d820919b..1e276751134 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/PathPatternPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/PathPatternPredicate.java
@@ -17,11 +17,11 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.nio.file.Paths;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.impl.fs.PathPattern;
/**
* @since 4.2
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/RelativePathPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java
index d79221ea7f3..a1cb9f42090 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/RelativePathPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/RelativePathPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.util.Collections;
import javax.annotation.Nullable;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/StatusPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java
index fb88b965a07..bcac4e04c49 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/StatusPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/StatusPredicate.java
@@ -17,11 +17,10 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.predicates.AbstractFilePredicate;
/**
* @deprecated since 7.8
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TruePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java
index 562515ce06e..04d56ee387e 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TruePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TruePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem.Index;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TypePredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java
index 3cddc59ad17..f9d57058352 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/TypePredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/TypePredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/URIPredicate.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java
index 9e25267de05..60fea977b5d 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/predicates/URIPredicate.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/URIPredicate.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.net.URI;
import java.nio.file.Path;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java
index 4e5375fc17f..aa33a1e9028 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/charhandler/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/fs/predicates/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.scanner.fs.charhandler;
+package org.sonar.api.impl.fs.predicates;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/AbstractDefaultIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java
index 4b13e2016d1..8705bf2fda0 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/AbstractDefaultIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/AbstractDefaultIssue.java
@@ -17,7 +17,7 @@
* 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.issue;
+package org.sonar.api.impl.issue;
import java.nio.file.Path;
import java.util.ArrayList;
@@ -27,15 +27,15 @@ import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputComponent;
-import org.sonar.scanner.sensor.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.Issue.Flow;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
+import org.sonar.api.impl.fs.DefaultInputDir;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.sensor.DefaultStorable;
import org.sonar.api.utils.PathUtils;
-import org.sonar.scanner.fs.DefaultInputDir;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
import static java.util.Collections.unmodifiableList;
import static java.util.stream.Collectors.toList;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java
index 154dfc91c81..aebe8f90a61 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssue.java
@@ -17,7 +17,7 @@
* 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.issue;
+package org.sonar.api.impl.issue;
import javax.annotation.Nullable;
import org.sonar.api.batch.rule.Severity;
@@ -25,8 +25,8 @@ import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssue;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.api.rule.RuleKey;
-import org.sonar.scanner.fs.DefaultInputProject;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssueLocation.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java
index 33018bbcc8f..6b2329c81c2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultIssueLocation.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultIssueLocation.java
@@ -17,14 +17,14 @@
* 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.issue;
+package org.sonar.api.impl.issue;
import javax.annotation.Nullable;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.issue.IssueLocation;
import org.sonar.api.batch.sensor.issue.NewIssueLocation;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.lang.StringUtils.abbreviate;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultNoSonarFilter.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java
index 00d3ba518f1..3bef1e9e5ef 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultNoSonarFilter.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/DefaultNoSonarFilter.java
@@ -17,12 +17,12 @@
* 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.issue;
+package org.sonar.api.impl.issue;
import java.util.Set;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.issue.NoSonarFilter;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class DefaultNoSonarFilter extends NoSonarFilter {
public NoSonarFilter noSonarInFile(InputFile inputFile, Set<Integer> noSonarLines) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java
index 4af8d775684..8d4146ce55a 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/package-info.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/issue/package-info.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
-package org.sonar.api.batch.fs.internal;
+package org.sonar.api.impl.issue;
import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java
index ce5885836a2..318a4738291 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/ActiveRulesBuilder.java
@@ -17,13 +17,13 @@
* 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.rule;
-
-import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.api.rule.RuleKey;
+package org.sonar.api.impl.rule;
import java.util.LinkedHashMap;
import java.util.Map;
+import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.NewActiveRule;
+import org.sonar.api.rule.RuleKey;
/**
* Builds instances of {@link org.sonar.api.batch.rule.ActiveRules}.
@@ -36,10 +36,10 @@ public class ActiveRulesBuilder {
private final Map<RuleKey, NewActiveRule> map = new LinkedHashMap<>();
public ActiveRulesBuilder addRule(NewActiveRule newActiveRule) {
- if (map.containsKey(newActiveRule.ruleKey)) {
- throw new IllegalStateException(String.format("Rule '%s' is already activated", newActiveRule.ruleKey));
+ if (map.containsKey(newActiveRule.ruleKey())) {
+ throw new IllegalStateException(String.format("Rule '%s' is already activated", newActiveRule.ruleKey()));
}
- map.put(newActiveRule.ruleKey, newActiveRule);
+ map.put(newActiveRule.ruleKey(), newActiveRule);
return this;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRules.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java
index 77a278772cc..9add14cc484 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRules.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultActiveRules.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.impl.rule;
import java.util.ArrayList;
import java.util.Collection;
@@ -29,6 +29,8 @@ import java.util.stream.Collectors;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.DefaultActiveRule;
+import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
@Immutable
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRules.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java
index efcc7104b6e..c7c7b5ead44 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRules.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/DefaultRules.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.impl.rule;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,6 +27,8 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.concurrent.Immutable;
+import org.sonar.api.batch.rule.DefaultRule;
+import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rule;
import org.sonar.api.batch.rule.Rules;
import org.sonar.api.rule.RuleKey;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesBuilder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java
index 3d1ccb33db5..36c84bef34a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesBuilder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/rule/RulesBuilder.java
@@ -17,13 +17,13 @@
* 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.rule;
-
-import org.sonar.api.batch.rule.Rules;
-import org.sonar.api.rule.RuleKey;
+package org.sonar.api.impl.rule;
import java.util.HashMap;
import java.util.Map;
+import org.sonar.api.batch.rule.NewRule;
+import org.sonar.api.batch.rule.Rules;
+import org.sonar.api.rule.RuleKey;
/**
* For unit testing and internal use only.
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAdHocRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java
index 1dde73e2c5c..1513fa2f695 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAdHocRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAdHocRule.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAnalysisError.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java
index 3da46d831d7..5508461ce68 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultAnalysisError.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultAnalysisError.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextPointer;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCoverage.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java
index 5a2f04811b0..c4149ec2f63 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCoverage.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCoverage.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.Collections;
import java.util.SortedMap;
@@ -27,7 +27,7 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.sensor.coverage.CoverageType;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCpdTokens.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java
index d470ab7c6c1..9b789d22d14 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultCpdTokens.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultCpdTokens.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.ArrayList;
import java.util.List;
@@ -26,9 +26,9 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.cpd.NewCpdTokens;
import org.sonar.api.batch.sensor.cpd.internal.TokensLine;
import org.sonar.api.batch.sensor.internal.SensorStorage;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
import static java.util.Collections.unmodifiableList;
import static java.util.Objects.requireNonNull;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultExternalIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java
index 7141a3ec39d..ae17adbaca6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultExternalIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultExternalIssue.java
@@ -17,17 +17,17 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import javax.annotation.Nullable;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.NewExternalIssue;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.issue.AbstractDefaultIssue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.issue.AbstractDefaultIssue;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultHighlighting.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java
index 0f972804991..c7e133dfea7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultHighlighting.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultHighlighting.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.ArrayList;
import java.util.Collections;
@@ -28,7 +28,7 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkState;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultMeasure.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java
index 1ad7b83ce99..d2919aba182 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultMeasure.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultMeasure.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.Serializable;
import javax.annotation.Nullable;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/DefaultPostJobDescriptor.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java
index 1292e10612f..152c5719e0a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/DefaultPostJobDescriptor.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultPostJobDescriptor.java
@@ -17,7 +17,7 @@
* 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.postjob;
+package org.sonar.api.impl.sensor;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorDescriptor.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java
index 1bb74666aaf..5b60ac287e2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorDescriptor.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSensorDescriptor.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.Arrays;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSignificantCode.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java
index 04ff5f16e0b..6a373ac061c 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSignificantCode.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSignificantCode.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.SortedMap;
import java.util.TreeMap;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultStorable.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java
index 23b989ca09d..c4f6ca39f4a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultStorable.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultStorable.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import javax.annotation.Nullable;
import org.apache.commons.lang.builder.ToStringBuilder;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSymbolTable.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java
index ca8b162f6a4..73ec86450a5 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSymbolTable.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/DefaultSymbolTable.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.Collection;
import java.util.LinkedHashMap;
@@ -29,7 +29,7 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.symbol.NewSymbol;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.Objects.requireNonNull;
import static org.sonar.api.utils.Preconditions.checkArgument;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/InMemorySensorStorage.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java
index 472537df959..26f74db0341 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/InMemorySensorStorage.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/InMemorySensorStorage.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.ArrayList;
import java.util.Collection;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SensorContextTester.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java
index e3ffc324ede..6877a771175 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SensorContextTester.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SensorContextTester.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.File;
import java.io.Serializable;
@@ -61,21 +61,21 @@ import org.sonar.api.batch.sensor.rule.NewAdHocRule;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.ConfigurationBridge;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.MetadataLoader;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.ConfigurationBridge;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.issue.DefaultIssue;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
+import org.sonar.api.impl.context.MetadataLoader;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.measures.Metric;
import org.sonar.api.scanner.fs.InputProject;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.issue.DefaultIssue;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
import static java.util.Collections.unmodifiableMap;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SyntaxHighlightingRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java
index cded69e4bf5..35d4fbea48a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/SyntaxHighlightingRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/SyntaxHighlightingRule.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java
new file mode 100644
index 00000000000..b304d3197d8
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/sensor/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.impl.sensor;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultDebtRemediationFunctions.java
index 933aa366b2f..52bf1206057 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultDebtRemediationFunctions.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultDebtRemediationFunctions.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import javax.annotation.Nullable;
import org.sonar.api.server.debt.DebtRemediationFunction;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewParam.java
index ea2740210ce..6a026db8934 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewParam.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewParam.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import javax.annotation.Nullable;
import org.apache.commons.lang.StringUtils;
@@ -26,7 +26,7 @@ import org.sonar.api.server.rule.RulesDefinition;
import static org.apache.commons.lang.StringUtils.defaultIfEmpty;
-public class DefaultNewParam implements RulesDefinition.NewParam {
+public class DefaultNewParam extends RulesDefinition.NewParam {
private final String key;
private String name;
private String description;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java
index 3607e601340..9fe35843b8c 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRepository.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRepository.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import java.util.Collection;
import java.util.HashMap;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRule.java
index 3496d2d1035..465b8f97bc2 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultNewRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultNewRule.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import java.io.IOException;
import java.net.URL;
@@ -46,7 +46,7 @@ import static org.apache.commons.lang.StringUtils.trimToNull;
import static org.sonar.api.utils.Preconditions.checkArgument;
import static org.sonar.api.utils.Preconditions.checkState;
-class DefaultNewRule implements RulesDefinition.NewRule {
+class DefaultNewRule extends RulesDefinition.NewRule {
private final String pluginKey;
private final String repoKey;
private final String key;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultParam.java
index 3e18fd740bd..ea414450fdf 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultParam.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultParam.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRepository.java
index 5723aa996bc..8d56b973499 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRepository.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRepository.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRule.java
index 84651101225..d56201d6635 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/DefaultRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/DefaultRule.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java
index 69a876dabaa..7d47fc25258 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/rule/RuleDefinitionContext.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/RuleDefinitionContext.java
@@ -17,7 +17,7 @@
* 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.server.rule;
+package org.sonar.api.impl.server;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,7 +32,7 @@ import static java.util.Collections.emptyList;
import static java.util.Collections.unmodifiableList;
import static org.sonar.api.utils.Preconditions.checkState;
-public class RuleDefinitionContext implements RulesDefinition.Context {
+public class RuleDefinitionContext extends RulesDefinition.Context {
private final Map<String, RulesDefinition.Repository> repositoriesByKey = new HashMap<>();
private String currentPluginKey;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/package-info.java
new file mode 100644
index 00000000000..42efaa610b6
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/server/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.impl.server;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2.java
index 35334080778..ab25411b6b2 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import java.util.Random;
import java.util.concurrent.atomic.AtomicLong;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/DefaultTempFolder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/DefaultTempFolder.java
index bedee39b7d0..369058f7b40 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/DefaultTempFolder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/DefaultTempFolder.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import java.nio.file.FileVisitResult;
import java.nio.file.SimpleFileVisitor;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/JUnitTempFolder.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/JUnitTempFolder.java
index 5c323f23f7d..a52da93ca7c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/JUnitTempFolder.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/JUnitTempFolder.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import org.apache.commons.lang.StringUtils;
import org.junit.rules.ExternalResource;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/ScannerUtils.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/ScannerUtils.java
index d22f0ea19eb..f23bfbac928 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/util/ScannerUtils.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/ScannerUtils.java
@@ -17,11 +17,11 @@
* 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.util;
+package org.sonar.api.impl.utils;
-import com.google.common.base.Strings;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
import javax.annotation.Nullable;
import org.apache.commons.lang.StringUtils;
@@ -32,6 +32,7 @@ public class ScannerUtils {
/**
* Clean provided string to remove chars that are not valid as file name.
+ *
* @param projectKey e.g. my:file
*/
public static String cleanKeyForFilename(String projectKey) {
@@ -41,7 +42,7 @@ public class ScannerUtils {
public static String encodeForUrl(@Nullable String url) {
try {
- return URLEncoder.encode(Strings.nullToEmpty(url), "UTF-8");
+ return URLEncoder.encode(url == null ? "" : url, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException("Encoding not supported", e);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TestSystem2.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/TestSystem2.java
index 37d2ed5d719..b1005d5e186 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/TestSystem2.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/TestSystem2.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import java.util.TimeZone;
import org.sonar.api.utils.System2;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/WorkDuration.java
index fc4de0037bc..20349ba155c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/internal/WorkDuration.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/WorkDuration.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import java.io.Serializable;
import javax.annotation.Nullable;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/package-info.java
new file mode 100644
index 00000000000..335c370e59a
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/utils/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.impl.utils;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/PartImpl.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/PartImpl.java
index 0aca8b452d5..ed161265484 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/PartImpl.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/PartImpl.java
@@ -17,7 +17,7 @@
* 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.api.server.ws.internal;
+package org.sonar.api.impl.ws;
import java.io.InputStream;
import org.sonar.api.server.ws.Request;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/SimpleGetRequest.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/SimpleGetRequest.java
index 757f8ea932c..a1135669d53 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/SimpleGetRequest.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/SimpleGetRequest.java
@@ -17,7 +17,7 @@
* 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.api.server.ws.internal;
+package org.sonar.api.impl.ws;
import java.io.InputStream;
import java.util.Arrays;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/ValidatingRequest.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/ValidatingRequest.java
index 5a9ee977497..6e7d90b6a06 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/ValidatingRequest.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/ValidatingRequest.java
@@ -17,7 +17,7 @@
* 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.api.server.ws.internal;
+package org.sonar.api.impl.ws;
import java.io.InputStream;
import java.util.Arrays;
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/package-info.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/package-info.java
new file mode 100644
index 00000000000..306c7a7c165
--- /dev/null
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/impl/ws/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.api.impl.ws;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java
index a22d884e160..922d767dfac 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MapSettingsTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MapSettingsTest.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.impl.config;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
@@ -40,6 +40,7 @@ import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.Settings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.DateUtils;
import static java.util.Collections.singletonList;
@@ -81,7 +82,7 @@ public class MapSettingsTest {
@Test
public void set_throws_NPE_if_key_is_null() {
- MapSettings underTest = new MapSettings();
+ org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
expectKeyNullNPE();
@@ -90,7 +91,7 @@ public class MapSettingsTest {
@Test
public void set_throws_NPE_if_value_is_null() {
- MapSettings underTest = new MapSettings();
+ org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
expectedException.expect(NullPointerException.class);
expectedException.expectMessage("value can't be null");
@@ -100,7 +101,7 @@ public class MapSettingsTest {
@Test
public void set_accepts_empty_value_and_trims_it() {
- MapSettings underTest = new MapSettings();
+ org.sonar.api.impl.config.MapSettings underTest = new org.sonar.api.impl.config.MapSettings();
Random random = new Random();
String key = randomAlphanumeric(3);
@@ -111,14 +112,14 @@ public class MapSettingsTest {
@Test
public void default_values_should_be_loaded_from_definitions() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getDefaultValue("hello")).isEqualTo("world");
}
@Test
@UseDataProvider("setPropertyCalls")
public void all_setProperty_methods_throws_NPE_if_key_is_null(BiConsumer<Settings, String> setPropertyCaller) {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
expectKeyNullNPE();
@@ -129,7 +130,7 @@ public class MapSettingsTest {
public void set_property_string_throws_NPE_if_key_is_null() {
String key = randomAlphanumeric(3);
- Settings underTest = new MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
+ Settings underTest = new org.sonar.api.impl.config.MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
expectKeyNullNPE();
@@ -144,7 +145,7 @@ public class MapSettingsTest {
@Test
@UseDataProvider("setPropertyCalls")
public void all_set_property_methods_trims_key(BiConsumer<Settings, String> setPropertyCaller) {
- Settings underTest = new MapSettings();
+ Settings underTest = new org.sonar.api.impl.config.MapSettings();
Random random = new Random();
String blankBefore = blank(random);
@@ -160,7 +161,7 @@ public class MapSettingsTest {
public void set_property_string_array_trims_key() {
String key = randomAlphanumeric(3);
- Settings underTest = new MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
+ Settings underTest = new org.sonar.api.impl.config.MapSettings(new PropertyDefinitions(singletonList(PropertyDefinition.builder(key).multiValues(true).build())));
Random random = new Random();
String blankBefore = blank(random);
@@ -193,7 +194,7 @@ public class MapSettingsTest {
@Test
public void setProperty_methods_trims_value() {
- Settings underTest = new MapSettings();
+ Settings underTest = new org.sonar.api.impl.config.MapSettings();
Random random = new Random();
String blankBefore = blank(random);
@@ -208,7 +209,7 @@ public class MapSettingsTest {
@Test
public void set_property_int() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", 123);
assertThat(settings.getInt("foo")).isEqualTo(123);
assertThat(settings.getString("foo")).isEqualTo("123");
@@ -217,7 +218,7 @@ public class MapSettingsTest {
@Test
public void default_number_values_are_zero() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
assertThat(settings.getInt("foo")).isEqualTo(0);
assertThat(settings.getLong("foo")).isEqualTo(0L);
}
@@ -226,34 +227,34 @@ public class MapSettingsTest {
public void getInt_value_must_be_valid() {
thrown.expect(NumberFormatException.class);
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "not a number");
settings.getInt("foo");
}
@Test
public void all_values_should_be_trimmed_set_property() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", " FOO ");
assertThat(settings.getString("foo")).isEqualTo("FOO");
}
@Test
public void test_get_default_value() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getDefaultValue("unknown")).isNull();
}
@Test
public void test_get_string() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("hello", "Russia");
assertThat(settings.getString("hello")).isEqualTo("Russia");
}
@Test
public void setProperty_date() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
Date date = DateUtils.parseDateTime("2010-05-18T15:50:45+0100");
settings.setProperty("aDate", date);
settings.setProperty("aDateTime", date, true);
@@ -264,7 +265,7 @@ public class MapSettingsTest {
@Test
public void test_get_date() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getDate("unknown")).isNull();
assertThat(settings.getDate("date").getDate()).isEqualTo(18);
assertThat(settings.getDate("date").getMonth()).isEqualTo(4);
@@ -272,13 +273,13 @@ public class MapSettingsTest {
@Test
public void test_get_date_not_found() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getDate("unknown")).isNull();
}
@Test
public void test_get_datetime() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getDateTime("unknown")).isNull();
assertThat(settings.getDateTime("datetime").getDate()).isEqualTo(18);
assertThat(settings.getDateTime("datetime").getMonth()).isEqualTo(4);
@@ -287,7 +288,7 @@ public class MapSettingsTest {
@Test
public void test_get_double() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("from_double", 3.14159);
settings.setProperty("from_string", "3.14159");
assertThat(settings.getDouble("from_double")).isEqualTo(3.14159, Offset.offset(0.00001));
@@ -297,7 +298,7 @@ public class MapSettingsTest {
@Test
public void test_get_float() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("from_float", 3.14159f);
settings.setProperty("from_string", "3.14159");
assertThat(settings.getDouble("from_float")).isEqualTo(3.14159f, Offset.offset(0.00001));
@@ -307,7 +308,7 @@ public class MapSettingsTest {
@Test
public void test_get_bad_float() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "bar");
thrown.expect(IllegalStateException.class);
@@ -317,7 +318,7 @@ public class MapSettingsTest {
@Test
public void test_get_bad_double() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "bar");
thrown.expect(IllegalStateException.class);
@@ -327,28 +328,28 @@ public class MapSettingsTest {
@Test
public void testSetNullFloat() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", (Float) null);
assertThat(settings.getFloat("foo")).isNull();
}
@Test
public void testSetNullDouble() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", (Double) null);
assertThat(settings.getDouble("foo")).isNull();
}
@Test
public void getStringArray() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
String[] array = settings.getStringArray("array");
assertThat(array).isEqualTo(new String[] {"one", "two", "three"});
}
@Test
public void setStringArray() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A", "B"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A", "B"});
@@ -356,7 +357,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayTrimValues() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("multi_values", new String[] {" A ", " B "});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A", "B"});
@@ -364,7 +365,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayEscapeCommas() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "C,D"});
@@ -372,7 +373,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayWithEmptyValues() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", "", "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "", "C,D"});
@@ -380,7 +381,7 @@ public class MapSettingsTest {
@Test
public void setStringArrayWithNullValues() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("multi_values", new String[] {"A,B", null, "C,D"});
String[] array = settings.getStringArray("multi_values");
assertThat(array).isEqualTo(new String[] {"A,B", "", "C,D"});
@@ -388,20 +389,20 @@ public class MapSettingsTest {
@Test(expected = IllegalStateException.class)
public void shouldFailToSetArrayValueOnSingleValueProperty() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("array", new String[] {"A", "B", "C"});
}
@Test
public void getStringArray_no_value() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
String[] array = settings.getStringArray("array");
assertThat(array).isEmpty();
}
@Test
public void shouldTrimArray() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", " one, two, three ");
String[] array = settings.getStringArray("foo");
assertThat(array).isEqualTo(new String[] {"one", "two", "three"});
@@ -409,7 +410,7 @@ public class MapSettingsTest {
@Test
public void shouldKeepEmptyValuesWhenSplitting() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", " one, , two");
String[] array = settings.getStringArray("foo");
assertThat(array).isEqualTo(new String[] {"one", "", "two"});
@@ -417,13 +418,13 @@ public class MapSettingsTest {
@Test
public void testDefaultValueOfGetString() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getString("hello")).isEqualTo("world");
}
@Test
public void set_property_boolean() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", true);
settings.setProperty("bar", false);
assertThat(settings.getBoolean("foo")).isTrue();
@@ -434,7 +435,7 @@ public class MapSettingsTest {
@Test
public void ignore_case_of_boolean_values() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "true");
settings.setProperty("bar", "TRUE");
// labels in UI
@@ -447,7 +448,7 @@ public class MapSettingsTest {
@Test
public void get_boolean() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getBoolean("boolean")).isTrue();
assertThat(settings.getBoolean("falseboolean")).isFalse();
assertThat(settings.getBoolean("unknown")).isFalse();
@@ -456,7 +457,7 @@ public class MapSettingsTest {
@Test
public void shouldCreateByIntrospectingComponent() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.getDefinitions().addComponent(MyComponent.class);
// property definition has been loaded, ie for default value
@@ -470,19 +471,19 @@ public class MapSettingsTest {
@Test
public void getStringLines_no_value() {
- assertThat(new MapSettings().getStringLines("foo")).hasSize(0);
+ assertThat(new org.sonar.api.impl.config.MapSettings().getStringLines("foo")).hasSize(0);
}
@Test
public void getStringLines_single_line() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "the line");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"the line"});
}
@Test
public void getStringLines_linux() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "one\ntwo");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two"});
@@ -492,7 +493,7 @@ public class MapSettingsTest {
@Test
public void getStringLines_windows() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "one\r\ntwo");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two"});
@@ -502,14 +503,14 @@ public class MapSettingsTest {
@Test
public void getStringLines_mix() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("foo", "one\r\ntwo\nthree");
assertThat(settings.getStringLines("foo")).isEqualTo(new String[] {"one", "two", "three"});
}
@Test
public void getKeysStartingWith() {
- Settings settings = new MapSettings();
+ Settings settings = new org.sonar.api.impl.config.MapSettings();
settings.setProperty("sonar.jdbc.url", "foo");
settings.setProperty("sonar.jdbc.username", "bar");
settings.setProperty("sonar.security", "admin");
@@ -521,7 +522,7 @@ public class MapSettingsTest {
@Test
public void should_fallback_deprecated_key_to_default_value_of_new_key() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
assertThat(settings.getString("newKeyWithDefaultValue")).isEqualTo("default_value");
assertThat(settings.getString("oldKeyWithDefaultValue")).isEqualTo("default_value");
@@ -529,7 +530,7 @@ public class MapSettingsTest {
@Test
public void should_fallback_deprecated_key_to_new_key() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("newKey", "value of newKey");
assertThat(settings.getString("newKey")).isEqualTo("value of newKey");
@@ -539,7 +540,7 @@ public class MapSettingsTest {
@Test
public void should_load_value_of_deprecated_key() {
// it's used for example when deprecated settings are set through command-line
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("oldKey", "value of oldKey");
assertThat(settings.getString("newKey")).isEqualTo("value of oldKey");
@@ -548,7 +549,7 @@ public class MapSettingsTest {
@Test
public void should_load_values_of_deprecated_key() {
- Settings settings = new MapSettings(definitions);
+ Settings settings = new org.sonar.api.impl.config.MapSettings(definitions);
settings.setProperty("oldKey", "a,b");
assertThat(settings.getStringArray("newKey")).containsOnly("a", "b");
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java
index bd50d94827e..63e3c442cfd 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/internal/MultivaluePropertyTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/config/MultivaluePropertyTest.java
@@ -17,7 +17,7 @@
* 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.api.config.internal;
+package org.sonar.api.impl.config;
import com.tngtech.java.junit.dataprovider.DataProvider;
import com.tngtech.java.junit.dataprovider.DataProviderRunner;
@@ -31,8 +31,8 @@ import org.junit.runner.RunWith;
import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
-import static org.sonar.api.config.internal.MultivalueProperty.trimFieldsAndRemoveEmptyFields;
+import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.impl.config.MultivalueProperty.trimFieldsAndRemoveEmptyFields;
@RunWith(DataProviderRunner.class)
public class MultivaluePropertyTest {
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java
index d62ebdcf762..e6106a3dfe3 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/internal/MetadataLoaderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/MetadataLoaderTest.java
@@ -17,7 +17,7 @@
* 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.api.internal;
+package org.sonar.api.impl.context;
import java.io.File;
import java.net.MalformedURLException;
@@ -25,6 +25,7 @@ import org.sonar.api.SonarEdition;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.context.MetadataLoader;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
@@ -41,21 +42,21 @@ public class MetadataLoaderTest {
@Test
public void load_version_from_file_in_classpath() {
- Version version = MetadataLoader.loadVersion(System2.INSTANCE);
+ Version version = org.sonar.api.impl.context.MetadataLoader.loadVersion(System2.INSTANCE);
assertThat(version).isNotNull();
assertThat(version.major()).isGreaterThanOrEqualTo(5);
}
@Test
public void load_edition_from_file_in_classpath() {
- SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE);
+ SonarEdition edition = org.sonar.api.impl.context.MetadataLoader.loadEdition(System2.INSTANCE);
assertThat(edition).isNotNull();
}
@Test
public void load_edition_defaults_to_community_if_file_not_found() throws MalformedURLException {
when(system.getResource(anyString())).thenReturn(new File("target/unknown").toURI().toURL());
- SonarEdition edition = MetadataLoader.loadEdition(System2.INSTANCE);
+ SonarEdition edition = org.sonar.api.impl.context.MetadataLoader.loadEdition(System2.INSTANCE);
assertThat(edition).isEqualTo(SonarEdition.COMMUNITY);
}
@@ -64,7 +65,7 @@ public class MetadataLoaderTest {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("Invalid edition found in '/sonar-edition.txt': 'TRASH'");
- MetadataLoader.parseEdition("trash");
+ org.sonar.api.impl.context.MetadataLoader.parseEdition("trash");
}
@Test
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java
index 8e439af9339..617dbafeda2 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/internal/SonarRuntimeImplTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/context/SonarRuntimeImplTest.java
@@ -17,7 +17,7 @@
* 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.api.internal;
+package org.sonar.api.impl.context;
import org.sonar.api.SonarEdition;
import org.assertj.core.api.Assertions;
@@ -27,6 +27,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.SonarProduct;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
import static org.assertj.core.api.Assertions.assertThat;
@@ -40,7 +41,7 @@ public class SonarRuntimeImplTest {
@Test
public void sonarQube_environment() {
- SonarRuntime apiVersion = SonarRuntimeImpl.forSonarQube(A_VERSION, SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
+ SonarRuntime apiVersion = org.sonar.api.impl.context.SonarRuntimeImpl.forSonarQube(A_VERSION, SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
assertThat(apiVersion.getApiVersion()).isEqualTo(A_VERSION);
assertThat(apiVersion.getProduct()).isEqualTo(SonarProduct.SONARQUBE);
assertThat(apiVersion.getSonarQubeSide()).isEqualTo(SonarQubeSide.SCANNER);
@@ -48,7 +49,7 @@ public class SonarRuntimeImplTest {
@Test
public void sonarLint_environment() {
- SonarRuntime apiVersion = SonarRuntimeImpl.forSonarLint(A_VERSION);
+ SonarRuntime apiVersion = org.sonar.api.impl.context.SonarRuntimeImpl.forSonarLint(A_VERSION);
assertThat(apiVersion.getApiVersion()).isEqualTo(A_VERSION);
assertThat(apiVersion.getProduct()).isEqualTo(SonarProduct.SONARLINT);
try {
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultFileSystemTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java
index 74a43db65f1..552387c70e6 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultFileSystemTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultFileSystemTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.nio.charset.Charset;
@@ -26,6 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputDirTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java
index 1679a8df405..263032b33f2 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputDirTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputDirTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import org.junit.Rule;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputFileTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java
index 6673977bfe4..7e22203de37 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputFileTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputFileTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -40,8 +40,6 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
-import org.sonar.api.batch.fs.internal.Metadata;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputModuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java
index 02570d36735..ac1a2c40417 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputModuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputModuleTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputProjectTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java
index 03248472335..bd3f4939af0 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/DefaultInputProjectTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/DefaultInputProjectTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/FileMetadataTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java
index c2665324ebc..0f3f1d5965e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/FileMetadataTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/FileMetadataTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.FileInputStream;
@@ -30,7 +30,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.batch.fs.internal.Metadata;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/MetadataTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java
index 861d0b82305..49ecf8984d6 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/MetadataTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/MetadataTest.java
@@ -17,16 +17,17 @@
* 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.api.batch.fs.internal;
+package org.sonar.api.impl.fs;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
+import org.sonar.api.impl.fs.Metadata;
public class MetadataTest {
@Test
public void testRoundtrip() {
- Metadata metadata = new Metadata(10, 20, "hash", new int[] {1, 3}, new int[] {2, 4}, 5);
+ org.sonar.api.impl.fs.Metadata metadata = new Metadata(10, 20, "hash", new int[] {1, 3}, new int[] {2, 4}, 5);
assertThat(metadata.isEmpty()).isFalse();
assertThat(metadata.lines()).isEqualTo(10);
assertThat(metadata.nonBlankLines()).isEqualTo(20);
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java
index 8296da8465e..c214469f081 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/PathPatternTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/PathPatternTest.java
@@ -17,7 +17,7 @@
* 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.api.batch.fs.internal;
+package org.sonar.api.impl.fs;
import java.io.IOException;
import java.nio.file.Path;
@@ -27,7 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.IndexedFile;
-import org.sonar.scanner.fs.DefaultIndexedFile;
+import org.sonar.api.impl.fs.DefaultIndexedFile;
+import org.sonar.api.impl.fs.PathPattern;
import static org.assertj.core.api.Assertions.assertThat;
@@ -43,7 +44,7 @@ public class PathPatternTest {
@Test
public void match_relative_path() {
- PathPattern pattern = PathPattern.create("**/*Foo.java");
+ org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("**/*Foo.java");
assertThat(pattern.toString()).isEqualTo("**/*Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.java", null);
@@ -59,7 +60,7 @@ public class PathPatternTest {
@Test
public void match_relative_path_and_insensitive_file_extension() throws Exception {
- PathPattern pattern = PathPattern.create("**/*Foo.java");
+ org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("**/*Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.JAVA", null);
assertThat(pattern.match(indexedFile.path(), Paths.get(indexedFile.relativePath()), false)).isTrue();
@@ -70,7 +71,7 @@ public class PathPatternTest {
@Test
public void match_absolute_path() throws Exception {
- PathPattern pattern = PathPattern.create("file:**/src/main/**Foo.java");
+ org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("file:**/src/main/**Foo.java");
assertThat(pattern.toString()).isEqualTo("file:**/src/main/**Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.java", null);
@@ -86,7 +87,7 @@ public class PathPatternTest {
@Test
public void match_absolute_path_and_insensitive_file_extension() throws Exception {
- PathPattern pattern = PathPattern.create("file:**/src/main/**Foo.java");
+ org.sonar.api.impl.fs.PathPattern pattern = org.sonar.api.impl.fs.PathPattern.create("file:**/src/main/**Foo.java");
assertThat(pattern.toString()).isEqualTo("file:**/src/main/**Foo.java");
IndexedFile indexedFile = new DefaultIndexedFile("ABCDE", baseDir, "src/main/java/org/MyFoo.JAVA", null);
@@ -98,7 +99,7 @@ public class PathPatternTest {
@Test
public void create_array_of_patterns() {
- PathPattern[] patterns = PathPattern.create(new String[] {
+ org.sonar.api.impl.fs.PathPattern[] patterns = PathPattern.create(new String[] {
"**/src/main/**Foo.java",
"file:**/src/main/**Bar.java"
});
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/TestInputFileBuilderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java
index 2d83007ff13..4fb37a2fd77 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/TestInputFileBuilderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/TestInputFileBuilderTest.java
@@ -17,7 +17,7 @@
* 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.fs;
+package org.sonar.api.impl.fs;
import java.io.File;
import java.io.IOException;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/charhandler/IntArrayListTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java
index 048a0309e5f..50c37d8a565 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/charhandler/IntArrayListTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/charhandler/IntArrayListTest.java
@@ -17,7 +17,7 @@
* 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.fs.charhandler;
+package org.sonar.api.impl.fs.charhandler;
import org.junit.Test;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/AndPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java
index d3ec2aa7b81..e02d5e433f4 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/AndPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/AndPredicateTest.java
@@ -17,15 +17,19 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
+import java.util.Arrays;
import org.junit.Test;
import org.sonar.api.batch.fs.FilePredicate;
-
-import java.util.Arrays;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.batch.fs.FileSystem;
+import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.impl.fs.PathPattern;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
public class AndPredicateTest {
@@ -34,24 +38,60 @@ public class AndPredicateTest {
PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo1/**"));
PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo2/**"));
PathPatternPredicate pathPatternPredicate3 = new PathPatternPredicate(PathPattern.create("foo3/**"));
- FilePredicate andPredicate = AndPredicate.create(Arrays.<FilePredicate>asList(pathPatternPredicate1,
- AndPredicate.create(Arrays.<FilePredicate>asList(pathPatternPredicate2, pathPatternPredicate3))));
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList(pathPatternPredicate1,
+ AndPredicate.create(Arrays.asList(pathPatternPredicate2, pathPatternPredicate3))));
assertThat(((AndPredicate) andPredicate).predicates()).containsExactly(pathPatternPredicate1, pathPatternPredicate2, pathPatternPredicate3);
}
@Test
+ public void applyPredicates() {
+ PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo/**"));
+ PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo/file1"));
+ PathPatternPredicate pathPatternPredicate3 = new PathPatternPredicate(PathPattern.create("**"));
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList(pathPatternPredicate1,
+ AndPredicate.create(Arrays.asList(pathPatternPredicate2, pathPatternPredicate3))));
+
+ InputFile file1 = TestInputFileBuilder.create("module", "foo/file1").build();
+ InputFile file2 = TestInputFileBuilder.create("module", "foo2/file1").build();
+ InputFile file3 = TestInputFileBuilder.create("module", "foo/file2").build();
+
+ assertThat(andPredicate.apply(file1)).isTrue();
+ assertThat(andPredicate.apply(file2)).isFalse();
+ assertThat(andPredicate.apply(file3)).isFalse();
+ }
+
+ @Test
+ public void filterIndex() {
+ PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo/**"));
+ PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo/file1"));
+ PathPatternPredicate pathPatternPredicate3 = new PathPatternPredicate(PathPattern.create("**"));
+
+ InputFile file1 = TestInputFileBuilder.create("module", "foo/file1").build();
+ InputFile file2 = TestInputFileBuilder.create("module", "foo2/file1").build();
+ InputFile file3 = TestInputFileBuilder.create("module", "foo/file2").build();
+
+ FileSystem.Index index = mock(FileSystem.Index.class);
+ when(index.inputFiles()).thenReturn(Arrays.asList(file1, file2, file3));
+
+ OptimizedFilePredicate andPredicate = (OptimizedFilePredicate) AndPredicate.create(Arrays.asList(pathPatternPredicate1,
+ AndPredicate.create(Arrays.asList(pathPatternPredicate2, pathPatternPredicate3))));
+
+ assertThat(andPredicate.get(index)).containsOnly(file1);
+ }
+
+ @Test
public void sortPredicatesByPriority() {
PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo1/**"));
PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo2/**"));
RelativePathPredicate relativePathPredicate = new RelativePathPredicate("foo");
- FilePredicate andPredicate = AndPredicate.create(Arrays.<FilePredicate>asList(pathPatternPredicate1,
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList(pathPatternPredicate1,
relativePathPredicate, pathPatternPredicate2));
assertThat(((AndPredicate) andPredicate).predicates()).containsExactly(relativePathPredicate, pathPatternPredicate1, pathPatternPredicate2);
}
@Test
public void simplifyAndExpressionsWhenEmpty() {
- FilePredicate andPredicate = AndPredicate.create(Arrays.<FilePredicate>asList());
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList());
assertThat(andPredicate).isEqualTo(TruePredicate.TRUE);
}
@@ -59,7 +99,7 @@ public class AndPredicateTest {
public void simplifyAndExpressionsWhenTrue() {
PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo1/**"));
PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo2/**"));
- FilePredicate andPredicate = AndPredicate.create(Arrays.<FilePredicate>asList(pathPatternPredicate1,
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList(pathPatternPredicate1,
TruePredicate.TRUE, pathPatternPredicate2));
assertThat(((AndPredicate) andPredicate).predicates()).containsExactly(pathPatternPredicate1, pathPatternPredicate2);
}
@@ -68,7 +108,7 @@ public class AndPredicateTest {
public void simplifyAndExpressionsWhenFalse() {
PathPatternPredicate pathPatternPredicate1 = new PathPatternPredicate(PathPattern.create("foo1/**"));
PathPatternPredicate pathPatternPredicate2 = new PathPatternPredicate(PathPattern.create("foo2/**"));
- FilePredicate andPredicate = AndPredicate.create(Arrays.<FilePredicate>asList(pathPatternPredicate1,
+ FilePredicate andPredicate = AndPredicate.create(Arrays.asList(pathPatternPredicate1,
FalsePredicate.FALSE, pathPatternPredicate2));
assertThat(andPredicate).isEqualTo(FalsePredicate.FALSE);
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/DefaultFilePredicatesTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java
index d0869f0d9a2..6d9cd4eafed 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/DefaultFilePredicatesTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/DefaultFilePredicatesTest.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.io.File;
import java.io.IOException;
@@ -33,7 +33,7 @@ import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FileExtensionPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java
index 8cae2f45ff0..0f60f6bc36d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FileExtensionPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FileExtensionPredicateTest.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.io.IOException;
import org.junit.Test;
@@ -26,7 +26,7 @@ import org.sonar.api.batch.fs.InputFile;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.sonar.scanner.fs.predicates.FileExtensionPredicate.getExtension;
+import static org.sonar.api.impl.fs.predicates.FileExtensionPredicate.getExtension;
public class FileExtensionPredicateTest {
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FilenamePredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java
index 71c7d1f47de..052ff51c015 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/FilenamePredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/FilenamePredicateTest.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import java.io.IOException;
import java.util.Collections;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/OrPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java
index 0804d1f3f7e..489d6366543 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/OrPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/OrPredicateTest.java
@@ -17,13 +17,13 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.junit.Test;
import org.sonar.api.batch.fs.FilePredicate;
import java.util.Arrays;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.impl.fs.PathPattern;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/RelativePathPredicateTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java
index b3c9c2dc9ff..e7e2efd9571 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/fs/predicates/RelativePathPredicateTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/fs/predicates/RelativePathPredicateTest.java
@@ -17,7 +17,7 @@
* 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.fs.predicates;
+package org.sonar.api.impl.fs.predicates;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java
index 3beb53fcc04..c55551687b9 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/DefaultRulesTest.java
@@ -17,13 +17,14 @@
* 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.rule;
-
-import org.sonar.api.rule.RuleKey;
-import org.junit.Test;
+package org.sonar.api.impl.rule;
import java.util.LinkedList;
import java.util.List;
+import org.junit.Test;
+import org.sonar.api.batch.rule.NewRule;
+import org.sonar.api.impl.rule.DefaultRules;
+import org.sonar.api.rule.RuleKey;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/RulesBuilderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java
index 1bb2375bc21..1330f906502 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/RulesBuilderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/rule/RulesBuilderTest.java
@@ -17,12 +17,14 @@
* 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.rule;
+package org.sonar.api.impl.rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rule;
import org.sonar.api.batch.rule.Rules;
+import org.sonar.api.impl.rule.RulesBuilder;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
@@ -47,7 +49,7 @@ public class RulesBuilderTest {
newSquid1.setName("Detect bug");
newSquid1.setDescription("Detect potential bug");
newSquid1.setInternalKey("foo=bar");
- newSquid1.setSeverity(Severity.CRITICAL);
+ newSquid1.setSeverity(org.sonar.api.rule.Severity.CRITICAL);
newSquid1.setStatus(RuleStatus.BETA);
newSquid1.addParam("min");
newSquid1.addParam("max").setDescription("Maximum");
@@ -69,7 +71,7 @@ public class RulesBuilderTest {
assertThat(squid1.description()).isEqualTo("Detect potential bug");
assertThat(squid1.internalKey()).isEqualTo("foo=bar");
assertThat(squid1.status()).isEqualTo(RuleStatus.BETA);
- assertThat(squid1.severity()).isEqualTo(Severity.CRITICAL);
+ assertThat(squid1.severity()).isEqualTo(org.sonar.api.rule.Severity.CRITICAL);
assertThat(squid1.params()).hasSize(2);
assertThat(squid1.param("min").key()).isEqualTo("min");
assertThat(squid1.param("min").description()).isNull();
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAdHocRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java
index 44a53e7dbf9..fd766c2739b 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAdHocRuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAdHocRuleTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Rule;
import org.junit.Test;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAnalysisErrorTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java
index afff924afdf..9f6be9d2d9f 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultAnalysisErrorTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultAnalysisErrorTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Before;
import org.junit.Rule;
@@ -27,8 +27,8 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextPointer;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultCpdTokensTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java
index 7a559792723..fd2c60de2d1 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultCpdTokensTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultCpdTokensTest.java
@@ -17,13 +17,13 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultExternalIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java
index 0081480f466..06ff4064f88 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultExternalIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultExternalIssueTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.IOException;
import org.junit.Before;
@@ -31,10 +31,10 @@ import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.issue.DefaultIssueLocation;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.issue.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultHighlightingTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java
index f70f92dd982..99beb98927d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultHighlightingTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultHighlightingTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.Collection;
import org.junit.Before;
@@ -27,9 +27,9 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.DefaultTextRange;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.DefaultTextRange;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueLocationTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java
index f869f6f17f0..540a0bbc0c9 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueLocationTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueLocationTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.apache.commons.lang.StringUtils;
import org.hamcrest.Description;
@@ -27,8 +27,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.issue.DefaultIssueLocation;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.issue.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.rules.ExpectedException.none;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java
index c6659dbc8a1..f88a099f391 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultIssueTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.File;
import java.io.IOException;
@@ -29,13 +29,13 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.rule.RuleKey;
-import org.sonar.scanner.fs.DefaultInputDir;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.issue.DefaultIssue;
-import org.sonar.scanner.issue.DefaultIssueLocation;
+import org.sonar.api.impl.fs.DefaultInputDir;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.issue.DefaultIssue;
+import org.sonar.api.impl.issue.DefaultIssueLocation;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultMeasureTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java
index 43de69f19d0..0c7ece260ce 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultMeasureTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultMeasureTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.IOException;
import org.junit.Rule;
@@ -27,9 +27,9 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.measures.CoreMetrics;
-import org.sonar.scanner.fs.AbstractProjectOrModule;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorDescriptorTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java
index a43272ba20d..b09b5ed9eab 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorDescriptorTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSensorDescriptorTest.java
@@ -17,11 +17,11 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSignificantCodeTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java
index 73a7f1c4299..f6d7f45281e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSignificantCodeTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSignificantCodeTest.java
@@ -17,14 +17,14 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSymbolTableTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java
index 3339e1d2bed..affd87bbef4 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSymbolTableTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/DefaultSymbolTableTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.util.Map;
import java.util.Set;
@@ -28,8 +28,7 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultSymbolTable;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/InMemorySensorStorageTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java
index 76e4874a41a..25b44f5cfbb 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/InMemorySensorStorageTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/InMemorySensorStorageTest.java
@@ -17,11 +17,12 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.sensor.InMemorySensorStorage;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.data.MapEntry.entry;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/SensorContextTesterTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java
index 24e93796c31..9684c7cdcb2 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/SensorContextTesterTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/sensor/SensorContextTesterTest.java
@@ -17,7 +17,7 @@
* 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.sensor;
+package org.sonar.api.impl.sensor;
import java.io.File;
import java.io.IOException;
@@ -29,6 +29,8 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
+import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.error.AnalysisError;
import org.sonar.api.batch.sensor.error.NewAnalysisError;
@@ -37,17 +39,15 @@ import org.sonar.api.batch.sensor.issue.NewExternalIssue;
import org.sonar.api.batch.sensor.issue.NewIssue;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rules.RuleType;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
-import org.sonar.scanner.rule.NewActiveRule;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/server/DefaultNewRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/server/DefaultNewRuleTest.java
new file mode 100644
index 00000000000..361785b49f7
--- /dev/null
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/server/DefaultNewRuleTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.api.impl.server;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.sonar.api.rule.RuleKey;
+import org.sonar.api.rule.RuleScope;
+import org.sonar.api.rule.RuleStatus;
+import org.sonar.api.server.rule.RulesDefinition;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class DefaultNewRuleTest {
+ @Rule
+ public ExpectedException exception = ExpectedException.none();
+
+ private DefaultNewRule rule = new DefaultNewRule("plugin", "repo", "key");
+
+ @Test
+ public void testSimpleSetGet() {
+ assertThat(rule.pluginKey()).isEqualTo("plugin");
+ assertThat(rule.repoKey()).isEqualTo("repo");
+ assertThat(rule.key()).isEqualTo("key");
+
+ rule.setScope(RuleScope.MAIN);
+ assertThat(rule.scope()).isEqualTo(RuleScope.MAIN);
+
+ rule.setName(" name ");
+ assertThat(rule.name()).isEqualTo("name");
+
+ rule.setHtmlDescription(" html ");
+ assertThat(rule.htmlDescription()).isEqualTo("html");
+
+ rule.setTemplate(true);
+ assertThat(rule.template()).isTrue();
+
+ rule.setActivatedByDefault(true);
+ assertThat(rule.activatedByDefault()).isTrue();
+
+ RulesDefinition.NewParam param1 = rule.createParam("param1");
+ assertThat(rule.param("param1")).isEqualTo(param1);
+ assertThat(rule.params()).containsOnly(param1);
+
+ rule.setTags("tag1", "tag2");
+ rule.addTags("tag3");
+ assertThat(rule.tags()).containsExactly("tag1", "tag2", "tag3");
+
+ rule.setEffortToFixDescription("effort");
+ assertThat(rule.gapDescription()).isEqualTo("effort");
+
+ rule.setGapDescription("gap");
+ assertThat(rule.gapDescription()).isEqualTo("gap");
+
+ rule.setInternalKey("internal");
+ assertThat(rule.internalKey()).isEqualTo("internal");
+
+ rule.addDeprecatedRuleKey("deprecatedrepo", "deprecatedkey");
+ assertThat(rule.deprecatedRuleKeys()).containsOnly(RuleKey.of("deprecatedrepo", "deprecatedkey"));
+ }
+
+ @Test
+ public void fail_if_severity_is_invalid() {
+ exception.expect(IllegalArgumentException.class);
+ rule.setSeverity("invalid");
+ }
+
+ @Test
+ public void fail_setting_markdown_if_html_is_set() {
+ exception.expect(IllegalStateException.class);
+ rule.setHtmlDescription("html");
+ rule.setMarkdownDescription("markdown");
+ }
+
+ @Test
+ public void fail_if_set_status_to_removed() {
+ exception.expect(IllegalArgumentException.class);
+ rule.setStatus(RuleStatus.REMOVED);
+ }
+}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2Test.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2Test.java
index 7155af854ca..30953e690d6 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/AlwaysIncreasingSystem2Test.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/AlwaysIncreasingSystem2Test.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import javax.annotation.Nullable;
import org.junit.Rule;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/DefaultTempFolderTest.java
index 6078b8cc829..b21d2077ebb 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/DefaultTempFolderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/DefaultTempFolderTest.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import java.io.File;
import org.apache.commons.io.FileUtils;
@@ -27,6 +27,7 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
+import org.sonar.server.util.TempFolderCleaner;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/JUnitTempFolderTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/JUnitTempFolderTest.java
index d4a377cd87b..5b765c344cc 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/JUnitTempFolderTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/JUnitTempFolderTest.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import org.junit.Test;
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/ScannerUtilsTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/ScannerUtilsTest.java
new file mode 100644
index 00000000000..0390d1faf90
--- /dev/null
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/ScannerUtilsTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.api.impl.utils;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class ScannerUtilsTest {
+ @Test
+ public void test_pluralize() {
+ assertThat(ScannerUtils.pluralize("string", 0)).isEqualTo("strings");
+ assertThat(ScannerUtils.pluralize("string", 1)).isEqualTo("string");
+ assertThat(ScannerUtils.pluralize("string", 2)).isEqualTo("strings");
+ }
+
+ @Test
+ public void cleanKeyForFilename() {
+ assertThat(ScannerUtils.cleanKeyForFilename("project 1")).isEqualTo("project1");
+ assertThat(ScannerUtils.cleanKeyForFilename("project:1")).isEqualTo("project_1");
+ }
+
+ @Test
+ public void describe() {
+ assertThat(ScannerUtils.describe(new Object())).isEqualTo("java.lang.Object");
+ assertThat(ScannerUtils.describe(new TestClass())).isEqualTo("overridden");
+ }
+
+ class TestClass {
+ @Override
+ public String toString() {
+ return "overridden";
+ }
+ }
+}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/WorkDurationTest.java
index 131f202a2db..3c1e2f971ff 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/internal/WorkDurationTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/utils/WorkDurationTest.java
@@ -17,7 +17,7 @@
* 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.api.utils.internal;
+package org.sonar.api.impl.utils;
import org.junit.Test;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/ws/SimpleGetRequestTest.java
index d8e1d908a9e..fb20cf22f30 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/internal/SimpleGetRequestTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/impl/ws/SimpleGetRequestTest.java
@@ -17,7 +17,7 @@
* 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.api.server.ws.internal;
+package org.sonar.api.impl.ws;
import java.io.InputStream;
import org.junit.Test;
@@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
public class SimpleGetRequestTest {
- SimpleGetRequest underTest = new SimpleGetRequest();
+ org.sonar.api.impl.ws.SimpleGetRequest underTest = new SimpleGetRequest();
@Test
public void method() {
diff --git a/sonar-scanner-engine/src/test/resources/org/sonar/scanner/fs/glyphicons-halflings-regular.woff b/sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff
index 2cc3e4852a5..2cc3e4852a5 100644
--- a/sonar-scanner-engine/src/test/resources/org/sonar/scanner/fs/glyphicons-halflings-regular.woff
+++ b/sonar-plugin-api-impl/src/test/resources/org/sonar/api/impl/fs/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/sonar-plugin-api/build.gradle b/sonar-plugin-api/build.gradle
index 109d187e80b..53160ac2c78 100644
--- a/sonar-plugin-api/build.gradle
+++ b/sonar-plugin-api/build.gradle
@@ -33,8 +33,7 @@ dependencies {
testCompile 'com.tngtech.java:junit-dataprovider'
testCompile 'org.assertj:assertj-core'
testCompile 'org.mockito:mockito-core'
- testCompile project(':sonar-scanner-engine')
- testCompile project(':server:sonar-server')
+ testCompile project(':sonar-plugin-api-impl')
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/LoadedActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/LoadedActiveRule.java
index cb50dade254..fa22fb46f13 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/LoadedActiveRule.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/LoadedActiveRule.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import java.util.Map;
import javax.annotation.CheckForNull;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewActiveRule.java
index 10867a5b29d..6f14a13a990 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewActiveRule.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewActiveRule.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import java.util.HashMap;
import java.util.Map;
@@ -56,6 +56,10 @@ public class NewActiveRule {
this.qProfileKey = builder.qProfileKey;
}
+ public RuleKey ruleKey() {
+ return this.ruleKey;
+ }
+
public static class Builder {
private RuleKey ruleKey;
private String name;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRule.java
index 179768d1c7b..edcf70f8ce6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRule.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRule.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import java.util.HashMap;
import java.util.Map;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRuleParam.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRuleParam.java
index 9fa482553c5..f06830d9245 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/NewRuleParam.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/NewRuleParam.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import javax.annotation.Nullable;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Configuration.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Configuration.java
index 2a1ee512bc0..3afb8c8608e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Configuration.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Configuration.java
@@ -22,7 +22,6 @@ package org.sonar.api.config;
import java.util.Optional;
import org.sonar.api.scanner.ScannerSide;
import org.sonar.api.ce.ComputeEngineSide;
-import org.sonar.api.config.internal.MapSettings;
import org.sonar.api.server.ServerSide;
import org.sonarsource.api.sonarlint.SonarLintSide;
@@ -65,7 +64,7 @@ import org.sonarsource.api.sonarlint.SonarLintSide;
* </pre>
*
* <p>
- * For testing, and only for testing, the in-memory implementation {@link MapSettings} can be used.
+ * For testing, and only for testing, the in-memory implementation MapSettings can be used.
* <pre>
* {@literal @}Test
* public void my_test() {
@@ -76,7 +75,6 @@ import org.sonarsource.api.sonarlint.SonarLintSide;
* }
* </pre>
*
- * @see MapSettings
* @see PropertyDefinition
* @since 6.5
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java
index 2eb4d07f57d..6f8452a8bd4 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java
@@ -324,7 +324,7 @@ public class Rule {
*/
public Rule setStatus(String status) {
if (!STATUS_LIST.contains(status)) {
- throw new SonarException("The status of a rule can only contain : " + String.join(", ", STATUS_LIST));
+ throw new IllegalStateException("The status of a rule can only contain : " + String.join(", ", STATUS_LIST));
}
this.status = status;
return this;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinition.java
index 6ad36f5998e..d249ac0bda8 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinition.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinition.java
@@ -347,7 +347,7 @@ public interface RulesDefinition {
/**
* Instantiated by core but not by plugins, except for their tests.
*/
- interface Context {
+ abstract class Context {
/*
* New builder for {@link org.sonar.api.server.rule.RulesDefinition.Repository}.
* <br>
@@ -355,7 +355,7 @@ public interface RulesDefinition {
* the FbContrib plugin contributes to the Findbugs plugin rules. In this case no need
* to execute {@link org.sonar.api.server.rule.RulesDefinition.NewRepository#setName(String)}
*/
- NewRepository createRepository(String key, String language);
+ public abstract NewRepository createRepository(String key, String language);
/**
* Creates a repository of rules from external rule engines.
@@ -363,34 +363,34 @@ public interface RulesDefinition {
*
* @since 7.2
*/
- NewRepository createExternalRepository(String engineId, String language);
+ public abstract NewRepository createExternalRepository(String engineId, String language);
/**
* @deprecated since 5.2. Simply use {@link #createRepository(String, String)}
*/
@Deprecated
- NewRepository extendRepository(String key, String language);
+ public abstract NewRepository extendRepository(String key, String language);
@CheckForNull
- Repository repository(String key);
+ public abstract Repository repository(String key);
- List<Repository> repositories();
+ public abstract List<Repository> repositories();
/**
* @deprecated returns empty list since 5.2. Concept of "extended repository" was misleading and not valuable. Simply declare
* repositories and use {@link #repositories()}. See http://jira.sonarsource.com/browse/SONAR-6709
*/
@Deprecated
- List<ExtendedRepository> extendedRepositories(String repositoryKey);
+ public abstract List<ExtendedRepository> extendedRepositories(String repositoryKey);
/**
* @deprecated returns empty list since 5.2. Concept of "extended repository" was misleading and not valuable. Simply declare
* repositories and use {@link #repositories()}. See http://jira.sonarsource.com/browse/SONAR-6709
*/
@Deprecated
- List<ExtendedRepository> extendedRepositories();
+ public abstract List<ExtendedRepository> extendedRepositories();
- void setCurrentPluginKey(@Nullable String pluginKey);
+ public abstract void setCurrentPluginKey(@Nullable String pluginKey);
}
interface NewExtendedRepository {
@@ -484,36 +484,36 @@ public interface RulesDefinition {
DebtRemediationFunction create(DebtRemediationFunction.Type type, @Nullable String gapMultiplier, @Nullable String baseEffort);
}
- interface NewRule {
+ abstract class NewRule {
- String key();
+ public abstract String key();
/**
* @since 7.1
*/
@CheckForNull
- RuleScope scope();
+ public abstract RuleScope scope();
/**
* @since 7.1
*/
- NewRule setScope(RuleScope scope);
+ public abstract NewRule setScope(RuleScope scope);
/**
* Required rule name
*/
- NewRule setName(String s);
+ public abstract NewRule setName(String s);
- NewRule setTemplate(boolean template);
+ public abstract NewRule setTemplate(boolean template);
/**
* Should this rule be enabled by default. For example in SonarLint standalone.
*
* @since 6.0
*/
- NewRule setActivatedByDefault(boolean activatedByDefault);
+ public abstract NewRule setActivatedByDefault(boolean activatedByDefault);
- NewRule setSeverity(String s);
+ public abstract NewRule setSeverity(String s);
/**
* The type as defined by the SonarQube Quality Model.
@@ -531,36 +531,36 @@ public interface RulesDefinition {
*
* @since 5.5
*/
- NewRule setType(RuleType t);
+ public abstract NewRule setType(RuleType t);
/**
* The optional description, in HTML format, has no max length. It's exclusive with markdown description
* (see {@link #setMarkdownDescription(String)})
*/
- NewRule setHtmlDescription(@Nullable String s);
+ public abstract NewRule setHtmlDescription(@Nullable String s);
/**
* Load description from a file available in classpath. Example : <code>setHtmlDescription(getClass().getResource("/myrepo/Rule1234.html")</code>
*/
- NewRule setHtmlDescription(@Nullable URL classpathUrl);
+ public abstract NewRule setHtmlDescription(@Nullable URL classpathUrl);
/**
* The optional description, in a restricted Markdown format, has no max length. It's exclusive with HTML description
* (see {@link #setHtmlDescription(String)})
*/
- NewRule setMarkdownDescription(@Nullable String s);
+ public abstract NewRule setMarkdownDescription(@Nullable String s);
/**
* Load description from a file available in classpath. Example : {@code setMarkdownDescription(getClass().getResource("/myrepo/Rule1234.md")}
*/
- NewRule setMarkdownDescription(@Nullable URL classpathUrl);
+ public abstract NewRule setMarkdownDescription(@Nullable URL classpathUrl);
/**
* Default value is {@link org.sonar.api.rule.RuleStatus#READY}. The value
* {@link org.sonar.api.rule.RuleStatus#REMOVED} is not accepted and raises an
* {@link java.lang.IllegalArgumentException}.
*/
- NewRule setStatus(RuleStatus status);
+ public abstract NewRule setStatus(RuleStatus status);
/**
* SQALE sub-characteristic. See http://www.sqale.org
@@ -570,23 +570,24 @@ public interface RulesDefinition {
* @deprecated in 5.5. SQALE Quality Model is replaced by SonarQube Quality Model. This method does nothing.
* See https://jira.sonarsource.com/browse/MMF-184
*/
- NewRule setDebtSubCharacteristic(@Nullable String s);
+ @Deprecated
+ public abstract NewRule setDebtSubCharacteristic(@Nullable String s);
/**
* Factory of {@link org.sonar.api.server.debt.DebtRemediationFunction}
*/
- DebtRemediationFunctions debtRemediationFunctions();
+ public abstract DebtRemediationFunctions debtRemediationFunctions();
/**
* @see #debtRemediationFunctions()
*/
- NewRule setDebtRemediationFunction(@Nullable DebtRemediationFunction fn);
+ public abstract NewRule setDebtRemediationFunction(@Nullable DebtRemediationFunction fn);
/**
* @deprecated since 5.5, replaced by {@link #setGapDescription(String)}
*/
@Deprecated
- NewRule setEffortToFixDescription(@Nullable String s);
+ public abstract NewRule setEffortToFixDescription(@Nullable String s);
/**
* For rules that use LINEAR or LINEAR_OFFSET remediation functions, the meaning
@@ -597,44 +598,44 @@ public interface RulesDefinition {
* remediation function gap multiplier/base effort would be something like
* "Effort to test one uncovered condition".
*/
- NewRule setGapDescription(@Nullable String s);
+ public abstract NewRule setGapDescription(@Nullable String s);
/**
* Create a parameter with given unique key. Max length of key is 128 characters.
*/
- NewParam createParam(String paramKey);
+ public abstract NewParam createParam(String paramKey);
@CheckForNull
- NewParam param(String paramKey);
+ public abstract NewParam param(String paramKey);
- Collection<NewParam> params();
+ public abstract Collection<NewParam> params();
/**
* @see RuleTagFormat
*/
- NewRule addTags(String... list);
+ public abstract NewRule addTags(String... list);
/**
* @see RuleTagFormat
*/
- NewRule setTags(String... list);
+ public abstract NewRule setTags(String... list);
/**
* @since 7.3
*/
- NewRule addOwaspTop10(OwaspTop10... standards);
+ public abstract NewRule addOwaspTop10(OwaspTop10... standards);
/**
* @since 7.3
*/
- NewRule addCwe(int... nums);
+ public abstract NewRule addCwe(int... nums);
/**
* Optional key that can be used by the rule engine. Not displayed
* in webapp. For example the Java Checkstyle plugin feeds this field
* with the internal path ("Checker/TreeWalker/AnnotationUseStyle").
*/
- NewRule setInternalKey(@Nullable String s);
+ public abstract NewRule setInternalKey(@Nullable String s);
/**
* Register a repository and key under which this rule used to be known
@@ -646,10 +647,7 @@ public interface RulesDefinition {
* @see Rule#deprecatedRuleKeys
* @since 7.1
*/
- NewRule addDeprecatedRuleKey(String repository, String key);
-
- @Override
- String toString();
+ public abstract NewRule addDeprecatedRuleKey(String repository, String key);
}
@Immutable
@@ -796,22 +794,22 @@ public interface RulesDefinition {
}
- interface NewParam {
- String key();
+ abstract class NewParam {
+ public abstract String key();
- NewParam setName(@Nullable String s);
+ public abstract NewParam setName(@Nullable String s);
- NewParam setType(RuleParamType t);
+ public abstract NewParam setType(RuleParamType t);
/**
* Plain-text description. Can be null. Max length is 4000 characters.
*/
- NewParam setDescription(@Nullable String s);
+ public abstract NewParam setDescription(@Nullable String s);
/**
* Empty default value will be converted to null. Max length is 4000 characters.
*/
- NewParam setDefaultValue(@Nullable String s);
+ public abstract NewParam setDefaultValue(@Nullable String s);
}
@Immutable
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/package-info.java
deleted file mode 100644
index 1dc6d3eda19..00000000000
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/internal/package-info.java
+++ /dev/null
@@ -1,23 +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.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.api.server.ws.internal;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java
index 1a70241d869..a67dd38eb84 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Preconditions.java
@@ -20,6 +20,10 @@
package org.sonar.api.utils;
public class Preconditions {
+ private Preconditions() {
+ // static only
+ }
+
public static void checkArgument(boolean condition, String message) {
if (!condition) {
throw new IllegalArgumentException(message);
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/PluginTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/PluginTest.java
index 53b84c86164..6a75a66d49a 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/PluginTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/PluginTest.java
@@ -21,9 +21,9 @@ package org.sonar.api;
import java.util.Arrays;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.PluginContextImpl;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.context.PluginContextImpl;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectBuilderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectBuilderTest.java
index 48f3746bd35..501b48945e8 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectBuilderTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectBuilderTest.java
@@ -23,7 +23,7 @@ import java.io.File;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.internal.ProjectBuilderContext;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.core.Is.is;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
index 5a728e95faa..b2ccc7a514a 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
@@ -21,10 +21,9 @@ package org.sonar.api.batch.rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.SonarException;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
-import org.sonar.scanner.rule.NewActiveRule;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/NewActiveRuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/NewActiveRuleTest.java
index a3a4e40393d..927c7934a44 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/NewActiveRuleTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/NewActiveRuleTest.java
@@ -17,7 +17,7 @@
* 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.rule;
+package org.sonar.api.batch.rule;
import com.google.common.collect.ImmutableMap;
import org.junit.Before;
@@ -41,7 +41,7 @@ public class NewActiveRuleTest {
NewActiveRule rule = builder
.setRuleKey(RuleKey.of("foo", "bar"))
.setName("name")
- .setSeverity(Severity.CRITICAL)
+ .setSeverity(org.sonar.api.rule.Severity.CRITICAL)
.setParam("key", "value")
.setCreatedAt(1_000L)
.setUpdatedAt(1_000L)
@@ -53,7 +53,7 @@ public class NewActiveRuleTest {
assertThat(rule.ruleKey).isEqualTo(RuleKey.of("foo", "bar"));
assertThat(rule.name).isEqualTo("name");
- assertThat(rule.severity).isEqualTo(Severity.CRITICAL);
+ assertThat(rule.severity).isEqualTo(org.sonar.api.rule.Severity.CRITICAL);
assertThat(rule.params).isEqualTo(ImmutableMap.of("key", "value"));
assertThat(rule.createdAt).isEqualTo(1_000L);
assertThat(rule.updatedAt).isEqualTo(1_000L);
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java
index 8de07ea19a0..a67127d5e2d 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/config/EmailSettingsTest.java
@@ -21,7 +21,7 @@ package org.sonar.api.config;
import org.apache.commons.lang.RandomStringUtils;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.platform.Server;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java
index 20427354f25..efe7b99c67b 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/issue/NoSonarFilterTest.java
@@ -22,9 +22,9 @@ package org.sonar.api.issue;
import java.util.Arrays;
import java.util.HashSet;
import org.junit.Test;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.issue.DefaultNoSonarFilter;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.issue.DefaultNoSonarFilter;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
index f52f32080b4..f11be94b590 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
@@ -19,12 +19,10 @@
*/
package org.sonar.api.rules;
-import org.junit.Assert;
-import org.junit.Test;
-import org.sonar.api.utils.SonarException;
-
import java.util.Arrays;
import java.util.List;
+import org.junit.Assert;
+import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
@@ -81,7 +79,7 @@ public class RuleTest {
assertThat(rule.getSeverity()).isEqualTo(RulePriority.MAJOR);
}
- @Test(expected = SonarException.class)
+ @Test(expected = IllegalStateException.class)
public void should_not_authorize_unkown_status() {
Rule.create().setStatus("Unknown");
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java
index 91499a18c77..0889a04aaf2 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/scan/filesystem/FileExclusionsTest.java
@@ -21,7 +21,7 @@ package org.sonar.api.scan.filesystem;
import org.junit.Test;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java
index bf7678ab757..f841e1a6afd 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionAnnotationLoaderTest.java
@@ -25,7 +25,7 @@ import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
import org.sonar.api.server.rule.RulesDefinition.NewRule;
import org.sonar.check.Priority;
-import org.sonar.server.rule.RuleDefinitionContext;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java
index d7c0ab4e3d8..65a523e0179 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionI18nLoaderTest.java
@@ -21,7 +21,7 @@ package org.sonar.api.server.rule;
import org.junit.Test;
import org.sonar.api.i18n.RuleI18n;
-import org.sonar.server.rule.RuleDefinitionContext;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java
index 50eea7cf408..27fd0a673ce 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionTest.java
@@ -41,7 +41,7 @@ import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.debt.DebtRemediationFunction;
import org.sonar.api.utils.log.LogTester;
-import org.sonar.server.rule.RuleDefinitionContext;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java
index 3e180e3abca..4103c498b08 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/RulesDefinitionXmlLoaderTest.java
@@ -30,7 +30,7 @@ import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.server.rule.RuleDefinitionContext;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonar.api.utils.ExceptionCauseMatcher.hasType;
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
index e887feea018..ed0622fb956 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/ws/RequestTest.java
@@ -41,8 +41,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.rule.RuleStatus;
-import org.sonar.api.server.ws.internal.PartImpl;
-import org.sonar.api.server.ws.internal.ValidatingRequest;
+import org.sonar.api.impl.ws.PartImpl;
+import org.sonar.api.impl.ws.ValidatingRequest;
import org.sonar.api.utils.DateUtils;
import static com.google.common.base.Strings.repeat;
diff --git a/sonar-scanner-engine/build.gradle b/sonar-scanner-engine/build.gradle
index 68880e4ae0a..65821d1555a 100644
--- a/sonar-scanner-engine/build.gradle
+++ b/sonar-scanner-engine/build.gradle
@@ -30,6 +30,7 @@ dependencies {
compile project(':sonar-scanner-protocol')
compile project(':sonar-ws')
compile project(':sonar-duplications')
+ compile project(':sonar-plugin-api-impl')
runtime project(path: ':sonar-plugin-api', configuration: 'shadow')
compileOnly project(path: ':sonar-plugin-api')
@@ -44,7 +45,6 @@ dependencies {
testCompile 'org.mockito:mockito-core'
testCompile project(':plugins:sonar-xoo-plugin')
testCompile project(':sonar-plugin-api').sourceSets.test.output
- testCompile project(':server:sonar-server')
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/DefaultFileLinesContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/DefaultFileLinesContext.java
index be5b715891f..e0481cfb52d 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/DefaultFileLinesContext.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/DefaultFileLinesContext.java
@@ -28,7 +28,7 @@ import java.util.Map.Entry;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.measure.MetricFinder;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.scanner.sensor.DefaultMeasure;
+import org.sonar.api.impl.sensor.DefaultMeasure;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.FileLinesContext;
import org.sonar.api.utils.KeyValueFormat;
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 dee0cc79aa7..8848449b2f3 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,9 +25,9 @@ import java.nio.file.Path;
import org.picocontainer.ComponentLifecycle;
import org.picocontainer.PicoContainer;
import org.picocontainer.injectors.ProviderAdapter;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.utils.DefaultTempFolder;
import org.sonar.api.utils.TempFolder;
-import org.sonar.api.utils.internal.DefaultTempFolder;
-import org.sonar.scanner.fs.DefaultInputProject;
public class AnalysisTempFolderProvider extends ProviderAdapter implements ComponentLifecycle<TempFolder> {
static final String TMP_NAME = ".sonartmp";
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java
new file mode 100644
index 00000000000..2cf094ee807
--- /dev/null
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/DefaultScannerWsClient.java
@@ -0,0 +1,151 @@
+/*
+ * 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.bootstrap;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.CheckForNull;
+import org.apache.commons.lang.StringUtils;
+import org.sonar.api.CoreProperties;
+import org.sonar.api.utils.MessageException;
+import org.sonar.api.utils.log.Logger;
+import org.sonar.api.utils.log.Loggers;
+import org.sonar.api.utils.log.Profiler;
+import org.sonarqube.ws.client.HttpException;
+import org.sonarqube.ws.client.WsClient;
+import org.sonarqube.ws.client.WsConnector;
+import org.sonarqube.ws.client.WsRequest;
+import org.sonarqube.ws.client.WsResponse;
+
+import static java.lang.String.format;
+import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
+import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
+import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
+import static org.sonar.api.utils.Preconditions.checkState;
+
+public class DefaultScannerWsClient implements ScannerWsClient {
+ private static final int MAX_ERROR_MSG_LEN = 128;
+ private static final Logger LOG = Loggers.get(DefaultScannerWsClient.class);
+
+ private final WsClient target;
+ private final boolean hasCredentials;
+ private final GlobalAnalysisMode globalMode;
+
+ public DefaultScannerWsClient(WsClient target, boolean hasCredentials, GlobalAnalysisMode globalMode) {
+ this.target = target;
+ this.hasCredentials = hasCredentials;
+ this.globalMode = globalMode;
+ }
+
+ /**
+ * If an exception is not thrown, the response needs to be closed by either calling close() directly, or closing the
+ * body content's stream/reader.
+ *
+ * @throws IllegalStateException if the request could not be executed due to a connectivity problem or timeout. Because networks can
+ * fail during an exchange, it is possible that the remote server accepted the request before the failure
+ * @throws MessageException if there was a problem with authentication or if a error message was parsed from the response.
+ * @throws HttpException if the response code is not in range [200..300). Consider using {@link #createErrorMessage(HttpException)} to create more relevant messages for the users.
+ */
+ public WsResponse call(WsRequest request) {
+ checkState(!globalMode.isMediumTest(), "No WS call should be made in medium test mode");
+ Profiler profiler = Profiler.createIfDebug(LOG).start();
+ WsResponse response = target.wsConnector().call(request);
+ profiler.stopDebug(format("%s %d %s", request.getMethod(), response.code(), response.requestUrl()));
+ failIfUnauthorized(response);
+ return response;
+ }
+
+ public String baseUrl() {
+ return target.wsConnector().baseUrl();
+ }
+
+ WsConnector wsConnector() {
+ return target.wsConnector();
+ }
+
+ private void failIfUnauthorized(WsResponse response) {
+ int code = response.code();
+ if (code == HTTP_UNAUTHORIZED) {
+ response.close();
+ if (hasCredentials) {
+ // credentials are not valid
+ throw MessageException.of(format("Not authorized. Please check the properties %s and %s.",
+ CoreProperties.LOGIN, CoreProperties.PASSWORD));
+ }
+ // not authenticated - see https://jira.sonarsource.com/browse/SONAR-4048
+ throw MessageException.of(format("Not authorized. Analyzing this project requires to be authenticated. " +
+ "Please provide the values of the properties %s and %s.", CoreProperties.LOGIN, CoreProperties.PASSWORD));
+
+ }
+ if (code == HTTP_FORBIDDEN) {
+ throw MessageException.of("You're not authorized to run analysis. Please contact the project administrator.");
+ }
+ if (code == HTTP_BAD_REQUEST) {
+ String jsonMsg = tryParseAsJsonError(response.content());
+ if (jsonMsg != null) {
+ throw MessageException.of(jsonMsg);
+ }
+ }
+
+ // if failed, throws an HttpException
+ response.failIfNotSuccessful();
+ }
+
+ /**
+ * Tries to form a short and relevant error message from the exception, to be displayed in the console.
+ */
+ public static String createErrorMessage(HttpException exception) {
+ String json = tryParseAsJsonError(exception.content());
+ if (json != null) {
+ return json;
+ }
+
+ String msg = "HTTP code " + exception.code();
+ if (isHtml(exception.content())) {
+ return msg;
+ }
+
+ return msg + ": " + StringUtils.left(exception.content(), MAX_ERROR_MSG_LEN);
+ }
+
+ @CheckForNull
+ private static String tryParseAsJsonError(String responseContent) {
+ try {
+ JsonParser parser = new JsonParser();
+ JsonObject obj = parser.parse(responseContent).getAsJsonObject();
+ JsonArray errors = obj.getAsJsonArray("errors");
+ List<String> errorMessages = new ArrayList<>();
+ for (JsonElement e : errors) {
+ errorMessages.add(e.getAsJsonObject().get("msg").getAsString());
+ }
+ return String.join(", ", errorMessages);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ private static boolean isHtml(String responseContent) {
+ return StringUtils.stripToEmpty(responseContent).startsWith("<!DOCTYPE html>");
+ }
+}
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 cf39ff12cdf..7c93cfa4ce4 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
@@ -25,7 +25,7 @@ import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
-import org.sonar.api.internal.PluginContextImpl;
+import org.sonar.api.impl.context.PluginContextImpl;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java
index 87f69aad2a8..5903adcbf67 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/GlobalContainer.java
@@ -29,8 +29,8 @@ import org.sonar.api.SonarEdition;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarQubeVersion;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.internal.MetadataLoader;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.context.MetadataLoader;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.UriReader;
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 ad49d737425..33ff6234a22 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
@@ -31,9 +31,9 @@ import org.picocontainer.ComponentLifecycle;
import org.picocontainer.PicoContainer;
import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.CoreProperties;
+import org.sonar.api.impl.utils.DefaultTempFolder;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.TempFolder;
-import org.sonar.api.utils.internal.DefaultTempFolder;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
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 e6b12f2cf85..406e82b0671 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
@@ -52,11 +52,11 @@ public class PluginFiles {
private static final String PACK200 = "pack200";
private static final String UNCOMPRESSED_MD5_HEADER = "Sonar-UncompressedMD5";
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
private final File cacheDir;
private final File tempDir;
- public PluginFiles(ScannerWsClient wsClient, Configuration configuration) {
+ public PluginFiles(DefaultScannerWsClient wsClient, Configuration configuration) {
this.wsClient = wsClient;
File home = locateHomeDir(configuration);
this.cacheDir = mkdir(new File(home, "cache"), "user cache");
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 db02b02d440..d80a52a26e9 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
@@ -45,9 +45,9 @@ public class ScannerPluginInstaller implements PluginInstaller {
private static final String PLUGINS_WS_URL = "api/plugins/installed";
private final PluginFiles pluginFiles;
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
- public ScannerPluginInstaller(PluginFiles pluginFiles, ScannerWsClient wsClient) {
+ public ScannerPluginInstaller(PluginFiles pluginFiles, DefaultScannerWsClient wsClient) {
this.pluginFiles = pluginFiles;
this.wsClient = wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClient.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClient.java
index e04de9c05d9..3d13b6e3139 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClient.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClient.java
@@ -19,136 +19,13 @@
*/
package org.sonar.scanner.bootstrap;
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Joiner;
-import com.google.common.base.Preconditions;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import java.util.ArrayList;
-import java.util.List;
-import javax.annotation.CheckForNull;
-import org.apache.commons.lang.StringUtils;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.utils.MessageException;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
-import org.sonar.api.utils.log.Profiler;
-import org.sonarqube.ws.client.HttpException;
-import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.WsConnector;
import org.sonarqube.ws.client.WsRequest;
import org.sonarqube.ws.client.WsResponse;
-import static java.lang.String.format;
-import static java.net.HttpURLConnection.HTTP_BAD_REQUEST;
-import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
-import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
+public interface ScannerWsClient {
+ WsResponse call(WsRequest request);
-public class ScannerWsClient {
- private static final int MAX_ERROR_MSG_LEN = 128;
- private static final Logger LOG = Loggers.get(ScannerWsClient.class);
+ String baseUrl();
- private final WsClient target;
- private final boolean hasCredentials;
- private final GlobalAnalysisMode globalMode;
- public ScannerWsClient(WsClient target, boolean hasCredentials, GlobalAnalysisMode globalMode) {
- this.target = target;
- this.hasCredentials = hasCredentials;
- this.globalMode = globalMode;
- }
-
- /**
- * If an exception is not thrown, the response needs to be closed by either calling close() directly, or closing the
- * body content's stream/reader.
- *
- * @throws IllegalStateException if the request could not be executed due to a connectivity problem or timeout. Because networks can
- * fail during an exchange, it is possible that the remote server accepted the request before the failure
- * @throws MessageException if there was a problem with authentication or if a error message was parsed from the response.
- * @throws HttpException if the response code is not in range [200..300). Consider using {@link #createErrorMessage(HttpException)} to create more relevant messages for the users.
- */
- public WsResponse call(WsRequest request) {
- Preconditions.checkState(!globalMode.isMediumTest(), "No WS call should be made in medium test mode");
- Profiler profiler = Profiler.createIfDebug(LOG).start();
- WsResponse response = target.wsConnector().call(request);
- profiler.stopDebug(format("%s %d %s", request.getMethod(), response.code(), response.requestUrl()));
- failIfUnauthorized(response);
- return response;
- }
-
- public String baseUrl() {
- return target.wsConnector().baseUrl();
- }
-
- @VisibleForTesting
- WsConnector wsConnector() {
- return target.wsConnector();
- }
-
- private void failIfUnauthorized(WsResponse response) {
- int code = response.code();
- if (code == HTTP_UNAUTHORIZED) {
- response.close();
- if (hasCredentials) {
- // credentials are not valid
- throw MessageException.of(format("Not authorized. Please check the properties %s and %s.",
- CoreProperties.LOGIN, CoreProperties.PASSWORD));
- }
- // not authenticated - see https://jira.sonarsource.com/browse/SONAR-4048
- throw MessageException.of(format("Not authorized. Analyzing this project requires to be authenticated. " +
- "Please provide the values of the properties %s and %s.", CoreProperties.LOGIN, CoreProperties.PASSWORD));
-
- }
- if (code == HTTP_FORBIDDEN) {
- throw MessageException.of("You're not authorized to run analysis. Please contact the project administrator.");
- }
- if (code == HTTP_BAD_REQUEST) {
- String jsonMsg = tryParseAsJsonError(response.content());
- if (jsonMsg != null) {
- throw MessageException.of(jsonMsg);
- }
- }
-
- // if failed, throws an HttpException
- response.failIfNotSuccessful();
- }
-
- /**
- * Tries to form a short and relevant error message from the exception, to be displayed in the console.
- */
- public static String createErrorMessage(HttpException exception) {
- String json = tryParseAsJsonError(exception.content());
- if (json != null) {
- return json;
- }
-
- String msg = "HTTP code " + exception.code();
- if (isHtml(exception.content())) {
- return msg;
- }
-
- return msg + ": " + StringUtils.left(exception.content(), MAX_ERROR_MSG_LEN);
- }
-
- @CheckForNull
- private static String tryParseAsJsonError(String responseContent) {
- try {
- JsonParser parser = new JsonParser();
- JsonObject obj = parser.parse(responseContent).getAsJsonObject();
- JsonArray errors = obj.getAsJsonArray("errors");
- List<String> errorMessages = new ArrayList<>();
- for (JsonElement e : errors) {
- errorMessages.add(e.getAsJsonObject().get("msg").getAsString());
- }
- return Joiner.on(", ").join(errorMessages);
- } catch (Exception e) {
- return null;
- }
- }
-
- private static boolean isHtml(String responseContent) {
- return StringUtils.stripToEmpty(responseContent).startsWith("<!DOCTYPE html>");
- }
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
index 7f619482ab1..2161973c494 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerWsClientProvider.java
@@ -36,9 +36,9 @@ public class ScannerWsClientProvider extends ProviderAdapter {
static final String READ_TIMEOUT_SEC_PROPERTY = "sonar.ws.timeout";
static final int DEFAULT_READ_TIMEOUT_SEC = 60;
- private ScannerWsClient wsClient;
+ private DefaultScannerWsClient wsClient;
- public synchronized ScannerWsClient provide(final RawScannerProperties scannerProps,
+ public synchronized DefaultScannerWsClient provide(final RawScannerProperties scannerProps,
final EnvironmentInformation env, GlobalAnalysisMode globalMode, System2 system) {
if (wsClient == null) {
String url = defaultIfBlank(scannerProps.property("sonar.host.url"), CoreProperties.SERVER_BASE_URL_DEFAULT_VALUE);
@@ -60,7 +60,7 @@ public class ScannerWsClientProvider extends ProviderAdapter {
connectorBuilder.proxyCredentials(proxyUser, System.getProperty("http.proxyPassword"));
}
- wsClient = new ScannerWsClient(WsClientFactories.getDefault().newClient(connectorBuilder.build()), login != null, globalMode);
+ wsClient = new DefaultScannerWsClient(WsClientFactories.getDefault().newClient(connectorBuilder.build()), login != null, globalMode);
}
return wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java
index d57b46c7994..8c392cfed46 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/config/DefaultConfiguration.java
@@ -34,7 +34,7 @@ import org.sonar.api.utils.log.Loggers;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.lang.StringUtils.trim;
-import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
@Immutable
public abstract class DefaultConfiguration implements Configuration {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdExecutor.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdExecutor.java
index c5c1112317d..74684a0019b 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdExecutor.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdExecutor.java
@@ -42,8 +42,8 @@ import org.sonar.duplications.index.CloneGroup;
import org.sonar.duplications.index.ClonePart;
import org.sonar.duplications.index.PackedMemoryCloneIndex.ResourceBlocks;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputComponent;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputComponent;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Duplicate;
import org.sonar.scanner.protocol.output.ScannerReport.Duplication;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdSettings.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdSettings.java
index f40e5d107bd..82ee99a37ee 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdSettings.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/CpdSettings.java
@@ -23,7 +23,7 @@ import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
import org.sonar.api.config.Configuration;
import org.sonar.duplications.block.BlockChunker;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
public class CpdSettings {
private final Configuration settings;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensor.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensor.java
index a66df96bbed..69645b6c05d 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensor.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensor.java
@@ -43,7 +43,7 @@ import org.sonar.duplications.statement.Statement;
import org.sonar.duplications.statement.StatementChunker;
import org.sonar.duplications.token.TokenChunker;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
/**
* Special case for Java that use a dedicated block indexer.
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/index/SonarCpdBlockIndex.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/index/SonarCpdBlockIndex.java
index 645d9fab4b1..44b419f26ff 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/index/SonarCpdBlockIndex.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/cpd/index/SonarCpdBlockIndex.java
@@ -34,7 +34,7 @@ import org.sonar.duplications.index.CloneIndex;
import org.sonar.duplications.index.PackedMemoryCloneIndex;
import org.sonar.duplications.index.PackedMemoryCloneIndex.ResourceBlocks;
import org.sonar.scanner.cpd.CpdSettings;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.FileStructure;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.report.ReportPublisher;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultCoverageBlock.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultCoverageBlock.java
index 364544377ed..be9e3686cdf 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultCoverageBlock.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultCoverageBlock.java
@@ -23,7 +23,7 @@ import java.util.List;
import org.sonar.api.test.CoverageBlock;
import org.sonar.api.test.TestCase;
import org.sonar.api.test.Testable;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class DefaultCoverageBlock implements CoverageBlock {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestCase.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestCase.java
index 960a6cf03b5..74113b9ed68 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestCase.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestCase.java
@@ -32,7 +32,7 @@ import org.sonar.api.test.TestPlan;
import org.sonar.api.test.Testable;
import org.sonar.api.test.exception.CoverageAlreadyExistsException;
import org.sonar.api.test.exception.IllegalDurationException;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class DefaultTestCase implements MutableTestCase {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestable.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestable.java
index 20a0abfec50..5219368da91 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestable.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/DefaultTestable.java
@@ -25,7 +25,7 @@ import java.util.SortedSet;
import org.sonar.api.test.CoverageBlock;
import org.sonar.api.test.MutableTestable;
import org.sonar.api.test.TestCase;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class DefaultTestable implements MutableTestable {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestPlanBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestPlanBuilder.java
index 615ebd2f5cf..c4c52865907 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestPlanBuilder.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestPlanBuilder.java
@@ -27,7 +27,7 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Type;
import org.sonar.api.test.MutableTestPlan;
import org.sonar.scanner.deprecated.perspectives.PerspectiveBuilder;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class TestPlanBuilder extends PerspectiveBuilder<MutableTestPlan> {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestableBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestableBuilder.java
index 84f74e12ff5..4498f0b4d93 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestableBuilder.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/deprecated/test/TestableBuilder.java
@@ -25,7 +25,7 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Type;
import org.sonar.api.test.MutableTestable;
import org.sonar.scanner.deprecated.perspectives.PerspectiveBuilder;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
public class TestableBuilder extends PerspectiveBuilder<MutableTestable> {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/InputModuleHierarchy.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/InputModuleHierarchy.java
index 9048824f032..ef1124cbcc9 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/InputModuleHierarchy.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/fs/InputModuleHierarchy.java
@@ -22,6 +22,7 @@ package org.sonar.scanner.fs;
import java.util.Collection;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
+import org.sonar.api.impl.fs.DefaultInputModule;
@Immutable
public interface InputModuleHierarchy {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java
index 5485c348c87..5d107da2d76 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/DefaultFilterableIssue.java
@@ -28,9 +28,9 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.scan.issue.filter.FilterableIssue;
import org.sonar.scanner.ProjectInfo;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.DefaultTextPointer;
-import org.sonar.scanner.fs.DefaultTextRange;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultTextPointer;
+import org.sonar.api.impl.fs.DefaultTextRange;
import org.sonar.scanner.protocol.output.ScannerReport.Issue;
@ThreadSafe
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssueFilters.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssueFilters.java
index 87a4846a81a..3b887b024ef 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssueFilters.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssueFilters.java
@@ -24,7 +24,7 @@ import org.sonar.api.scan.issue.filter.FilterableIssue;
import org.sonar.api.scan.issue.filter.IssueFilter;
import org.sonar.api.scan.issue.filter.IssueFilterChain;
import org.sonar.scanner.ProjectInfo;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.protocol.output.ScannerReport;
/**
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
index ac02497f474..1bbf26f6bd1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/IssuePublisher.java
@@ -29,8 +29,8 @@ import org.sonar.api.batch.rule.ActiveRules;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.issue.Issue.Flow;
-import org.sonar.scanner.fs.DefaultInputComponent;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputComponent;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.Constants.Severity;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.IssueLocation;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java
index e518408f13b..3faefb38407 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilter.java
@@ -30,7 +30,7 @@ import org.sonar.api.scan.issue.filter.IssueFilter;
import org.sonar.api.scan.issue.filter.IssueFilterChain;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.issue.DefaultFilterableIssue;
import org.sonar.scanner.issue.ignore.pattern.IssueInclusionPatternInitializer;
import org.sonar.scanner.issue.ignore.pattern.IssuePattern;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java
index 8d825944b84..2a961ee65ad 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilter.java
@@ -28,7 +28,7 @@ import org.sonar.api.scan.issue.filter.IssueFilterChain;
import org.sonar.api.utils.WildcardPattern;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.issue.DefaultFilterableIssue;
public class IgnoreIssuesFilter implements IssueFilter {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java
index 4c3117835ca..ad9b431b5d3 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoader.java
@@ -26,8 +26,8 @@ import org.apache.commons.lang.StringUtils;
import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.charhandler.CharHandler;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.charhandler.CharHandler;
import org.sonar.scanner.issue.ignore.IgnoreIssuesFilter;
import org.sonar.scanner.issue.ignore.pattern.BlockIssuePattern;
import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScanner.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScanner.java
index 2ab767f7f3b..345db834790 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScanner.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScanner.java
@@ -27,8 +27,8 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.charhandler.CharHandler;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.charhandler.CharHandler;
import org.sonar.scanner.issue.ignore.pattern.LineRange;
import org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader.DoubleRegexpMatcher;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/AnalysisResult.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/AnalysisResult.java
index c75da29f0ed..0e851054801 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/AnalysisResult.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/mediumtest/AnalysisResult.java
@@ -37,8 +37,8 @@ import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
import org.sonar.api.scanner.fs.InputProject;
import org.sonar.core.util.CloseableIterator;
-import org.sonar.scanner.fs.DefaultInputComponent;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputComponent;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Component;
import org.sonar.scanner.protocol.output.ScannerReport.Symbol;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java
index dfe4993d31b..72837700b07 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/platform/DefaultServer.java
@@ -27,17 +27,17 @@ import org.sonar.api.SonarRuntime;
import org.sonar.api.config.Configuration;
import org.sonar.api.platform.Server;
import org.sonar.api.utils.DateUtils;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import static org.apache.commons.lang.StringUtils.trimToEmpty;
public class DefaultServer extends Server {
private final Configuration settings;
- private final ScannerWsClient client;
+ private final DefaultScannerWsClient client;
private final SonarRuntime runtime;
- public DefaultServer(Configuration settings, ScannerWsClient client, SonarRuntime runtime) {
+ public DefaultServer(Configuration settings, DefaultScannerWsClient client, SonarRuntime runtime) {
this.settings = settings;
this.client = client;
this.runtime = runtime;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobOptimizer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobOptimizer.java
index cd68e1694fe..ea9acd22d34 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobOptimizer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobOptimizer.java
@@ -22,6 +22,7 @@ package org.sonar.scanner.postjob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.config.Configuration;
+import org.sonar.api.impl.sensor.DefaultPostJobDescriptor;
public class PostJobOptimizer {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobWrapper.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobWrapper.java
index 60ea2882163..9df6f4cd892 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobWrapper.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/postjob/PostJobWrapper.java
@@ -21,6 +21,7 @@ package org.sonar.scanner.postjob;
import org.sonar.api.batch.postjob.PostJob;
import org.sonar.api.batch.postjob.PostJobContext;
+import org.sonar.api.impl.sensor.DefaultPostJobDescriptor;
public class PostJobWrapper {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ActiveRulesPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ActiveRulesPublisher.java
index f0f8991c073..174659fe796 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ActiveRulesPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ActiveRulesPublisher.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.report;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.scanner.rule.DefaultActiveRule;
+import org.sonar.api.batch.rule.DefaultActiveRule;
import org.sonar.scanner.protocol.Constants;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java
index 25780591679..5c6daad40b8 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/AnalysisContextReportPublisher.java
@@ -30,13 +30,13 @@ import java.util.Map;
import java.util.TreeSet;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
-import org.sonar.api.batch.fs.internal.AbstractProjectOrModule;
-import org.sonar.api.batch.fs.internal.DefaultInputModule;
-import org.sonar.api.batch.fs.internal.InputModuleHierarchy;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.api.utils.System2;
import org.sonar.core.platform.PluginInfo;
import org.sonar.scanner.bootstrap.GlobalServerSettings;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
+import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.ProjectServerSettings;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
index 00d8bed5abf..db7d22baf08 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ChangedLinesPublisher.java
@@ -29,14 +29,14 @@ import org.sonar.api.batch.scm.ScmProvider;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.log.Profiler;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
import org.sonar.scanner.scm.ScmConfiguration;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.api.impl.utils.ScannerUtils;
public class ChangedLinesPublisher implements ReportPublisherStep {
private static final Logger LOG = Loggers.get(ChangedLinesPublisher.class);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
index 597785f7632..b66fc8e8a93 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ComponentsPublisher.java
@@ -25,9 +25,9 @@ import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
-import org.sonar.scanner.fs.AbstractProjectOrModule;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType;
import org.sonar.scanner.protocol.output.ScannerReport.Component.FileStatus;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/MetadataPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/MetadataPublisher.java
index be1e838b810..f238735d3cb 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/MetadataPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/MetadataPublisher.java
@@ -32,8 +32,8 @@ import org.sonar.scanner.ProjectInfo;
import org.sonar.scanner.bootstrap.ScannerPlugin;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
import org.sonar.scanner.cpd.CpdSettings;
-import org.sonar.scanner.fs.AbstractProjectOrModule;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Metadata.BranchType;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java
index c2afdc1baf2..46078b34f84 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java
@@ -43,7 +43,7 @@ import org.sonar.api.utils.ZipUtils;
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.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.protocol.output.ScannerReportReader;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
@@ -72,7 +72,7 @@ public class ReportPublisher implements Startable {
private static final String ID = "id";
private static final String RESOLVED = "resolved";
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
private final AnalysisContextReportPublisher contextPublisher;
private final InputModuleHierarchy moduleHierarchy;
private final GlobalAnalysisMode analysisMode;
@@ -86,7 +86,7 @@ public class ReportPublisher implements Startable {
private ScannerReportWriter writer;
private ScannerReportReader reader;
- public ReportPublisher(ScanProperties properties, ScannerWsClient wsClient, Server server, AnalysisContextReportPublisher contextPublisher,
+ public ReportPublisher(ScanProperties properties, DefaultScannerWsClient wsClient, Server server, AnalysisContextReportPublisher contextPublisher,
InputModuleHierarchy moduleHierarchy, GlobalAnalysisMode analysisMode, TempFolder temp, ReportPublisherStep[] publishers, BranchConfiguration branchConfiguration) {
this.wsClient = wsClient;
this.server = server;
@@ -195,7 +195,7 @@ public class ReportPublisher implements Startable {
try {
response = wsClient.call(post).failIfNotSuccessful();
} catch (HttpException e) {
- throw MessageException.of(String.format("Failed to upload report - %s", ScannerWsClient.createErrorMessage(e)));
+ throw MessageException.of(String.format("Failed to upload report - %s", DefaultScannerWsClient.createErrorMessage(e)));
}
try (InputStream protobuf = response.contentStream()) {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/SourcePublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/SourcePublisher.java
index 765ac95da04..f18549f81df 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/SourcePublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/SourcePublisher.java
@@ -29,7 +29,7 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java
index f04f204bf2b..2aa1802f814 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/report/TestExecutionPublisher.java
@@ -24,16 +24,16 @@ import java.util.Objects;
import java.util.stream.StreamSupport;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.impl.fs.DefaultInputComponent;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.sensor.DefaultMeasure;
import org.sonar.api.test.MutableTestPlan;
import org.sonar.api.test.TestCase;
import org.sonar.api.test.TestCase.Status;
import org.sonar.scanner.deprecated.test.TestPlanBuilder;
-import org.sonar.scanner.fs.DefaultInputComponent;
-import org.sonar.scanner.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
-import org.sonar.scanner.sensor.DefaultMeasure;
import static org.sonar.api.measures.CoreMetrics.SKIPPED_TESTS;
import static org.sonar.api.measures.CoreMetrics.TESTS;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
index 64482589fec..7afc0c68587 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoader.java
@@ -25,16 +25,16 @@ import java.util.ArrayList;
import java.util.List;
import org.sonar.api.measures.Metric;
import org.sonar.api.measures.Metric.ValueType;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonar.scanner.protocol.GsonHelper;
import org.sonarqube.ws.client.GetRequest;
public class DefaultMetricsRepositoryLoader implements MetricsRepositoryLoader {
private static final String METRICS_SEARCH_URL = "/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=";
- private ScannerWsClient wsClient;
+ private DefaultScannerWsClient wsClient;
- public DefaultMetricsRepositoryLoader(ScannerWsClient wsClient) {
+ public DefaultMetricsRepositoryLoader(DefaultScannerWsClient wsClient) {
this.wsClient = wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java
index f5136784e43..3c7e7ad5484 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java
@@ -28,8 +28,8 @@ import java.util.Map;
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
+import org.sonar.api.impl.utils.ScannerUtils;
import org.sonarqube.ws.Batch.WsProjectResponse;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.HttpException;
@@ -38,9 +38,9 @@ import org.sonarqube.ws.client.WsResponse;
public class DefaultProjectRepositoriesLoader implements ProjectRepositoriesLoader {
private static final Logger LOG = LoggerFactory.getLogger(DefaultProjectRepositoriesLoader.class);
private static final String BATCH_PROJECT_URL = "/batch/project.protobuf";
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
- public DefaultProjectRepositoriesLoader(ScannerWsClient wsClient) {
+ public DefaultProjectRepositoriesLoader(DefaultScannerWsClient wsClient) {
this.wsClient = wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java
index 361eeab3e6d..7bf41b77a93 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java
@@ -28,7 +28,7 @@ import java.util.Map;
import java.util.function.BinaryOperator;
import java.util.function.Supplier;
import org.sonar.api.utils.MessageException;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonar.scanner.scan.ScanProperties;
import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
@@ -37,15 +37,15 @@ import org.sonarqube.ws.client.HttpException;
import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toMap;
-import static org.sonar.scanner.util.ScannerUtils.encodeForUrl;
+import static org.sonar.api.impl.utils.ScannerUtils.encodeForUrl;
public class DefaultQualityProfileLoader implements QualityProfileLoader {
private static final String WS_URL = "/api/qualityprofiles/search.protobuf";
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
private final ScanProperties properties;
- public DefaultQualityProfileLoader(ScanProperties properties, ScannerWsClient wsClient) {
+ public DefaultQualityProfileLoader(ScanProperties properties, DefaultScannerWsClient wsClient) {
this.properties = properties;
this.wsClient = wsClient;
}
@@ -69,10 +69,10 @@ public class DefaultQualityProfileLoader implements QualityProfileLoader {
if (tryLoadDefault) {
return loadDefault();
} else {
- throw MessageException.of(errorMsg.get() + ": " + ScannerWsClient.createErrorMessage(e));
+ throw MessageException.of(errorMsg.get() + ": " + DefaultScannerWsClient.createErrorMessage(e));
}
}
- throw new IllegalStateException(errorMsg.get() + ": " + ScannerWsClient.createErrorMessage(e));
+ throw new IllegalStateException(errorMsg.get() + ": " + DefaultScannerWsClient.createErrorMessage(e));
} catch (MessageException e) {
throw e;
} catch (Exception e) {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ProjectRepositories.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ProjectRepositories.java
index d1a7a30080c..ad817fd2a47 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ProjectRepositories.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/ProjectRepositories.java
@@ -21,7 +21,7 @@ package org.sonar.scanner.repository;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
@Immutable
public abstract class ProjectRepositories {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
index 797acbfcdb9..795a217b5a1 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/AbstractSettingsLoader.java
@@ -34,8 +34,8 @@ import org.apache.commons.lang.StringEscapeUtils;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.log.Profiler;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
+import org.sonar.api.impl.utils.ScannerUtils;
import org.sonarqube.ws.Settings;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.HttpException;
@@ -43,9 +43,9 @@ import org.sonarqube.ws.client.HttpException;
public abstract class AbstractSettingsLoader {
private static final Logger LOG = Loggers.get(AbstractSettingsLoader.class);
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
- public AbstractSettingsLoader(final ScannerWsClient wsClient) {
+ public AbstractSettingsLoader(final DefaultScannerWsClient wsClient) {
this.wsClient = wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoader.java
index cd616563730..8e3e34cf90a 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoader.java
@@ -20,11 +20,11 @@
package org.sonar.scanner.repository.settings;
import java.util.Map;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
public class DefaultGlobalSettingsLoader extends AbstractSettingsLoader implements GlobalSettingsLoader {
- public DefaultGlobalSettingsLoader(final ScannerWsClient wsClient) {
+ public DefaultGlobalSettingsLoader(final DefaultScannerWsClient wsClient) {
super(wsClient);
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoader.java
index 4274772cc8c..32d41243f93 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoader.java
@@ -21,12 +21,12 @@ package org.sonar.scanner.repository.settings;
import java.util.Map;
import org.sonar.scanner.bootstrap.ProcessedScannerProperties;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
public class DefaultProjectSettingsLoader extends AbstractSettingsLoader implements ProjectSettingsLoader {
private final ProcessedScannerProperties scannerProperties;
- public DefaultProjectSettingsLoader(final ScannerWsClient wsClient, final ProcessedScannerProperties scannerProperties) {
+ public DefaultProjectSettingsLoader(final DefaultScannerWsClient wsClient, final ProcessedScannerProperties scannerProperties) {
super(wsClient);
this.scannerProperties = scannerProperties;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesLoader.java
index e9bd8897dc8..0cf793876f4 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesLoader.java
@@ -20,6 +20,7 @@
package org.sonar.scanner.rule;
import java.util.List;
+import org.sonar.api.batch.rule.LoadedActiveRule;
public interface ActiveRulesLoader {
List<LoadedActiveRule> load(String qualityProfileKey);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesProvider.java
index f918a847f2b..dbf8ec440a2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ActiveRulesProvider.java
@@ -27,6 +27,9 @@ import java.util.Map;
import java.util.Set;
import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
+import org.sonar.api.batch.rule.LoadedActiveRule;
+import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
index 3f6cb897aaf..e7d2cb63f86 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultActiveRulesLoader.java
@@ -26,9 +26,11 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.IOUtils;
-import org.sonar.api.rule.RuleKey;
import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.api.impl.utils.ScannerUtils;
+import org.sonar.api.batch.rule.LoadedActiveRule;
+import org.sonar.api.rule.RuleKey;
+import org.sonar.api.utils.DateUtils;
import org.sonarqube.ws.Rules;
import org.sonarqube.ws.Rules.Active;
import org.sonarqube.ws.Rules.Active.Param;
@@ -37,9 +39,6 @@ import org.sonarqube.ws.Rules.Rule;
import org.sonarqube.ws.Rules.SearchResponse;
import org.sonarqube.ws.client.GetRequest;
-import static org.sonar.api.utils.DateUtils.dateToLong;
-import static org.sonar.api.utils.DateUtils.parseDateTime;
-
public class DefaultActiveRulesLoader implements ActiveRulesLoader {
private static final String RULES_SEARCH_URL = "/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true";
@@ -106,8 +105,8 @@ public class DefaultActiveRulesLoader implements ActiveRulesLoader {
loadedRule.setRuleKey(RuleKey.parse(r.getKey()));
loadedRule.setName(r.getName());
loadedRule.setSeverity(active.getSeverity());
- loadedRule.setCreatedAt(dateToLong(parseDateTime(active.getCreatedAt())));
- loadedRule.setUpdatedAt(dateToLong(parseDateTime(active.getUpdatedAt())));
+ loadedRule.setCreatedAt(DateUtils.dateToLong(DateUtils.parseDateTime(active.getCreatedAt())));
+ loadedRule.setUpdatedAt(DateUtils.dateToLong(DateUtils.parseDateTime(active.getUpdatedAt())));
loadedRule.setLanguage(r.getLang());
loadedRule.setInternalKey(r.getInternalKey());
if (r.hasTemplateKey()) {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRulesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRulesLoader.java
index 61a97e00921..cc745877ae9 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRulesLoader.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/DefaultRulesLoader.java
@@ -23,7 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonarqube.ws.Rules.ListResponse;
import org.sonarqube.ws.Rules.ListResponse.Rule;
import org.sonarqube.ws.client.GetRequest;
@@ -31,9 +31,9 @@ import org.sonarqube.ws.client.GetRequest;
public class DefaultRulesLoader implements RulesLoader {
private static final String RULES_SEARCH_URL = "/api/rules/list.protobuf";
- private final ScannerWsClient wsClient;
+ private final DefaultScannerWsClient wsClient;
- public DefaultRulesLoader(ScannerWsClient wsClient) {
+ public DefaultRulesLoader(DefaultScannerWsClient wsClient) {
this.wsClient = wsClient;
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesProvider.java
index a0c89c2d6f0..3b365ac3c71 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/RulesProvider.java
@@ -21,7 +21,9 @@ package org.sonar.scanner.rule;
import java.util.List;
import org.picocontainer.injectors.ProviderAdapter;
+import org.sonar.api.batch.rule.NewRule;
import org.sonar.api.batch.rule.Rules;
+import org.sonar.api.impl.rule.RulesBuilder;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DefaultInputModuleHierarchy.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DefaultInputModuleHierarchy.java
index aa6cbeb0db1..108a6dc7285 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DefaultInputModuleHierarchy.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/DefaultInputModuleHierarchy.java
@@ -28,8 +28,8 @@ import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.concurrent.Immutable;
import org.sonar.api.scan.filesystem.PathResolver;
-import org.sonar.scanner.fs.AbstractProjectOrModule;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
@Immutable
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputModuleHierarchyProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputModuleHierarchyProvider.java
index da0b8781dde..ef806c5b2ab 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputModuleHierarchyProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputModuleHierarchyProvider.java
@@ -26,8 +26,8 @@ import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.scan.filesystem.ScannerComponentIdGenerator;
public class InputModuleHierarchyProvider extends ProviderAdapter {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputProjectProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputProjectProvider.java
index 1219f2871dd..9500e47d8f7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputProjectProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/InputProjectProvider.java
@@ -24,7 +24,7 @@ import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.batch.bootstrap.ProjectReactor;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.scan.filesystem.ScannerComponentIdGenerator;
public class InputProjectProvider extends ProviderAdapter {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleConfigurationProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleConfigurationProvider.java
index 21d241c23f4..dab9cc531fd 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleConfigurationProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleConfigurationProvider.java
@@ -27,7 +27,7 @@ import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.scanner.bootstrap.GlobalConfiguration;
import org.sonar.scanner.bootstrap.GlobalServerSettings;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
public class ModuleConfigurationProvider extends ProviderAdapter {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleIndexer.java
index 1bc1611097f..c307a20aafc 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleIndexer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleIndexer.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.scan;
import org.picocontainer.Startable;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleScanContainer.java
index 1a7a78f93cf..f573dd47e4d 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleScanContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleScanContainer.java
@@ -23,7 +23,7 @@ import org.sonar.api.scan.filesystem.FileExclusions;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.scanner.bootstrap.ExtensionInstaller;
import org.sonar.scanner.deprecated.perspectives.ScannerPerspectives;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.scan.filesystem.DefaultModuleFileSystem;
import org.sonar.scanner.scan.filesystem.ModuleInputComponentStore;
import org.sonar.scanner.sensor.ModuleSensorContext;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectConfigurationProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectConfigurationProvider.java
index 0d17b4a8114..1903ad736eb 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectConfigurationProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectConfigurationProvider.java
@@ -24,7 +24,7 @@ import java.util.Map;
import org.picocontainer.injectors.ProviderAdapter;
import org.sonar.scanner.bootstrap.GlobalConfiguration;
import org.sonar.scanner.bootstrap.GlobalServerSettings;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
public class ProjectConfigurationProvider extends ProviderAdapter {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectLock.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectLock.java
index 9bf6bf73115..d024d47f7cb 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectLock.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectLock.java
@@ -24,7 +24,7 @@ import java.nio.channels.OverlappingFileLockException;
import java.nio.file.Files;
import java.nio.file.Path;
import org.picocontainer.Startable;
-import org.sonar.scanner.fs.AbstractProjectOrModule;
+import org.sonar.api.impl.fs.AbstractProjectOrModule;
public class ProjectLock implements Startable {
private final DirectoryLock lock;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java
index 01f181d55f0..e15525df2d2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectReactorBuilder.java
@@ -49,11 +49,11 @@ import org.sonar.core.config.IssueExclusionProperties;
import org.sonar.scanner.bootstrap.ProcessedScannerProperties;
import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer;
import org.sonar.scanner.issue.ignore.pattern.IssueInclusionPatternInitializer;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.api.impl.utils.ScannerUtils;
import static java.util.Arrays.asList;
import static java.util.stream.Collectors.toList;
-import static org.sonar.api.config.internal.MultivalueProperty.parseAsCsv;
+import static org.sonar.api.impl.config.MultivalueProperty.parseAsCsv;
/**
* Class that creates a project definition based on a set of properties.
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java
index 8cd93d031c4..3fd76637dd5 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ProjectScanContainer.java
@@ -23,8 +23,11 @@ import com.google.common.annotations.VisibleForTesting;
import javax.annotation.Nullable;
import org.sonar.api.SonarEdition;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
import org.sonar.api.batch.rule.CheckFactory;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.FileMetadata;
+import org.sonar.api.impl.fs.SensorStrategy;
+import org.sonar.api.impl.issue.DefaultNoSonarFilter;
import org.sonar.api.resources.Languages;
import org.sonar.api.resources.ResourceTypes;
import org.sonar.api.scan.filesystem.PathResolver;
@@ -63,10 +66,7 @@ import org.sonar.scanner.cpd.CpdSettings;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
import org.sonar.scanner.deprecated.test.TestPlanBuilder;
import org.sonar.scanner.deprecated.test.TestableBuilder;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.FileMetadata;
import org.sonar.scanner.fs.InputModuleHierarchy;
-import org.sonar.scanner.issue.DefaultNoSonarFilter;
import org.sonar.scanner.issue.IssueFilters;
import org.sonar.scanner.issue.IssuePublisher;
import org.sonar.scanner.issue.ignore.EnforceIssuesFilter;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ScanProperties.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ScanProperties.java
index 2fa3bbeaf02..6beb97470af 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ScanProperties.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ScanProperties.java
@@ -24,7 +24,7 @@ import java.nio.file.Paths;
import java.util.Optional;
import org.sonar.api.config.Configuration;
import org.sonar.api.utils.MessageException;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import static org.sonar.core.config.ScannerProperties.BRANCH_NAME;
import static org.sonar.core.config.ScannerProperties.ORGANIZATION;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/WorkDirectoriesInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/WorkDirectoriesInitializer.java
index 8c5b01e4b2b..03b39315cc0 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/WorkDirectoriesInitializer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/WorkDirectoriesInitializer.java
@@ -25,7 +25,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Iterator;
import org.sonar.core.util.FileUtils;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
/**
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractCoverageAndDuplicationExclusions.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractCoverageAndDuplicationExclusions.java
index 1bcbad7f75a..495b65448d4 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractCoverageAndDuplicationExclusions.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractCoverageAndDuplicationExclusions.java
@@ -28,7 +28,7 @@ import org.sonar.api.CoreProperties;
import org.sonar.api.utils.WildcardPattern;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import static java.util.stream.Collectors.toList;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
index 9a348fee7f5..65aca8bd046 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AbstractExclusionFilters.java
@@ -28,7 +28,7 @@ import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.impl.fs.PathPattern;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicates.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicates.java
index 6c1bb65332a..299cb5a268c 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicates.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicates.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.scan.filesystem;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.predicates.AbstractFilePredicate;
+import org.sonar.api.impl.fs.predicates.AbstractFilePredicate;
/**
* Additional {@link org.sonar.api.batch.fs.FilePredicate}s that are
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultModuleFileSystem.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultModuleFileSystem.java
index d25948764dd..3792a52e8a2 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultModuleFileSystem.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultModuleFileSystem.java
@@ -20,13 +20,14 @@
package org.sonar.scanner.scan.filesystem;
import com.google.common.annotations.VisibleForTesting;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.predicates.DefaultFilePredicates;
public class DefaultModuleFileSystem extends DefaultFileSystem {
public DefaultModuleFileSystem(ModuleInputComponentStore moduleInputFileCache, DefaultInputModule module) {
- super(module.getBaseDir(), moduleInputFileCache);
+ super(module.getBaseDir(), moduleInputFileCache, new DefaultFilePredicates(module.getBaseDir()));
initFields(module);
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultProjectFileSystem.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultProjectFileSystem.java
index 294b0b946d1..d7892ce887b 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultProjectFileSystem.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/DefaultProjectFileSystem.java
@@ -20,13 +20,14 @@
package org.sonar.scanner.scan.filesystem;
import com.google.common.annotations.VisibleForTesting;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.predicates.DefaultFilePredicates;
public class DefaultProjectFileSystem extends DefaultFileSystem {
public DefaultProjectFileSystem(InputComponentStore inputComponentStore, DefaultInputProject project) {
- super(project.getBaseDir(), inputComponentStore);
+ super(project.getBaseDir(), inputComponentStore, new DefaultFilePredicates(project.getBaseDir()));
setFields(project);
}
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java
index 56c21333962..c01df402b00 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/FileIndexer.java
@@ -30,16 +30,16 @@ import org.sonar.api.CoreProperties;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Type;
import org.sonar.api.batch.fs.InputFileFilter;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
+import org.sonar.api.impl.fs.SensorStrategy;
import org.sonar.api.batch.scm.IgnoreCommand;
import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultIndexedFile;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultIndexedFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader;
import org.sonar.scanner.scan.ScanProperties;
import org.sonar.scanner.util.ProgressReport;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/InputComponentStore.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/InputComponentStore.java
index 4eab927136d..eb33beb7e53 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/InputComponentStore.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/InputComponentStore.java
@@ -35,10 +35,10 @@ import java.util.stream.Stream;
import javax.annotation.CheckForNull;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.predicates.FileExtensionPredicate;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.predicates.FileExtensionPredicate;
import org.sonar.scanner.scan.branch.BranchConfiguration;
/**
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java
index 57fbb86e23d..7b699f2befd 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/LanguageDetection.java
@@ -32,7 +32,7 @@ import javax.annotation.concurrent.ThreadSafe;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.sonar.api.batch.fs.internal.PathPattern;
+import org.sonar.api.impl.fs.PathPattern;
import org.sonar.api.config.Configuration;
import org.sonar.api.utils.MessageException;
import org.sonar.scanner.repository.language.Language;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/MetadataGenerator.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/MetadataGenerator.java
index 2da2f6db0c4..c15c9cdb5c6 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/MetadataGenerator.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/MetadataGenerator.java
@@ -23,11 +23,11 @@ import com.google.common.annotations.VisibleForTesting;
import java.io.InputStream;
import java.nio.charset.Charset;
import org.sonar.api.batch.fs.InputFile.Type;
-import org.sonar.api.batch.fs.internal.Metadata;
+import org.sonar.api.impl.fs.Metadata;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.FileMetadata;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.FileMetadata;
import org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader;
public class MetadataGenerator {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleCoverageAndDuplicationExclusions.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleCoverageAndDuplicationExclusions.java
index 3ef961f83e2..2eb7d6805f4 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleCoverageAndDuplicationExclusions.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleCoverageAndDuplicationExclusions.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.scan.filesystem;
import javax.annotation.concurrent.Immutable;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.scan.ModuleConfiguration;
@Immutable
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStore.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStore.java
index e6d52849c63..23d7e257731 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStore.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStore.java
@@ -23,8 +23,8 @@ import java.util.SortedSet;
import org.sonar.api.batch.ScannerSide;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputModule;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
-import org.sonar.scanner.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.SensorStrategy;
+import org.sonar.api.impl.fs.DefaultFileSystem;
@ScannerSide
public class ModuleInputComponentStore extends DefaultFileSystem.Cache {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectCoverageAndDuplicationExclusions.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectCoverageAndDuplicationExclusions.java
index 4ab146afb27..e52ab6cc1bb 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectCoverageAndDuplicationExclusions.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectCoverageAndDuplicationExclusions.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.scan.filesystem;
import javax.annotation.concurrent.Immutable;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.scan.ProjectConfiguration;
@Immutable
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java
index 118b3eb5567..b5633d772eb 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/ProjectFileIndexer.java
@@ -45,7 +45,7 @@ import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.scanner.bootstrap.GlobalConfiguration;
import org.sonar.scanner.bootstrap.GlobalServerSettings;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.scan.ModuleConfiguration;
import org.sonar.scanner.scan.ModuleConfigurationProvider;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java
index 2cd3f8d5240..9de8b028234 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/filesystem/StatusDetection.java
@@ -22,7 +22,7 @@ package org.sonar.scanner.scan.filesystem;
import javax.annotation.concurrent.Immutable;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.repository.FileData;
import org.sonar.scanner.repository.ProjectRepositoriesSupplier;
import org.sonar.scanner.scm.ScmChangedFiles;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java
index e2742ea4d3a..885de1be663 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/DefaultBlameOutput.java
@@ -34,7 +34,7 @@ import org.sonar.api.batch.scm.BlameCommand.BlameOutput;
import org.sonar.api.batch.scm.BlameLine;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Changesets.Builder;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
index 6e93b9d4ad6..4c65b2843e8 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java
@@ -27,9 +27,9 @@ import org.sonar.api.batch.scm.ScmProvider;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.log.Profiler;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.scan.branch.BranchConfiguration;
-import org.sonar.scanner.util.ScannerUtils;
+import org.sonar.api.impl.utils.ScannerUtils;
public class ScmChangedFilesProvider extends ProviderAdapter {
private static final Logger LOG = Loggers.get(ScmChangedFilesProvider.class);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
index 7b048096dab..834d224ec82 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmPublisher.java
@@ -29,7 +29,7 @@ import org.sonar.api.batch.fs.InputFile.Status;
import org.sonar.api.batch.scm.ScmProvider;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Changesets.Builder;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorOptimizer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorOptimizer.java
index 95b473e05ce..cc089182c6b 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorOptimizer.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorOptimizer.java
@@ -25,6 +25,7 @@ import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.rule.ActiveRules;
import org.sonar.api.config.Configuration;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
public abstract class AbstractSensorOptimizer {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorWrapper.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorWrapper.java
index caba9bc9101..d5109c87943 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorWrapper.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/AbstractSensorWrapper.java
@@ -20,6 +20,7 @@
package org.sonar.scanner.sensor;
import org.sonar.api.batch.sensor.SensorContext;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
import org.sonar.api.scanner.sensor.ProjectSensor;
public abstract class AbstractSensorWrapper<G extends ProjectSensor> {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
index 13b72b07f7b..8cece1eba14 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
@@ -46,6 +46,15 @@ import org.sonar.api.batch.sensor.measure.Measure;
import org.sonar.api.batch.sensor.rule.AdHocRule;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
import org.sonar.api.config.Configuration;
+import org.sonar.api.impl.fs.DefaultInputComponent;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.sensor.DefaultCoverage;
+import org.sonar.api.impl.sensor.DefaultCpdTokens;
+import org.sonar.api.impl.sensor.DefaultHighlighting;
+import org.sonar.api.impl.sensor.DefaultMeasure;
+import org.sonar.api.impl.sensor.DefaultSignificantCode;
+import org.sonar.api.impl.sensor.DefaultSymbolTable;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.utils.KeyValueFormat;
import org.sonar.api.utils.log.Logger;
@@ -55,9 +64,6 @@ import org.sonar.core.util.CloseableIterator;
import org.sonar.duplications.block.Block;
import org.sonar.duplications.internal.pmd.PmdBlockChunker;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputComponent;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
import org.sonar.scanner.issue.IssuePublisher;
import org.sonar.scanner.protocol.Constants;
import org.sonar.scanner.protocol.output.FileStructure;
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java
index 1e8f6009f8d..783c4b2720f 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java
@@ -27,7 +27,7 @@ import org.sonar.api.batch.rule.ActiveRules;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
@ThreadSafe
public class ModuleSensorContext extends ProjectSensorContext {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorsExecutor.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorsExecutor.java
index ec3d21f6613..7c627f3d502 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorsExecutor.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorsExecutor.java
@@ -23,12 +23,12 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
+import org.sonar.api.impl.fs.SensorStrategy;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.core.util.logs.Profiler;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
public class ModuleSensorsExecutor {
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java
index 8a244510328..eae821692a0 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java
@@ -40,11 +40,19 @@ import org.sonar.api.batch.sensor.rule.NewAdHocRule;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.issue.DefaultIssue;
+import org.sonar.api.impl.sensor.DefaultAdHocRule;
+import org.sonar.api.impl.sensor.DefaultCoverage;
+import org.sonar.api.impl.sensor.DefaultCpdTokens;
+import org.sonar.api.impl.sensor.DefaultExternalIssue;
+import org.sonar.api.impl.sensor.DefaultHighlighting;
+import org.sonar.api.impl.sensor.DefaultMeasure;
+import org.sonar.api.impl.sensor.DefaultSignificantCode;
+import org.sonar.api.impl.sensor.DefaultSymbolTable;
import org.sonar.api.scanner.fs.InputProject;
import org.sonar.api.utils.Version;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.issue.DefaultIssue;
import org.sonar.scanner.sensor.noop.NoOpNewAnalysisError;
@ThreadSafe
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java
index 54bf590d758..20b3d3e5869 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java
@@ -28,7 +28,7 @@ import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
import org.sonar.api.scanner.sensor.ProjectSensor;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.report.ReportPublisher;
@Phase(name = Phase.Name.POST)
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/DefaultFileLinesContextTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/DefaultFileLinesContextTest.java
index f6e59a75f9a..5f789670c6a 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/DefaultFileLinesContextTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/DefaultFileLinesContextTest.java
@@ -27,10 +27,10 @@ import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
import org.sonar.api.batch.measure.MetricFinder;
import org.sonar.api.batch.sensor.internal.SensorStorage;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultMeasure;
import org.sonar.api.measures.CoreMetrics;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.DefaultMeasure;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ProjectInfoTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ProjectInfoTest.java
index a882ca0afcf..b43f101cdd1 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ProjectInfoTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ProjectInfoTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/WsTestUtil.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/WsTestUtil.java
index 29f806c9b0f..091d4899e8e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/WsTestUtil.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/WsTestUtil.java
@@ -24,7 +24,7 @@ import java.io.Reader;
import javax.annotation.Nullable;
import org.apache.commons.lang.StringUtils;
import org.mockito.ArgumentMatcher;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonarqube.ws.client.WsRequest;
import org.sonarqube.ws.client.WsResponse;
@@ -35,25 +35,25 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class WsTestUtil {
- public static void mockStream(ScannerWsClient mock, String path, InputStream is) {
+ public static void mockStream(DefaultScannerWsClient mock, String path, InputStream is) {
WsResponse response = mock(WsResponse.class);
when(response.contentStream()).thenReturn(is);
when(mock.call(argThat(new RequestMatcher(path)))).thenReturn(response);
}
- public static void mockStream(ScannerWsClient mock, InputStream is) {
+ public static void mockStream(DefaultScannerWsClient mock, InputStream is) {
WsResponse response = mock(WsResponse.class);
when(response.contentStream()).thenReturn(is);
when(mock.call(any(WsRequest.class))).thenReturn(response);
}
- public static void mockReader(ScannerWsClient mock, Reader reader) {
+ public static void mockReader(DefaultScannerWsClient mock, Reader reader) {
WsResponse response = mock(WsResponse.class);
when(response.contentReader()).thenReturn(reader);
when(mock.call(any(WsRequest.class))).thenReturn(response);
}
- public static void mockReader(ScannerWsClient mock, String path, Reader reader, Reader... others) {
+ public static void mockReader(DefaultScannerWsClient mock, String path, Reader reader, Reader... others) {
WsResponse response = mock(WsResponse.class);
when(response.contentReader()).thenReturn(reader);
WsResponse[] otherResponses = new WsResponse[others.length];
@@ -66,15 +66,15 @@ public class WsTestUtil {
when(mock.call(argThat(new RequestMatcher(path)))).thenReturn(response, otherResponses);
}
- public static void mockException(ScannerWsClient mock, Exception e) {
+ public static void mockException(DefaultScannerWsClient mock, Exception e) {
when(mock.call(any(WsRequest.class))).thenThrow(e);
}
- public static void mockException(ScannerWsClient mock, String path, Exception e) {
+ public static void mockException(DefaultScannerWsClient mock, String path, Exception e) {
when(mock.call(argThat(new RequestMatcher(path)))).thenThrow(e);
}
- public static void verifyCall(ScannerWsClient mock, String path) {
+ public static void verifyCall(DefaultScannerWsClient mock, String path) {
verify(mock).call(argThat(new RequestMatcher(path)));
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisTempFolderProviderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisTempFolderProviderTest.java
index d625da5f8df..620e3f703c1 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisTempFolderProviderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/AnalysisTempFolderProviderTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.utils.TempFolder;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/DefaultScannerWsClientTest.java
index abe99ed2c15..bbc55bb0758 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/DefaultScannerWsClientTest.java
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-public class ScannerWsClientTest {
+public class DefaultScannerWsClientTest {
@Rule
public LogTester logTester = new LogTester();
@@ -57,7 +57,7 @@ public class ScannerWsClientTest {
when(wsClient.wsConnector().call(request)).thenReturn(response);
logTester.setLevel(LoggerLevel.DEBUG);
- ScannerWsClient underTest = new ScannerWsClient(wsClient, false, new GlobalAnalysisMode(
+ DefaultScannerWsClient underTest = new DefaultScannerWsClient(wsClient, false, new GlobalAnalysisMode(
new RawScannerProperties(Collections.emptyMap())));
WsResponse result = underTest.call(request);
@@ -74,19 +74,19 @@ public class ScannerWsClientTest {
@Test
public void create_error_msg_from_json() {
String content = "{\"errors\":[{\"msg\":\"missing scan permission\"}, {\"msg\":\"missing another permission\"}]}";
- assertThat(ScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).isEqualTo("missing scan permission, missing another permission");
+ assertThat(DefaultScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).isEqualTo("missing scan permission, missing another permission");
}
@Test
public void create_error_msg_from_html() {
String content = "<!DOCTYPE html><html>something</html>";
- assertThat(ScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).isEqualTo("HTTP code 400");
+ assertThat(DefaultScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).isEqualTo("HTTP code 400");
}
@Test
public void create_error_msg_from_long_content() {
String content = StringUtils.repeat("mystring", 1000);
- assertThat(ScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).hasSize(15 + 128);
+ assertThat(DefaultScannerWsClient.createErrorMessage(new HttpException("url", 400, content))).hasSize(15 + 128);
}
@Test
@@ -99,7 +99,7 @@ public class ScannerWsClientTest {
WsResponse response = newResponse().setCode(401);
when(wsClient.wsConnector().call(request)).thenReturn(response);
- new ScannerWsClient(wsClient, false, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
+ new DefaultScannerWsClient(wsClient, false, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
}
@Test
@@ -111,7 +111,7 @@ public class ScannerWsClientTest {
WsResponse response = newResponse().setCode(401);
when(wsClient.wsConnector().call(request)).thenReturn(response);
- new ScannerWsClient(wsClient, /* credentials are configured */true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
+ new DefaultScannerWsClient(wsClient, /* credentials are configured */true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
}
@Test
@@ -124,7 +124,7 @@ public class ScannerWsClientTest {
.setCode(403);
when(wsClient.wsConnector().call(request)).thenReturn(response);
- new ScannerWsClient(wsClient, true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
+ new DefaultScannerWsClient(wsClient, true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
}
@Test
@@ -138,7 +138,7 @@ public class ScannerWsClientTest {
.setContent("{\"errors\":[{\"msg\":\"Boo! bad request! bad!\"}]}");
when(wsClient.wsConnector().call(request)).thenReturn(response);
- new ScannerWsClient(wsClient, true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
+ new DefaultScannerWsClient(wsClient, true, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()))).call(request);
}
private MockWsResponse newResponse() {
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ExtensionInstallerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ExtensionInstallerTest.java
index d060367750d..17e4b72f4b0 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ExtensionInstallerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ExtensionInstallerTest.java
@@ -26,7 +26,7 @@ import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.SonarRuntime;
import org.sonar.api.batch.ScannerSide;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.core.platform.PluginInfo;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ModuleSensorExtensionDictionnaryTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ModuleSensorExtensionDictionnaryTest.java
index 2c4ed265b27..68070e636b5 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ModuleSensorExtensionDictionnaryTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ModuleSensorExtensionDictionnaryTest.java
@@ -33,8 +33,8 @@ import org.sonar.api.batch.ScannerSide;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
import org.sonar.core.platform.ComponentContainer;
-import org.sonar.scanner.sensor.DefaultSensorDescriptor;
import org.sonar.scanner.sensor.ModuleSensorContext;
import org.sonar.scanner.sensor.ModuleSensorExtensionDictionnary;
import org.sonar.scanner.sensor.ModuleSensorOptimizer;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PluginFilesTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PluginFilesTest.java
index 9a7ebb0e127..004528a98eb 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PluginFilesTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PluginFilesTest.java
@@ -50,7 +50,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.scanner.bootstrap.ScannerPluginInstaller.InstalledPlugin;
import org.sonarqube.ws.client.HttpConnector;
import org.sonarqube.ws.client.WsClientFactories;
@@ -74,7 +74,7 @@ public class PluginFilesTest {
public void setUp() throws Exception {
HttpConnector connector = HttpConnector.newBuilder().url(server.url("/").toString()).build();
GlobalAnalysisMode analysisMode = new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap()));
- ScannerWsClient wsClient = new ScannerWsClient(WsClientFactories.getDefault().newClient(connector), false, analysisMode);
+ DefaultScannerWsClient wsClient = new DefaultScannerWsClient(WsClientFactories.getDefault().newClient(connector), false, analysisMode);
userHome = temp.newFolder();
MapSettings settings = new MapSettings();
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionnaryTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionnaryTest.java
index ed35ee1943d..c81893378b8 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionnaryTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/PostJobExtensionDictionnaryTest.java
@@ -25,7 +25,7 @@ import org.sonar.api.batch.Phase;
import org.sonar.api.batch.postjob.PostJob;
import org.sonar.api.batch.postjob.PostJobContext;
import org.sonar.api.batch.postjob.PostJobDescriptor;
-import org.sonar.scanner.postjob.DefaultPostJobDescriptor;
+import org.sonar.api.impl.sensor.DefaultPostJobDescriptor;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerPluginInstallerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerPluginInstallerTest.java
index fe6720aca89..edceff19a1b 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerPluginInstallerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerPluginInstallerTest.java
@@ -48,7 +48,7 @@ public class ScannerPluginInstallerTest {
public ExpectedException expectedException = ExpectedException.none();
private PluginFiles pluginFiles = mock(PluginFiles.class);
- private ScannerWsClient wsClient = mock(ScannerWsClient.class);
+ private DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
private ScannerPluginInstaller underTest = new ScannerPluginInstaller(pluginFiles, wsClient);
@Test
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientProviderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientProviderTest.java
index 5122d6f23e1..6f462beeaa7 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientProviderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/bootstrap/ScannerWsClientProviderTest.java
@@ -39,7 +39,7 @@ public class ScannerWsClientProviderTest {
public void provide_client_with_default_settings() {
RawScannerProperties settings = new RawScannerProperties(new HashMap<>());
- ScannerWsClient client = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), mock(System2.class));
+ DefaultScannerWsClient client = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), mock(System2.class));
assertThat(client).isNotNull();
assertThat(client.baseUrl()).isEqualTo("http://localhost:9000/");
@@ -59,7 +59,7 @@ public class ScannerWsClientProviderTest {
props.put("sonar.ws.timeout", "42");
RawScannerProperties settings = new RawScannerProperties(props);
- ScannerWsClient client = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), mock(System2.class));
+ DefaultScannerWsClient client = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), mock(System2.class));
assertThat(client).isNotNull();
HttpConnector httpConnector = (HttpConnector) client.wsConnector();
@@ -72,8 +72,8 @@ public class ScannerWsClientProviderTest {
System2 system = mock(System2.class);
RawScannerProperties settings = new RawScannerProperties(new HashMap<>());
- ScannerWsClient first = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), system);
- ScannerWsClient second = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), system);
+ DefaultScannerWsClient first = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), system);
+ DefaultScannerWsClient second = underTest.provide(settings, env, new GlobalAnalysisMode(new RawScannerProperties(Collections.emptyMap())), system);
assertThat(first).isSameAs(second);
}
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/CiConfigurationProviderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/CiConfigurationProviderTest.java
index 57e1aa0efd4..b372dd2bc97 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/CiConfigurationProviderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/CiConfigurationProviderTest.java
@@ -20,7 +20,7 @@
package org.sonar.scanner.ci;
import org.junit.Test;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
index a649c5e9f24..9767f60dedf 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
@@ -44,9 +44,9 @@ import org.sonar.duplications.block.ByteArray;
import org.sonar.duplications.index.CloneGroup;
import org.sonar.duplications.index.ClonePart;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.ScannerReport.Duplicate;
import org.sonar.scanner.protocol.output.ScannerReport.Duplication;
import org.sonar.scanner.protocol.output.ScannerReportReader;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdSettingsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdSettingsTest.java
index 2e3e6d2898d..80a8e4b61f9 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdSettingsTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdSettingsTest.java
@@ -23,7 +23,7 @@ import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.config.Configuration;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensorTest.java
index f62bb729def..3b567a3846b 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/JavaCpdBlockIndexerSensorTest.java
@@ -34,9 +34,9 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.duplications.block.Block;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.eq;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/externalissue/ExternalIssueImporterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/externalissue/ExternalIssueImporterTest.java
index 3eaeb9997ad..3659faec62f 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/externalissue/ExternalIssueImporterTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/externalissue/ExternalIssueImporterTest.java
@@ -31,9 +31,9 @@ import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.apache.commons.lang.ObjectUtils.defaultIfNull;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericCoverageReportParserTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericCoverageReportParserTest.java
index ccd628b0a17..777c85a924b 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericCoverageReportParserTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericCoverageReportParserTest.java
@@ -28,9 +28,9 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.utils.MessageException;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java
index 40ac5200719..a13c2a7e88a 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionReportParserTest.java
@@ -31,9 +31,9 @@ import org.sonar.api.test.MutableTestCase;
import org.sonar.api.test.MutableTestPlan;
import org.sonar.api.utils.MessageException;
import org.sonar.scanner.deprecated.test.TestPlanBuilder;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensorTest.java
index 980ee96bbe8..fcd36806b4f 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensorTest.java
@@ -35,7 +35,7 @@ import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.scanner.config.DefaultConfiguration;
import org.sonar.scanner.deprecated.test.TestPlanBuilder;
import org.sonar.scanner.scan.ProjectConfiguration;
-import org.sonar.scanner.sensor.SensorContextTester;
+import org.sonar.api.impl.sensor.SensorContextTester;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/DefaultFilterableIssueTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/DefaultFilterableIssueTest.java
index 5250e1aa5d1..cf1b13c9fd8 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/DefaultFilterableIssueTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/DefaultFilterableIssueTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Test;
import org.sonar.api.batch.fs.InputComponent;
import org.sonar.scanner.ProjectInfo;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.protocol.Constants.Severity;
import org.sonar.scanner.protocol.output.ScannerReport.Issue;
import org.sonar.scanner.protocol.output.ScannerReport.TextRange;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/IssuePublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/IssuePublisherTest.java
index 881a3629a04..3bd71931f2d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/IssuePublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/IssuePublisherTest.java
@@ -32,18 +32,20 @@ import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.InputComponent;
+import org.sonar.api.batch.rule.NewActiveRule;
+import org.sonar.api.impl.rule.RulesBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.issue.DefaultIssue;
+import org.sonar.api.impl.issue.DefaultIssueLocation;
+import org.sonar.api.impl.sensor.DefaultExternalIssue;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.report.ReportPublisher;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
-import org.sonar.scanner.rule.NewActiveRule;
-import org.sonar.scanner.rule.RulesBuilder;
-import org.sonar.scanner.sensor.DefaultExternalIssue;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java
index a656a767f71..770bfc94806 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/EnforceIssuesFilterTest.java
@@ -26,7 +26,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputComponent;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.scan.issue.filter.IssueFilterChain;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java
index d5a99ff296f..4f514205e43 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/IgnoreIssuesFilterTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.scan.issue.filter.IssueFilterChain;
import org.sonar.api.utils.WildcardPattern;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.issue.DefaultFilterableIssue;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
index 50096cc117f..70a6a486db7 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueExclusionPatternInitializerTest.java
@@ -22,7 +22,7 @@ package org.sonar.scanner.issue.ignore.pattern;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
import org.sonar.core.config.IssueExclusionProperties;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java
index c6cc5777bda..7932972af78 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/pattern/IssueInclusionPatternInitializerTest.java
@@ -22,7 +22,7 @@ package org.sonar.scanner.issue.ignore.pattern;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.config.PropertyDefinitions;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.core.config.IssueExclusionProperties;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoaderTest.java
index 94cebe5f0bd..ea148567732 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsLoaderTest.java
@@ -28,8 +28,8 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.api.notifications.AnalysisWarnings;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.issue.ignore.IgnoreIssuesFilter;
import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer;
import org.sonar.scanner.issue.ignore.pattern.IssuePattern;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScannerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScannerTest.java
index fb4165825e7..e6c757a92d3 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScannerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ignore/scanner/IssueExclusionsRegexpScannerTest.java
@@ -34,9 +34,9 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.FileMetadata;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.FileMetadata;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer;
import org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader.DoubleRegexpMatcher;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
index 244dec3cfcc..96b69e81ff1 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
@@ -44,6 +44,8 @@ import org.sonar.api.SonarEdition;
import org.sonar.api.SonarProduct;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
+import org.sonar.api.batch.rule.LoadedActiveRule;
+import org.sonar.api.impl.server.RuleDefinitionContext;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
import org.sonar.api.rule.RuleKey;
@@ -65,7 +67,6 @@ import org.sonar.scanner.repository.SingleProjectRepository;
import org.sonar.scanner.repository.settings.GlobalSettingsLoader;
import org.sonar.scanner.repository.settings.ProjectSettingsLoader;
import org.sonar.scanner.rule.ActiveRulesLoader;
-import org.sonar.scanner.rule.LoadedActiveRule;
import org.sonar.scanner.rule.RulesLoader;
import org.sonar.scanner.scan.ScanProperties;
import org.sonar.scanner.scan.branch.BranchConfiguration;
@@ -73,7 +74,6 @@ import org.sonar.scanner.scan.branch.BranchConfigurationLoader;
import org.sonar.scanner.scan.branch.BranchType;
import org.sonar.scanner.scan.branch.ProjectBranches;
import org.sonar.scanner.scan.branch.ProjectPullRequests;
-import org.sonar.server.rule.RuleDefinitionContext;
import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
import org.sonarqube.ws.Rules.ListResponse.Rule;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/BranchMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/BranchMediumTest.java
index 40695d3529e..bb77fdd9001 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/BranchMediumTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/BranchMediumTest.java
@@ -30,8 +30,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.FileMetadata;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.FileMetadata;
import org.sonar.scanner.mediumtest.AnalysisResult;
import org.sonar.scanner.mediumtest.ScannerMediumTester;
import org.sonar.scanner.protocol.output.ScannerReport;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java
index d6f141aa0f8..27b0c75eb39 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java
@@ -32,8 +32,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.SonarEdition;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.api.utils.MessageException;
-import org.sonar.scanner.fs.DefaultInputFile;
import org.sonar.scanner.mediumtest.AnalysisResult;
import org.sonar.scanner.mediumtest.ScannerMediumTester;
import org.sonar.xoo.XooPlugin;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java
index e64c47b7edb..aeab4439694 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/fs/FileSystemMediumTest.java
@@ -41,7 +41,7 @@ import org.sonar.api.utils.PathUtils;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonar.scanner.mediumtest.AnalysisResult;
import org.sonar.scanner.mediumtest.ScannerMediumTester;
import org.sonar.xoo.XooPlugin;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/ChecksMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/ChecksMediumTest.java
index fdc8a2c2b68..e725100e838 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/ChecksMediumTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/ChecksMediumTest.java
@@ -34,7 +34,7 @@ import org.sonar.api.rule.RuleKey;
import org.sonar.scanner.mediumtest.ScannerMediumTester;
import org.sonar.scanner.mediumtest.AnalysisResult;
import org.sonar.scanner.protocol.output.ScannerReport.Issue;
-import org.sonar.scanner.rule.LoadedActiveRule;
+import org.sonar.api.batch.rule.LoadedActiveRule;
import org.sonar.xoo.XooPlugin;
import org.sonar.xoo.rule.XooRulesDefinition;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/IssuesMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/IssuesMediumTest.java
index 683773b6e94..dc306bbec9d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/IssuesMediumTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/issues/IssuesMediumTest.java
@@ -35,7 +35,7 @@ import org.sonar.scanner.mediumtest.ScannerMediumTester;
import org.sonar.scanner.mediumtest.AnalysisResult;
import org.sonar.scanner.protocol.output.ScannerReport.ExternalIssue;
import org.sonar.scanner.protocol.output.ScannerReport.Issue;
-import org.sonar.scanner.rule.LoadedActiveRule;
+import org.sonar.api.batch.rule.LoadedActiveRule;
import org.sonar.xoo.XooPlugin;
import org.sonar.xoo.rule.HasTagSensor;
import org.sonar.xoo.rule.OneExternalIssuePerLineSensor;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleCoverageAndDuplicationExclusionsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleCoverageAndDuplicationExclusionsTest.java
index 6bfffc32384..eff17f8ca83 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleCoverageAndDuplicationExclusionsTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleCoverageAndDuplicationExclusionsTest.java
@@ -25,8 +25,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.CoreProperties;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.scan.ModuleConfiguration;
import org.sonar.scanner.scan.filesystem.ModuleCoverageAndDuplicationExclusions;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleSensorsExecutorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleSensorsExecutorTest.java
index d48402ea9ed..fb7cf2ccea1 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleSensorsExecutorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ModuleSensorsExecutorTest.java
@@ -26,12 +26,12 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
+import org.sonar.api.impl.fs.SensorStrategy;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.sensor.ModuleSensorExtensionDictionnary;
import org.sonar.scanner.sensor.ModuleSensorWrapper;
import org.sonar.scanner.sensor.ModuleSensorsExecutor;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ProjectCoverageExclusionsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ProjectCoverageExclusionsTest.java
index a225093a650..f95fa930015 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ProjectCoverageExclusionsTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/phases/ProjectCoverageExclusionsTest.java
@@ -25,8 +25,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.CoreProperties;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.scan.ProjectConfiguration;
import org.sonar.scanner.scan.filesystem.ProjectCoverageAndDuplicationExclusions;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java
index a9283aa8590..d34cfb43c12 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/platform/DefaultServerTest.java
@@ -24,10 +24,10 @@ import org.junit.Test;
import org.sonar.api.CoreProperties;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.config.Settings;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.utils.Version;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -40,7 +40,7 @@ public class DefaultServerTest {
Settings settings = new MapSettings();
settings.setProperty(CoreProperties.SERVER_ID, "123");
settings.setProperty(CoreProperties.SERVER_STARTTIME, "2010-05-18T17:59:00+0000");
- ScannerWsClient client = mock(ScannerWsClient.class);
+ DefaultScannerWsClient client = mock(DefaultScannerWsClient.class);
when(client.baseUrl()).thenReturn("http://foo.com");
DefaultServer metadata = new DefaultServer(((MapSettings) settings).asConfig(), client,
@@ -61,7 +61,7 @@ public class DefaultServerTest {
@Test
public void publicRootUrl() {
Settings settings = new MapSettings();
- ScannerWsClient client = mock(ScannerWsClient.class);
+ DefaultScannerWsClient client = mock(DefaultScannerWsClient.class);
when(client.baseUrl()).thenReturn("http://foo.com/");
DefaultServer metadata = new DefaultServer(((MapSettings) settings).asConfig(), client, null);
@@ -76,7 +76,7 @@ public class DefaultServerTest {
public void invalid_startup_date_throws_exception() {
Settings settings = new MapSettings();
settings.setProperty(CoreProperties.SERVER_STARTTIME, "invalid");
- ScannerWsClient client = mock(ScannerWsClient.class);
+ DefaultScannerWsClient client = mock(DefaultScannerWsClient.class);
DefaultServer metadata = new DefaultServer(((MapSettings) settings).asConfig(), client, null);
metadata.getStartedAt();
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/DefaultPostJobContextTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/DefaultPostJobContextTest.java
index 6399495c410..27a4f7bbd9e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/DefaultPostJobContextTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/DefaultPostJobContextTest.java
@@ -23,7 +23,7 @@ import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.batch.AnalysisMode;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/PostJobOptimizerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/PostJobOptimizerTest.java
index 1b604e11b6e..c10ffd5c237 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/PostJobOptimizerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/postjob/PostJobOptimizerTest.java
@@ -23,7 +23,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.sensor.DefaultPostJobDescriptor;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ActiveRulesPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ActiveRulesPublisherTest.java
index 6293696adc4..2dce5ea7730 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ActiveRulesPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ActiveRulesPublisherTest.java
@@ -24,8 +24,8 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.scanner.rule.DefaultActiveRules;
-import org.sonar.scanner.rule.NewActiveRule;
+import org.sonar.api.impl.rule.DefaultActiveRules;
+import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
import org.sonar.core.util.CloseableIterator;
import org.sonar.scanner.protocol.Constants;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java
index f795cf97408..5299672f6fd 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/AnalysisContextReportPublisherTest.java
@@ -38,7 +38,7 @@ import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.core.platform.PluginInfo;
import org.sonar.scanner.bootstrap.GlobalServerSettings;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.ProjectServerSettings;
@@ -148,66 +148,6 @@ public class AnalysisContextReportPublisherTest {
}
@Test
- public void shouldNotDumpSQPropsInSystemProps() throws Exception {
- logTester.setLevel(LoggerLevel.DEBUG);
- ScannerReportWriter writer = new ScannerReportWriter(temp.newFolder());
- Properties props = new Properties();
- props.setProperty(COM_FOO, "bar");
- props.setProperty(SONAR_SKIP, "true");
- when(system2.properties()).thenReturn(props);
- DefaultInputModule rootModule = new DefaultInputModule(ProjectDefinition.create()
- .setBaseDir(temp.newFolder())
- .setWorkDir(temp.newFolder())
- .setProperty("sonar.projectKey", "foo")
- .setProperty(COM_FOO, "bar")
- .setProperty(SONAR_SKIP, "true"));
- when(store.allModules()).thenReturn(singletonList(rootModule));
- when(hierarchy.root()).thenReturn(rootModule);
-
- publisher.init(writer);
-
- List<String> lines = FileUtils.readLines(writer.getFileStructure().analysisLog(), StandardCharsets.UTF_8);
- assertThat(lines).containsExactly("Environment variables:",
- "System properties:",
- " - com.foo=bar",
- "SonarQube plugins:",
- "Global server settings:",
- "Project server settings:",
- "Project scanner properties:",
- " - sonar.projectKey=foo",
- " - sonar.skip=true");
- }
-
- @Test
- public void shouldNotDumpEnvTwice() throws Exception {
- logTester.setLevel(LoggerLevel.DEBUG);
- ScannerReportWriter writer = new ScannerReportWriter(temp.newFolder());
-
- Map<String, String> env = new HashMap<>();
- env.put(FOO, "BAR");
- env.put(BIZ, "BAZ");
- when(system2.envVariables()).thenReturn(env);
- DefaultInputModule rootModule = new DefaultInputModule(ProjectDefinition.create()
- .setBaseDir(temp.newFolder())
- .setWorkDir(temp.newFolder())
- .setProperty("sonar.projectKey", "foo")
- .setProperty("env." + FOO, "BAR"));
- when(store.allModules()).thenReturn(singletonList(rootModule));
- when(hierarchy.root()).thenReturn(rootModule);
- publisher.init(writer);
-
- String content = FileUtils.readFileToString(writer.getFileStructure().analysisLog(), StandardCharsets.UTF_8);
- assertThat(content).containsOnlyOnce(FOO);
- assertThat(content).containsOnlyOnce(BIZ);
- assertThat(content).containsSubsequence(BIZ, FOO);
-
- content = FileUtils.readFileToString(writer.getFileStructure().analysisLog(), StandardCharsets.UTF_8);
- assertThat(content).containsOnlyOnce(FOO);
- assertThat(content).containsOnlyOnce(BIZ);
- assertThat(content).doesNotContain("env." + FOO);
- }
-
- @Test
public void shouldNotDumpSensitiveModuleProperties() throws Exception {
ScannerReportWriter writer = new ScannerReportWriter(temp.newFolder());
DefaultInputModule rootModule = new DefaultInputModule(ProjectDefinition.create()
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ChangedLinesPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ChangedLinesPublisherTest.java
index 18ce32fab0a..d3b7a0b4936 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ChangedLinesPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ChangedLinesPublisherTest.java
@@ -31,10 +31,10 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.scm.ScmProvider;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.fs.InputModuleHierarchy;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.ScannerReportReader;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.branch.BranchConfiguration;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ComponentsPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ComponentsPublisherTest.java
index b812747c692..0561c6076e3 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ComponentsPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ComponentsPublisherTest.java
@@ -33,9 +33,9 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Type;
import org.sonar.api.utils.DateUtils;
import org.sonar.scanner.ProjectInfo;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.FileStructure;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReport.Component;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
index 3eb07e5e945..9bbe982e9fc 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/MetadataPublisherTest.java
@@ -44,9 +44,9 @@ import org.sonar.scanner.ProjectInfo;
import org.sonar.scanner.bootstrap.ScannerPlugin;
import org.sonar.scanner.bootstrap.ScannerPluginRepository;
import org.sonar.scanner.cpd.CpdSettings;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.ScannerReport;
import org.sonar.scanner.protocol.output.ScannerReportReader;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
index 3c7893722ad..e81e23e2f3b 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
@@ -40,8 +40,8 @@ import org.sonar.api.utils.TempFolder;
import org.sonar.api.utils.log.LogTester;
import org.sonar.api.utils.log.LoggerLevel;
import org.sonar.scanner.bootstrap.GlobalAnalysisMode;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.scan.ScanProperties;
import org.sonar.scanner.scan.branch.BranchConfiguration;
@@ -73,7 +73,7 @@ public class ReportPublisherTest {
GlobalAnalysisMode mode = mock(GlobalAnalysisMode.class);
ScanProperties properties = mock(ScanProperties.class);
- ScannerWsClient wsClient = mock(ScannerWsClient.class, Mockito.RETURNS_DEEP_STUBS);
+ DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class, Mockito.RETURNS_DEEP_STUBS);
Server server = mock(Server.class);
InputModuleHierarchy moduleHierarchy = mock(InputModuleHierarchy.class);
DefaultInputModule root;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/SourcePublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/SourcePublisherTest.java
index 835e423f9ee..e1239caab09 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/SourcePublisherTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/SourcePublisherTest.java
@@ -27,9 +27,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.protocol.output.ScannerReportWriter;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoaderTest.java
index 5bf58615061..7b21c92e5a8 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultMetricsRepositoryLoaderTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.scanner.WsTestUtil;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
@@ -40,7 +40,7 @@ import static org.mockito.Mockito.when;
public class DefaultMetricsRepositoryLoaderTest {
private static final String WS_URL = "/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=";
- private ScannerWsClient wsClient;
+ private DefaultScannerWsClient wsClient;
private DefaultMetricsRepositoryLoader metricsRepositoryLoader;
@Rule
@@ -48,7 +48,7 @@ public class DefaultMetricsRepositoryLoaderTest {
@Before
public void setUp() throws IOException {
- wsClient = mock(ScannerWsClient.class);
+ wsClient = mock(DefaultScannerWsClient.class);
WsTestUtil.mockReader(wsClient, WS_URL + "1", new StringReader(IOUtils.toString(this.getClass().getResourceAsStream("DefaultMetricsRepositoryLoaderTest/page1.json"))));
WsTestUtil.mockReader(wsClient, WS_URL + "2", new StringReader(IOUtils.toString(this.getClass().getResourceAsStream("DefaultMetricsRepositoryLoaderTest/page2.json"))));
metricsRepositoryLoader = new DefaultMetricsRepositoryLoader(wsClient);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java
index f2888be4c65..567079db585 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java
@@ -31,8 +31,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.MessageException;
import org.sonar.scanner.WsTestUtil;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonar.scanner.fs.DefaultInputFile;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
+import org.sonar.api.impl.fs.DefaultInputFile;
import org.sonarqube.ws.Batch.WsProjectResponse;
import org.sonarqube.ws.client.HttpException;
import org.sonarqube.ws.client.WsRequest;
@@ -49,11 +49,11 @@ public class DefaultProjectRepositoriesLoaderTest {
public ExpectedException thrown = ExpectedException.none();
private DefaultProjectRepositoriesLoader loader;
- private ScannerWsClient wsClient;
+ private DefaultScannerWsClient wsClient;
@Before
public void prepare() throws IOException {
- wsClient = mock(ScannerWsClient.class);
+ wsClient = mock(DefaultScannerWsClient.class);
InputStream is = mockData();
WsTestUtil.mockStream(wsClient, "/batch/project.protobuf?key=foo%3F", is);
loader = new DefaultProjectRepositoriesLoader(wsClient);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java
index 95e38e4520e..edfc14e5bd6 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.utils.MessageException;
import org.sonar.scanner.WsTestUtil;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonar.scanner.scan.ScanProperties;
import org.sonarqube.ws.Qualityprofiles;
import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
@@ -43,7 +43,7 @@ public class DefaultQualityProfileLoaderTest {
@Rule
public ExpectedException exception = ExpectedException.none();
- private ScannerWsClient wsClient = mock(ScannerWsClient.class);
+ private DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
private ScanProperties properties = mock(ScanProperties.class);
private DefaultQualityProfileLoader underTest = new DefaultQualityProfileLoader(properties, wsClient);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoaderTest.java
index aff5f0fcc3c..0a1f91e9429 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultGlobalSettingsLoaderTest.java
@@ -25,7 +25,7 @@ import java.io.PipedOutputStream;
import java.util.Map;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonarqube.ws.Settings;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.WsResponse;
@@ -39,7 +39,7 @@ import static org.mockito.Mockito.when;
public class DefaultGlobalSettingsLoaderTest {
- private ScannerWsClient wsClient = mock(ScannerWsClient.class);
+ private DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
private DefaultGlobalSettingsLoader underTest = new DefaultGlobalSettingsLoader(wsClient);
@Test
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoaderTest.java
index a9163f56bb3..125e7bd74ee 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/settings/DefaultProjectSettingsLoaderTest.java
@@ -26,7 +26,7 @@ import java.util.Map;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.sonar.scanner.bootstrap.ProcessedScannerProperties;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonarqube.ws.Settings;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.WsResponse;
@@ -40,7 +40,7 @@ import static org.mockito.Mockito.when;
public class DefaultProjectSettingsLoaderTest {
- private ScannerWsClient wsClient = mock(org.sonar.scanner.bootstrap.ScannerWsClient.class);
+ private DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
private ProcessedScannerProperties properties = mock(ProcessedScannerProperties.class);
private DefaultProjectSettingsLoader underTest = new DefaultProjectSettingsLoader(wsClient, properties);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesBuilderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesBuilderTest.java
index e892510d046..c48b0dc8aeb 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesBuilderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesBuilderTest.java
@@ -24,6 +24,8 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
+import org.sonar.api.batch.rule.NewActiveRule;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java
index 2773208a00f..4a8851ded6c 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java
@@ -30,6 +30,7 @@ import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.LoadedActiveRule;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.DateUtils;
import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultActiveRulesLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultActiveRulesLoaderTest.java
index ad46a6851ed..0dd61ad9ccf 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultActiveRulesLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultActiveRulesLoaderTest.java
@@ -26,10 +26,11 @@ import java.util.Collection;
import java.util.stream.IntStream;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.api.batch.rule.LoadedActiveRule;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
import org.sonar.scanner.WsTestUtil;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import org.sonarqube.ws.Rules;
import org.sonarqube.ws.Rules.Active;
@@ -54,11 +55,11 @@ public class DefaultActiveRulesLoaderTest {
private static final String SEVERITY_VALUE = Severity.MINOR;
private DefaultActiveRulesLoader loader;
- private ScannerWsClient wsClient;
+ private DefaultScannerWsClient wsClient;
@Before
public void setUp() {
- wsClient = mock(ScannerWsClient.class);
+ wsClient = mock(DefaultScannerWsClient.class);
BranchConfiguration branchConfig = mock(BranchConfiguration.class);
when(branchConfig.isShortOrPullRequest()).thenReturn(false);
loader = new DefaultActiveRulesLoader(wsClient);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesLoaderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesLoaderTest.java
index b2d06f19442..b614d456fbe 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesLoaderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/DefaultRulesLoaderTest.java
@@ -27,7 +27,7 @@ import java.util.List;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.scanner.WsTestUtil;
-import org.sonar.scanner.bootstrap.ScannerWsClient;
+import org.sonar.scanner.bootstrap.DefaultScannerWsClient;
import org.sonarqube.ws.Rules.ListResponse.Rule;
import static org.assertj.core.api.Assertions.assertThat;
@@ -39,7 +39,7 @@ public class DefaultRulesLoaderTest {
@Test
public void testParseServerResponse() throws IOException {
- ScannerWsClient wsClient = mock(ScannerWsClient.class);
+ DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
InputStream is = Resources.asByteSource(this.getClass().getResource("DefaultRulesLoaderTest/response.protobuf")).openBufferedStream();
WsTestUtil.mockStream(wsClient, is);
DefaultRulesLoader loader = new DefaultRulesLoader(wsClient);
@@ -49,7 +49,7 @@ public class DefaultRulesLoaderTest {
@Test
public void testError() throws IOException {
- ScannerWsClient wsClient = mock(ScannerWsClient.class);
+ DefaultScannerWsClient wsClient = mock(DefaultScannerWsClient.class);
InputStream is = ByteSource.wrap(new String("trash").getBytes()).openBufferedStream();
WsTestUtil.mockStream(wsClient, is);
DefaultRulesLoader loader = new DefaultRulesLoader(wsClient);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/QProfileVerifierTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/QProfileVerifierTest.java
index f7a64f06b63..e81930bf234 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/QProfileVerifierTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/QProfileVerifierTest.java
@@ -24,7 +24,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.slf4j.Logger;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/DefaultInputModuleHierarchyTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/DefaultInputModuleHierarchyTest.java
index aadf37e6a75..1bdce821151 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/DefaultInputModuleHierarchyTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/DefaultInputModuleHierarchyTest.java
@@ -28,7 +28,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ModuleIndexerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ModuleIndexerTest.java
index 3c4cb6ffb15..18da6ddf5bf 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ModuleIndexerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ModuleIndexerTest.java
@@ -22,7 +22,7 @@ package org.sonar.scanner.scan;
import java.util.Arrays;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import org.sonar.scanner.scan.filesystem.InputComponentStore;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectLockTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectLockTest.java
index 12f20933bdb..9ebc2cea34e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectLockTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ProjectLockTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ScanPropertiesTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ScanPropertiesTest.java
index a2622ae4cbd..7241ab7b03a 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ScanPropertiesTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/ScanPropertiesTest.java
@@ -27,9 +27,9 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.utils.MessageException;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/WorkDirectoriesInitializerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/WorkDirectoriesInitializerTest.java
index ba5aedb451f..19797c845bd 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/WorkDirectoriesInitializerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/WorkDirectoriesInitializerTest.java
@@ -26,7 +26,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.sonar.scanner.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputModule;
import org.sonar.scanner.fs.InputModuleHierarchy;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicatesTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicatesTest.java
index 37775d19ae5..4974350faf7 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicatesTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/AdditionalFilePredicatesTest.java
@@ -22,7 +22,7 @@ package org.sonar.scanner.scan.filesystem;
import org.junit.Test;
import org.sonar.api.batch.fs.FilePredicate;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/InputComponentStoreTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/InputComponentStoreTest.java
index e9365140bd2..709b5960b9f 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/InputComponentStoreTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/InputComponentStoreTest.java
@@ -32,10 +32,10 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputFile.Status;
import org.sonar.api.batch.fs.InputFile.Type;
import org.sonar.api.batch.fs.InputPath;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/LanguageDetectionTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/LanguageDetectionTest.java
index c924cb4c5e5..30a3a20d713 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/LanguageDetectionTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/LanguageDetectionTest.java
@@ -27,8 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.resources.Language;
import org.sonar.api.resources.Languages;
import org.sonar.api.utils.MessageException;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/MetadataGeneratorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/MetadataGeneratorTest.java
index 0682ccaf345..8ec05f3294e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/MetadataGeneratorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/MetadataGeneratorTest.java
@@ -34,9 +34,9 @@ import org.mockito.MockitoAnnotations;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.notifications.AnalysisWarnings;
import org.sonar.api.utils.PathUtils;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.FileMetadata;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.FileMetadata;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.issue.ignore.IgnoreIssuesFilter;
import org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer;
import org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStoreTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStoreTest.java
index c624be2c6f1..57386cb65e9 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStoreTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ModuleInputComponentStoreTest.java
@@ -26,9 +26,9 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.fs.InputModule;
-import org.sonar.api.batch.fs.internal.SensorStrategy;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.SensorStrategy;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.scan.branch.BranchConfiguration;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ProjectExclusionFiltersTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ProjectExclusionFiltersTest.java
index 9f613f48ed7..af8c8156613 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ProjectExclusionFiltersTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/ProjectExclusionFiltersTest.java
@@ -30,8 +30,8 @@ import org.junit.rules.TemporaryFolder;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.fs.IndexedFile;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.DefaultIndexedFile;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.fs.DefaultIndexedFile;
+import org.sonar.api.impl.config.MapSettings;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/StatusDetectionTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/StatusDetectionTest.java
index 167b4e33a9c..10fc2c68e1a 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/StatusDetectionTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scan/filesystem/StatusDetectionTest.java
@@ -26,8 +26,8 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.scanner.repository.FileData;
import org.sonar.scanner.repository.ProjectRepositoriesSupplier;
import org.sonar.scanner.repository.SingleProjectRepository;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/DefaultBlameOutputTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/DefaultBlameOutputTest.java
index a408dde4a41..5ea2bc5464c 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/DefaultBlameOutputTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/DefaultBlameOutputTest.java
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.batch.fs.InputFile;
-import org.sonar.scanner.fs.TestInputFileBuilder;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
import org.sonar.api.batch.scm.BlameLine;
public class DefaultBlameOutputTest {
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/ScmChangedFilesProviderTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/ScmChangedFilesProviderTest.java
index 681433767ff..6304dcbd82f 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/ScmChangedFilesProviderTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/scm/ScmChangedFilesProviderTest.java
@@ -29,7 +29,7 @@ import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonar.api.batch.scm.ScmProvider;
-import org.sonar.scanner.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.DefaultInputProject;
import org.sonar.scanner.fs.InputModuleHierarchy;
import org.sonar.scanner.scan.branch.BranchConfiguration;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorStorageTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorStorageTest.java
index d95d44a69ed..fe82b642902 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorStorageTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/DefaultSensorStorageTest.java
@@ -33,17 +33,22 @@ import org.sonar.api.batch.measure.MetricFinder;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.Issue;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.impl.config.MapSettings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.core.metric.ScannerMetrics;
+import org.sonar.api.impl.fs.DefaultInputDir;
+import org.sonar.api.impl.fs.DefaultInputFile;
+import org.sonar.api.impl.fs.DefaultInputModule;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultExternalIssue;
+import org.sonar.api.impl.sensor.DefaultHighlighting;
+import org.sonar.api.impl.sensor.DefaultMeasure;
+import org.sonar.api.impl.sensor.DefaultSignificantCode;
+import org.sonar.api.impl.sensor.DefaultSymbolTable;
import org.sonar.scanner.cpd.index.SonarCpdBlockIndex;
-import org.sonar.scanner.fs.DefaultInputDir;
-import org.sonar.scanner.fs.DefaultInputFile;
-import org.sonar.scanner.fs.DefaultInputModule;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.issue.DefaultIssue;
-import org.sonar.scanner.issue.DefaultIssueLocation;
+import org.sonar.api.impl.issue.DefaultIssue;
+import org.sonar.api.impl.issue.DefaultIssueLocation;
import org.sonar.scanner.issue.IssuePublisher;
import org.sonar.scanner.protocol.output.FileStructure;
import org.sonar.scanner.protocol.output.ScannerReport;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorContextTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorContextTest.java
index 668a050119a..dea7f4176d5 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorContextTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorContextTest.java
@@ -31,13 +31,13 @@ import org.sonar.api.batch.fs.InputModule;
import org.sonar.api.batch.measure.MetricFinder;
import org.sonar.api.batch.rule.ActiveRules;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.config.internal.MapSettings;
-import org.sonar.api.internal.SonarRuntimeImpl;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.DefaultInputProject;
+import org.sonar.api.impl.context.SonarRuntimeImpl;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.utils.Version;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.DefaultInputProject;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorOptimizerTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorOptimizerTest.java
index 0a78c6b2984..197749532c8 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorOptimizerTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/sensor/ModuleSensorOptimizerTest.java
@@ -26,12 +26,13 @@ import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.rule.ActiveRules;
-import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.batch.rule.NewActiveRule;
+import org.sonar.api.impl.config.MapSettings;
+import org.sonar.api.impl.fs.DefaultFileSystem;
+import org.sonar.api.impl.fs.TestInputFileBuilder;
+import org.sonar.api.impl.sensor.DefaultSensorDescriptor;
import org.sonar.api.rule.RuleKey;
-import org.sonar.scanner.fs.DefaultFileSystem;
-import org.sonar.scanner.fs.TestInputFileBuilder;
-import org.sonar.scanner.rule.ActiveRulesBuilder;
-import org.sonar.scanner.rule.NewActiveRule;
+import org.sonar.api.impl.rule.ActiveRulesBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/util/ScannerUtilsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/util/ScannerUtilsTest.java
index f5df14fd0b3..1a1ccf2843c 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/util/ScannerUtilsTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/util/ScannerUtilsTest.java
@@ -20,6 +20,7 @@
package org.sonar.scanner.util;
import org.junit.Test;
+import org.sonar.api.impl.utils.ScannerUtils;
import static org.assertj.core.api.Assertions.assertThat;