aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualViolationInjector.java6
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdater.java6
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest.java2
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualViolationInjectorTest.java6
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdaterTest.java6
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java2
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarEngine.java2
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/index/DbDuplicationsIndex.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java8
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java8
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/DashboardMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/WidgetDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/WidgetMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/duplication/DuplicationDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/duplication/DuplicationMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationMapper.java)6
-rw-r--r--sonar-core/src/main/java/org/sonar/core/duplication/DuplicationUnitDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationUnitDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/metric/CacheMetricFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/metric/DefaultMetricFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java (renamed from sonar-core/src/main/java/org/sonar/core/notifications/DefaultNotificationManager.java)3
-rw-r--r--sonar-core/src/main/java/org/sonar/core/notification/NotificationQueueElement.java (renamed from sonar-core/src/main/java/org/sonar/jpa/entity/NotificationQueueElement.java)5
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DaoUtils.java (renamed from sonar-core/src/main/java/org/sonar/persistence/DaoUtils.java)16
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/Database.java (renamed from sonar-core/src/main/java/org/sonar/persistence/Database.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseMigrator.java (renamed from sonar-core/src/main/java/org/sonar/persistence/DatabaseMigrator.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java (renamed from sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DdlUtils.java (renamed from sonar-core/src/main/java/org/sonar/persistence/DdlUtils.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java (renamed from sonar-core/src/main/java/org/sonar/persistence/DefaultDatabase.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java (renamed from sonar-core/src/main/java/org/sonar/persistence/MyBatis.java)26
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/Derby.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/Derby.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/Dialect.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/Dialect.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/DialectUtils.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/DialectUtils.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/MsSql.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/MsSql.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/MySql.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/MySql.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/Oracle.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/Oracle.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/OracleSequenceGenerator.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/OracleSequenceGenerator.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGenerator.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSQLSequenceGenerator.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSql.java (renamed from sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSql.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/plugins/ResourcesClassloader.java3
-rw-r--r--sonar-core/src/main/java/org/sonar/core/qualitymodel/DefaultModelFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/resource/ResourceDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerFilter.java (renamed from sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerFilter.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerMapper.java)6
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/ReviewDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/review/ReviewDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/ReviewDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/review/ReviewDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/ReviewMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/review/ReviewMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/review/ReviewQuery.java (renamed from sonar-core/src/main/java/org/sonar/persistence/review/ReviewQuery.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java)3
-rw-r--r--sonar-core/src/main/java/org/sonar/core/rule/DefaultRuleFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/rule/RuleDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/rule/RuleDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/rule/RuleDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/rule/RuleDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/rule/RuleMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/rule/RuleMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDao.java (renamed from sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDao.java)4
-rw-r--r--sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java (renamed from sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDto.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateMapper.java (renamed from sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateMapper.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/core/user/DefaultUserFinder.java (renamed from sonar-core/src/main/java/org/sonar/core/components/DefaultUserFinder.java)2
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java4
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/session/DefaultDatabaseConnector.java2
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java2
-rw-r--r--sonar-core/src/main/resources/META-INF/persistence.xml2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-mssql.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-mssql.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/resource/ResourceIndexerMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/resource/ResourceIndexerMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/review/ReviewMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/review/ReviewMapper.xml)4
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/rule/RuleMapper.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper-oracle.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper-oracle.xml)2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper.xml (renamed from sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper.xml)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/dashboard/ActiveDashboardDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dashboard/ActiveDashboardDaoTest.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/dashboard/DashboardDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dashboard/DashboardDaoTest.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/duplication/DuplicationDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/duplication/DuplicationDaoTest.java)14
-rw-r--r--sonar-core/src/test/java/org/sonar/core/metric/CacheMetricFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/metric/DefaultMetricFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java (renamed from sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java)11
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DaoTestCase.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DaoTestCase.java)5
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DaoUtilsTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DatabaseCommands.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DatabaseCommands.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DdlUtilsTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DefaultDatabaseTest.java)6
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/DerbyUtils.java (renamed from sonar-core/src/test/java/org/sonar/persistence/DerbyUtils.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabase.java (renamed from sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabase.java)6
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabaseTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabaseTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/MyBatisTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/MyBatisTest.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/DerbyTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/DerbyTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/DialectUtilsTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/MsSqlTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/MySqlTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/OracleSequenceGeneratorTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/OracleTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSQLSequenceGeneratorTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSqlTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java9
-rw-r--r--sonar-core/src/test/java/org/sonar/core/qualitymodel/DefaultModelFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/qualitymodel/ModelTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/ModelTest.java)2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/resource/ResourceIndexerDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/resource/ResourceIndexerDaoTest.java)6
-rw-r--r--sonar-core/src/test/java/org/sonar/core/review/ReviewDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/review/ReviewDaoTest.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/rule/CacheRuleFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/rule/DefaultRuleFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java)3
-rw-r--r--sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/rule/RuleDaoTest.java)11
-rw-r--r--sonar-core/src/test/java/org/sonar/core/template/LoadedTemplateDaoTest.java (renamed from sonar-core/src/test/java/org/sonar/persistence/template/LoadedTemplateDaoTest.java)4
-rw-r--r--sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java (renamed from sonar-core/src/test/java/org/sonar/core/components/DefaultUserFinderTest.java)11
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java4
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java4
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/session/JpaDatabaseSessionTest.java16
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java3
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/empty.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/empty.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldGetByHash.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/metric/CacheMetricFinderTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/CacheMetricFinderTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/metric/DefaultMetricFinderTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/DefaultMetricFinderTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/notification/DefaultNotificationManagerTest/fixture.xml (renamed from sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/DefaultModelFinderTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/rule/CacheRuleFinderTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/rule/DefaultRuleFinderTest/shared.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectAll.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectAll.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectById.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectById.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert-result.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert-result.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert.xml (renamed from sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert.xml)0
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/user/DefaultUserFinderTest/fixture.xml (renamed from sonar-core/src/test/resources/org/sonar/core/components/DefaultUserFinderTest/fixture.xml)0
-rw-r--r--sonar-server/src/main/java/org/sonar/server/notifications/NotificationService.java4
-rw-r--r--sonar-server/src/main/java/org/sonar/server/platform/Platform.java18
-rw-r--r--sonar-server/src/main/java/org/sonar/server/startup/IndexProjects.java4
-rw-r--r--sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java6
-rw-r--r--sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java5
-rw-r--r--sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/startup/IndexProjectsTest.java4
-rw-r--r--sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java6
172 files changed, 249 insertions, 279 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualViolationInjector.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualViolationInjector.java
index 406745d55d3..fc23165bc4b 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualViolationInjector.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ManualViolationInjector.java
@@ -28,9 +28,9 @@ import org.sonar.api.resources.Resource;
import org.sonar.api.rules.RuleFinder;
import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
-import org.sonar.persistence.review.ReviewDao;
-import org.sonar.persistence.review.ReviewDto;
-import org.sonar.persistence.review.ReviewQuery;
+import org.sonar.core.review.ReviewDao;
+import org.sonar.core.review.ReviewDto;
+import org.sonar.core.review.ReviewQuery;
import java.util.List;
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdater.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdater.java
index 882ddebc4b8..a6198596c0a 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdater.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdater.java
@@ -27,9 +27,9 @@ import org.sonar.api.resources.Resource;
import org.sonar.api.resources.ResourceUtils;
import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
-import org.sonar.persistence.review.ReviewDao;
-import org.sonar.persistence.review.ReviewDto;
-import org.sonar.persistence.review.ReviewQuery;
+import org.sonar.core.review.ReviewDao;
+import org.sonar.core.review.ReviewDto;
+import org.sonar.core.review.ReviewQuery;
import org.sonar.plugins.core.timemachine.ViolationTrackingDecorator;
import java.util.List;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest.java
index 4ca1719de50..720c89cbbe2 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualMeasureDecoratorTest.java
@@ -24,7 +24,7 @@ import org.sonar.api.batch.DecoratorContext;
import org.sonar.api.measures.Metric;
import org.sonar.api.resources.JavaFile;
import org.sonar.api.test.IsMeasure;
-import org.sonar.core.components.DefaultMetricFinder;
+import org.sonar.core.metric.DefaultMetricFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import static org.mockito.Matchers.argThat;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualViolationInjectorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualViolationInjectorTest.java
index ed62cc0c53b..60f8e423163 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualViolationInjectorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ManualViolationInjectorTest.java
@@ -30,9 +30,9 @@ import org.sonar.api.rules.RuleFinder;
import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
import org.sonar.api.utils.DateUtils;
-import org.sonar.persistence.review.ReviewDao;
-import org.sonar.persistence.review.ReviewDto;
-import org.sonar.persistence.review.ReviewQuery;
+import org.sonar.core.review.ReviewDao;
+import org.sonar.core.review.ReviewDto;
+import org.sonar.core.review.ReviewQuery;
import java.util.Arrays;
import java.util.Date;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdaterTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdaterTest.java
index a9803001c34..63a7450a8a9 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdaterTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationSeverityUpdaterTest.java
@@ -30,9 +30,9 @@ import org.sonar.api.resources.Resource;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
-import org.sonar.persistence.review.ReviewDao;
-import org.sonar.persistence.review.ReviewDto;
-import org.sonar.persistence.review.ReviewQuery;
+import org.sonar.core.review.ReviewDao;
+import org.sonar.core.review.ReviewDto;
+import org.sonar.core.review.ReviewQuery;
import java.util.Arrays;
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java
index ae996a82178..878d01b5747 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest.java
@@ -30,7 +30,7 @@ import org.sonar.api.rules.RulePriority;
import org.sonar.api.rules.Violation;
import org.sonar.api.utils.DateUtils;
import org.sonar.batch.index.ResourcePersister;
-import org.sonar.core.components.DefaultRuleFinder;
+import org.sonar.core.rule.DefaultRuleFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.Arrays;
diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarEngine.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarEngine.java
index 06e74995a4e..98b565281be 100644
--- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarEngine.java
+++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/SonarEngine.java
@@ -42,7 +42,7 @@ import org.sonar.duplications.java.JavaTokenProducer;
import org.sonar.duplications.statement.Statement;
import org.sonar.duplications.statement.StatementChunker;
import org.sonar.duplications.token.TokenChunker;
-import org.sonar.persistence.duplication.DuplicationDao;
+import org.sonar.core.duplication.DuplicationDao;
import org.sonar.plugins.cpd.index.DbDuplicationsIndex;
import org.sonar.plugins.cpd.index.SonarDuplicationsIndex;
diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/index/DbDuplicationsIndex.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/index/DbDuplicationsIndex.java
index 755b8e3766a..36304d97225 100644
--- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/index/DbDuplicationsIndex.java
+++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/index/DbDuplicationsIndex.java
@@ -30,8 +30,8 @@ import org.sonar.api.resources.Resource;
import org.sonar.batch.index.ResourcePersister;
import org.sonar.duplications.block.Block;
import org.sonar.duplications.block.ByteArray;
-import org.sonar.persistence.duplication.DuplicationDao;
-import org.sonar.persistence.duplication.DuplicationUnitDto;
+import org.sonar.core.duplication.DuplicationDao;
+import org.sonar.core.duplication.DuplicationUnitDto;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
index 55871f76d0d..b370c60da98 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchDatabase.java
@@ -20,7 +20,7 @@
package org.sonar.batch.bootstrap;
import org.sonar.api.config.Settings;
-import org.sonar.persistence.DefaultDatabase;
+import org.sonar.core.persistence.DefaultDatabase;
import java.util.Properties;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
index 0dbe5c95b97..7c4b48d6929 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchModule.java
@@ -29,10 +29,10 @@ import org.sonar.batch.ProjectConfigurator;
import org.sonar.batch.ProjectTree;
import org.sonar.batch.components.*;
import org.sonar.batch.index.*;
-import org.sonar.core.components.CacheMetricFinder;
-import org.sonar.core.components.CacheRuleFinder;
-import org.sonar.core.components.DefaultUserFinder;
-import org.sonar.core.notifications.DefaultNotificationManager;
+import org.sonar.core.metric.CacheMetricFinder;
+import org.sonar.core.notification.DefaultNotificationManager;
+import org.sonar.core.rule.CacheRuleFinder;
+import org.sonar.core.user.DefaultUserFinder;
import org.sonar.jpa.dao.MeasuresDao;
/**
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
index 62990dc1eef..21f6824c713 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BootstrapModule.java
@@ -30,8 +30,8 @@ import org.sonar.batch.config.BatchSettingsEnhancer;
import org.sonar.jpa.session.DatabaseSessionProvider;
import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
-import org.sonar.persistence.DaoUtils;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.DaoUtils;
+import org.sonar.core.persistence.MyBatis;
import java.net.URLClassLoader;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
index 134c0b0f6d9..99c6c156174 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectModule.java
@@ -39,7 +39,7 @@ import org.sonar.batch.index.DefaultIndex;
import org.sonar.batch.index.DefaultResourcePersister;
import org.sonar.batch.phases.Phases;
import org.sonar.batch.phases.PhasesTimeProfiler;
-import org.sonar.core.components.DefaultModelFinder;
+import org.sonar.core.qualitymodel.DefaultModelFinder;
import org.sonar.jpa.dao.DaoFacade;
import org.sonar.jpa.dao.ProfilesDao;
import org.sonar.jpa.dao.RulesDao;
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
index 278183cc6ae..a681b32dabf 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultResourcePersister.java
@@ -27,7 +27,7 @@ import org.sonar.api.database.model.ResourceModel;
import org.sonar.api.database.model.Snapshot;
import org.sonar.api.resources.*;
import org.sonar.api.utils.SonarException;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import javax.persistence.NonUniqueResultException;
import javax.persistence.Query;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
index 8f5c8a14e5c..7a7877287ea 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
@@ -26,7 +26,7 @@ import org.sonar.api.resources.JavaPackage;
import org.sonar.api.resources.Library;
import org.sonar.api.resources.Project;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import java.text.ParseException;
import java.text.SimpleDateFormat;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
index a1bf89534d4..3d1508676bd 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
@@ -20,7 +20,6 @@
package org.sonar.batch.index;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.sonar.api.database.model.MeasureModel;
import org.sonar.api.database.model.Snapshot;
@@ -31,19 +30,16 @@ import org.sonar.api.measures.PersistenceMode;
import org.sonar.api.resources.JavaFile;
import org.sonar.api.resources.JavaPackage;
import org.sonar.api.resources.Project;
-import org.sonar.core.components.DefaultRuleFinder;
+import org.sonar.core.rule.DefaultRuleFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.List;
-import static org.hamcrest.CoreMatchers.anyOf;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
public class MeasurePersisterTest extends AbstractDbUnitTestCase {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
index dcedc0b8c75..d7d211fab8d 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
@@ -25,7 +25,7 @@ import org.sonar.api.database.model.Snapshot;
import org.sonar.batch.ServerMetadata;
import org.sonar.batch.index.DefaultResourcePersister;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import org.sonar.persistence.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerDao;
import javax.persistence.Query;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDao.java b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDao.java
index 1005824af09..5154fbf40e8 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDao.java
@@ -17,12 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
public class ActiveDashboardDao implements BatchComponent, ServerComponent {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDto.java b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDto.java
index 1a37b1c5022..b5c7b00b507 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardMapper.java b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardMapper.java
index 63b28ecf2fa..e3fd3bdd601 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/ActiveDashboardMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/ActiveDashboardMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
public interface ActiveDashboardMapper {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDao.java b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDao.java
index 8c3754295df..40c0389e69b 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDao.java
@@ -17,12 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
public class DashboardDao implements BatchComponent, ServerComponent {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDto.java b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDto.java
index efe7a2f3407..9559efa5996 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import com.google.common.collect.Lists;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardMapper.java b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardMapper.java
index 1dce842f43a..e5dabe90bfb 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/DashboardMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/DashboardMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
public interface DashboardMapper {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetDto.java b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetDto.java
index 520c098bae0..e38c320140f 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import com.google.common.collect.Lists;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetMapper.java b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetMapper.java
index d84ee52c5a0..39fca3a6ec8 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
public interface WidgetMapper {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyDto.java b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyDto.java
index eeabded8edc..7adcaea0da4 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
public final class WidgetPropertyDto {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyMapper.java b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyMapper.java
index 6a14fb294e8..8b8f155bc8d 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dashboard/WidgetPropertyMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/dashboard/WidgetPropertyMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
public interface WidgetPropertyMapper {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationDao.java b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationDao.java
index b6575f15817..097f794e1a5 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationDao.java
@@ -17,13 +17,13 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.duplication;
+package org.sonar.core.duplication;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
import java.util.Collection;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationMapper.java b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationMapper.java
index 33f93430066..1980cc193a2 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationMapper.java
@@ -17,12 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.duplication;
-
-import java.util.List;
+package org.sonar.core.duplication;
import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
public interface DuplicationMapper {
List<DuplicationUnitDto> selectCandidates(
diff --git a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationUnitDto.java b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationUnitDto.java
index 868c66c43c6..62b744bb199 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/duplication/DuplicationUnitDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/duplication/DuplicationUnitDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.duplication;
+package org.sonar.core.duplication;
/**
* A simple DTO (Data Transfer Object) class that provides the mapping of data to a table.
diff --git a/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java b/sonar-core/src/main/java/org/sonar/core/metric/CacheMetricFinder.java
index 6e2ab843b58..fa4a6b17457 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/CacheMetricFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/metric/CacheMetricFinder.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.metric;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java b/sonar-core/src/main/java/org/sonar/core/metric/DefaultMetricFinder.java
index e3165f32915..1c05f8a7999 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/DefaultMetricFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/metric/DefaultMetricFinder.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.metric;
import com.google.common.collect.Lists;
import org.sonar.api.measures.Metric;
diff --git a/sonar-core/src/main/java/org/sonar/core/notifications/DefaultNotificationManager.java b/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java
index 2db564a2953..ad47882db80 100644
--- a/sonar-core/src/main/java/org/sonar/core/notifications/DefaultNotificationManager.java
+++ b/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java
@@ -17,14 +17,13 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.notifications;
+package org.sonar.core.notification;
import org.sonar.api.database.DatabaseSession;
import org.sonar.api.database.configuration.Property;
import org.sonar.api.database.model.User;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationManager;
-import org.sonar.jpa.entity.NotificationQueueElement;
import org.sonar.jpa.session.DatabaseSessionFactory;
import java.util.Date;
diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/NotificationQueueElement.java b/sonar-core/src/main/java/org/sonar/core/notification/NotificationQueueElement.java
index b1221100509..c93c6b01084 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/entity/NotificationQueueElement.java
+++ b/sonar-core/src/main/java/org/sonar/core/notification/NotificationQueueElement.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.jpa.entity;
+package org.sonar.core.notification;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
@@ -25,11 +25,10 @@ import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.notifications.Notification;
import org.sonar.api.utils.SonarException;
+import javax.persistence.*;
import java.io.*;
import java.util.Date;
-import javax.persistence.*;
-
@Entity
@Table(name = "notifications")
public class NotificationQueueElement {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DaoUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DaoUtils.java
index 4e48002290c..b53150def63 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DaoUtils.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DaoUtils.java
@@ -17,15 +17,15 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
-import org.sonar.persistence.dashboard.ActiveDashboardDao;
-import org.sonar.persistence.dashboard.DashboardDao;
-import org.sonar.persistence.duplication.DuplicationDao;
-import org.sonar.persistence.resource.ResourceIndexerDao;
-import org.sonar.persistence.review.ReviewDao;
-import org.sonar.persistence.rule.RuleDao;
-import org.sonar.persistence.template.LoadedTemplateDao;
+import org.sonar.core.dashboard.ActiveDashboardDao;
+import org.sonar.core.dashboard.DashboardDao;
+import org.sonar.core.duplication.DuplicationDao;
+import org.sonar.core.resource.ResourceIndexerDao;
+import org.sonar.core.review.ReviewDao;
+import org.sonar.core.rule.RuleDao;
+import org.sonar.core.template.LoadedTemplateDao;
import java.util.Arrays;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/Database.java b/sonar-core/src/main/java/org/sonar/core/persistence/Database.java
index 95b9b10b739..b592c933309 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/Database.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/Database.java
@@ -17,9 +17,9 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
-import org.sonar.persistence.dialect.Dialect;
+import org.sonar.core.persistence.dialect.Dialect;
import javax.sql.DataSource;
import java.util.Properties;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DatabaseMigrator.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseMigrator.java
index e5073120369..889bcd2014f 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DatabaseMigrator.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseMigrator.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.ibatis.session.SqlSession;
import org.slf4j.LoggerFactory;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java
index eb3c6fbb0c8..f8b1117898f 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DatabaseUtils.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
/**
* @since 2.13
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DdlUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DdlUtils.java
index ade90def048..95f42e51369 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DdlUtils.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DdlUtils.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.io.output.NullWriter;
import org.apache.ibatis.io.Resources;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/DefaultDatabase.java b/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java
index f18e404485e..ca18563cdeb 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/DefaultDatabase.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DefaultDatabase.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.dbcp.BasicDataSourceFactory;
@@ -27,8 +27,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.config.Settings;
import org.sonar.api.database.DatabaseProperties;
+import org.sonar.core.persistence.dialect.*;
import org.sonar.jpa.session.CustomHibernateConnectionProvider;
-import org.sonar.persistence.dialect.*;
import javax.sql.DataSource;
import java.sql.SQLException;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/MyBatis.java b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java
index a8851e1d598..77509b690d6 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/MyBatis.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/MyBatis.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
@@ -27,18 +27,18 @@ import org.apache.ibatis.session.*;
import org.apache.ibatis.transaction.jdbc.JdbcTransactionFactory;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.dashboard.*;
-import org.sonar.persistence.duplication.DuplicationMapper;
-import org.sonar.persistence.duplication.DuplicationUnitDto;
-import org.sonar.persistence.resource.ResourceDto;
-import org.sonar.persistence.resource.ResourceIndexDto;
-import org.sonar.persistence.resource.ResourceIndexerMapper;
-import org.sonar.persistence.review.ReviewDto;
-import org.sonar.persistence.review.ReviewMapper;
-import org.sonar.persistence.rule.RuleDto;
-import org.sonar.persistence.rule.RuleMapper;
-import org.sonar.persistence.template.LoadedTemplateDto;
-import org.sonar.persistence.template.LoadedTemplateMapper;
+import org.sonar.core.dashboard.*;
+import org.sonar.core.duplication.DuplicationMapper;
+import org.sonar.core.duplication.DuplicationUnitDto;
+import org.sonar.core.resource.ResourceDto;
+import org.sonar.core.resource.ResourceIndexDto;
+import org.sonar.core.resource.ResourceIndexerMapper;
+import org.sonar.core.review.ReviewDto;
+import org.sonar.core.review.ReviewMapper;
+import org.sonar.core.rule.RuleDto;
+import org.sonar.core.rule.RuleMapper;
+import org.sonar.core.template.LoadedTemplateDto;
+import org.sonar.core.template.LoadedTemplateMapper;
import java.io.IOException;
import java.io.InputStream;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/Derby.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Derby.java
index 0377f2a0277..8cd143530d5 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/Derby.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Derby.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.dialect.DerbyDialect;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/Dialect.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Dialect.java
index 8ba4d9b5e55..26550498cda 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/Dialect.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Dialect.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
/**
* @since 1.12
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/DialectUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/DialectUtils.java
index 672dd86a7fc..9a6fb48d5a1 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/DialectUtils.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/DialectUtils.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/MsSql.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/MsSql.java
index 6a09b80092d..0e421ff50b9 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/MsSql.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/MsSql.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.HibernateException;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/MySql.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/MySql.java
index a35b7f2540c..9f5def8316a 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/MySql.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/MySql.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.dialect.MySQLDialect;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/Oracle.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Oracle.java
index ae1f5ee69ef..7ecc4b5f0f5 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/Oracle.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/Oracle.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.dialect.Oracle10gDialect;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/OracleSequenceGenerator.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/OracleSequenceGenerator.java
index f1a30f368c3..63501c69ac8 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/OracleSequenceGenerator.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/OracleSequenceGenerator.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.MappingException;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSQLSequenceGenerator.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGenerator.java
index 1c22d307bf8..514b204e8be 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSQLSequenceGenerator.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGenerator.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hibernate.MappingException;
import org.hibernate.dialect.Dialect;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSql.java b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSql.java
index 67c494fa625..4bf34c5d5bf 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/dialect/PostgreSql.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/dialect/PostgreSql.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.apache.commons.lang.StringUtils;
import org.hibernate.dialect.PostgreSQLDialect;
diff --git a/sonar-core/src/main/java/org/sonar/core/plugins/ResourcesClassloader.java b/sonar-core/src/main/java/org/sonar/core/plugins/ResourcesClassloader.java
index 77b1b027ddc..9f3d21d6044 100644
--- a/sonar-core/src/main/java/org/sonar/core/plugins/ResourcesClassloader.java
+++ b/sonar-core/src/main/java/org/sonar/core/plugins/ResourcesClassloader.java
@@ -19,9 +19,8 @@
*/
package org.sonar.core.plugins;
-import org.apache.commons.lang.StringUtils;
-
import com.google.common.collect.Lists;
+import org.apache.commons.lang.StringUtils;
import java.net.URL;
import java.net.URLClassLoader;
diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java b/sonar-core/src/main/java/org/sonar/core/qualitymodel/DefaultModelFinder.java
index cbddb421088..ed5ccb4715e 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/DefaultModelFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/qualitymodel/DefaultModelFinder.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.qualitymodel;
import org.sonar.api.database.DatabaseSession;
import org.sonar.api.qualitymodel.Model;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceDto.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java
index dae63fc5c59..50a13d74245 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
+package org.sonar.core.resource;
public final class ResourceDto {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexDto.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexDto.java
index d7139183d33..4dde422278f 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
+package org.sonar.core.resource;
public final class ResourceIndexDto {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerDao.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerDao.java
index fdbe6818d0d..0aa11816fd6 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerDao.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
+package org.sonar.core.resource;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
@@ -25,7 +25,7 @@ import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.SqlSession;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
public class ResourceIndexerDao {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerFilter.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerFilter.java
index fe038623575..73b2aea748b 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerFilter.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerFilter.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
+package org.sonar.core.resource;
public final class ResourceIndexerFilter {
private boolean enabled = true;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerMapper.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerMapper.java
index 2fd1ad13fe5..b4d0ef63b0b 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/resource/ResourceIndexerMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceIndexerMapper.java
@@ -17,11 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
-
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
+package org.sonar.core.resource;
public interface ResourceIndexerMapper {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewDao.java b/sonar-core/src/main/java/org/sonar/core/review/ReviewDao.java
index 1e2964b0929..73dd5514cf1 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/ReviewDao.java
@@ -17,13 +17,13 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.review;
+package org.sonar.core.review;
import com.google.common.collect.Lists;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewDto.java b/sonar-core/src/main/java/org/sonar/core/review/ReviewDto.java
index 9ce6eeb6d41..8d46999133c 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/ReviewDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.review;
+package org.sonar.core.review;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewMapper.java b/sonar-core/src/main/java/org/sonar/core/review/ReviewMapper.java
index dccdb518eb9..e2c2f879cf0 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/ReviewMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.review;
+package org.sonar.core.review;
import org.apache.ibatis.annotations.Param;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewQuery.java b/sonar-core/src/main/java/org/sonar/core/review/ReviewQuery.java
index ed649d62840..6cecb75e3b5 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/review/ReviewQuery.java
+++ b/sonar-core/src/main/java/org/sonar/core/review/ReviewQuery.java
@@ -17,10 +17,10 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.review;
+package org.sonar.core.review;
import com.google.common.collect.Lists;
-import org.sonar.persistence.DatabaseUtils;
+import org.sonar.core.persistence.DatabaseUtils;
import java.util.Collection;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java b/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java
index ab1477ec8f6..35165a88386 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/CacheRuleFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/rule/CacheRuleFinder.java
@@ -17,13 +17,14 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.rule;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.Maps;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleQuery;
+import org.sonar.core.rule.DefaultRuleFinder;
import org.sonar.jpa.session.DatabaseSessionFactory;
import java.util.Map;
diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java b/sonar-core/src/main/java/org/sonar/core/rule/DefaultRuleFinder.java
index a69e4c7dcd2..ce1e23c1dba 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/DefaultRuleFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/rule/DefaultRuleFinder.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.rule;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.database.DatabaseSession;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleDao.java b/sonar-core/src/main/java/org/sonar/core/rule/RuleDao.java
index 0843ca8728b..10171a4f7e4 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/rule/RuleDao.java
@@ -17,12 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.rule;
+package org.sonar.core.rule;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleDto.java b/sonar-core/src/main/java/org/sonar/core/rule/RuleDto.java
index 4986ac6e5ad..31e1993465b 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/rule/RuleDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.rule;
+package org.sonar.core.rule;
public final class RuleDto {
private Long id;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleMapper.java b/sonar-core/src/main/java/org/sonar/core/rule/RuleMapper.java
index c82eee8c805..0447c6276d1 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/rule/RuleMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/rule/RuleMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.rule;
+package org.sonar.core.rule;
import java.util.List;
diff --git a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDao.java b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDao.java
index 77c6d3dcf6c..c9ea6fb1bf6 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDao.java
+++ b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDao.java
@@ -17,12 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.template;
+package org.sonar.core.template;
import org.apache.ibatis.session.SqlSession;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
-import org.sonar.persistence.MyBatis;
+import org.sonar.core.persistence.MyBatis;
public class LoadedTemplateDao implements BatchComponent, ServerComponent {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDto.java b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java
index c3d46286ec0..c0c4f606aac 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.template;
+package org.sonar.core.template;
public final class LoadedTemplateDto {
diff --git a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateMapper.java b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateMapper.java
index 454656d85e7..fa8642f2dd2 100644
--- a/sonar-core/src/main/java/org/sonar/persistence/template/LoadedTemplateMapper.java
+++ b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateMapper.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.template;
+package org.sonar.core.template;
import org.apache.ibatis.annotations.Param;
diff --git a/sonar-core/src/main/java/org/sonar/core/components/DefaultUserFinder.java b/sonar-core/src/main/java/org/sonar/core/user/DefaultUserFinder.java
index 0545b9bc93d..6f25dfe282a 100644
--- a/sonar-core/src/main/java/org/sonar/core/components/DefaultUserFinder.java
+++ b/sonar-core/src/main/java/org/sonar/core/user/DefaultUserFinder.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.user;
import org.sonar.api.database.DatabaseSession;
import org.sonar.api.database.model.User;
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
index e0a5d739d68..319b43680cb 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
@@ -22,9 +22,9 @@ package org.sonar.jpa.session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.utils.Logs;
+import org.sonar.core.persistence.Database;
+import org.sonar.core.persistence.dialect.Dialect;
import org.sonar.jpa.entity.SchemaMigration;
-import org.sonar.persistence.Database;
-import org.sonar.persistence.dialect.Dialect;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java
index 2f793c3e75d..86ecf433266 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/session/DatabaseConnector.java
@@ -19,7 +19,7 @@
*/
package org.sonar.jpa.session;
-import org.sonar.persistence.dialect.Dialect;
+import org.sonar.core.persistence.dialect.Dialect;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/DefaultDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/DefaultDatabaseConnector.java
index b1bed908691..6f8fa1b510d 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/session/DefaultDatabaseConnector.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/session/DefaultDatabaseConnector.java
@@ -20,8 +20,8 @@
package org.sonar.jpa.session;
import org.sonar.api.utils.SonarException;
+import org.sonar.core.persistence.Database;
import org.sonar.jpa.entity.SchemaMigration;
-import org.sonar.persistence.Database;
import java.sql.Connection;
import java.sql.SQLException;
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java
index bf32e2cc8ca..0db2ded977c 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/session/MemoryDatabaseConnector.java
@@ -19,8 +19,8 @@
*/
package org.sonar.jpa.session;
+import org.sonar.core.persistence.Database;
import org.sonar.jpa.entity.SchemaMigration;
-import org.sonar.persistence.Database;
import javax.persistence.EntityManager;
diff --git a/sonar-core/src/main/resources/META-INF/persistence.xml b/sonar-core/src/main/resources/META-INF/persistence.xml
index 17940cd5f5b..6e3835253fb 100644
--- a/sonar-core/src/main/resources/META-INF/persistence.xml
+++ b/sonar-core/src/main/resources/META-INF/persistence.xml
@@ -35,7 +35,7 @@
<class>org.sonar.api.rules.ActiveRuleChange</class>
<class>org.sonar.api.rules.ActiveRuleParamChange</class>
<class>org.sonar.jpa.entity.Review</class>
- <class>org.sonar.jpa.entity.NotificationQueueElement</class>
+ <class>org.sonar.core.notification.NotificationQueueElement</class>
<properties>
<property name="hibernate.current_session_context_class" value="thread"/>
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper-oracle.xml
index e239f77a17f..726c84afbc0 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.ActiveDashboardMapper">
+<mapper namespace="org.sonar.core.dashboard.ActiveDashboardMapper">
<insert id="insert" parameterType="ActiveDashboard" keyColumn="id" useGeneratedKeys="true" keyProperty ="id">
<selectKey order="BEFORE" resultType="Long" keyProperty="id" >
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml
index 9b4b2220b5b..fad6ff5c9bd 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/ActiveDashboardMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/ActiveDashboardMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.ActiveDashboardMapper">
+<mapper namespace="org.sonar.core.dashboard.ActiveDashboardMapper">
<insert id="insert" parameterType="ActiveDashboard" useGeneratedKeys="true" keyProperty ="id">
INSERT INTO active_dashboards (dashboard_id, user_id, order_index)
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper-oracle.xml
index 3e7a66ff070..fe6fef5134e 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.DashboardMapper">
+<mapper namespace="org.sonar.core.dashboard.DashboardMapper">
<select id="selectGlobalDashboard" parameterType="string" resultType="Dashboard">
select id, user_id as "userId", name, description, column_layout as "columnLayout", shared, created_at as "createdAt", updated_at as "updatedAt"
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml
index 3cb07d02a72..1666b842978 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/DashboardMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/DashboardMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.DashboardMapper">
+<mapper namespace="org.sonar.core.dashboard.DashboardMapper">
<select id="selectGlobalDashboard" parameterType="string" resultType="Dashboard">
select id, user_id as "userId", name, description, column_layout as "columnLayout", shared, created_at as "createdAt", updated_at as "updatedAt"
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper-oracle.xml
index 328fd919710..c0cd07c75f5 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.WidgetMapper">
+<mapper namespace="org.sonar.core.dashboard.WidgetMapper">
<insert id="insert" parameterType="Widget" keyColumn="id" useGeneratedKeys="true" keyProperty ="id">
<selectKey order="BEFORE" resultType="Long" keyProperty="id" >
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml
index 3d9598bc2cd..e5346f86178 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.WidgetMapper">
+<mapper namespace="org.sonar.core.dashboard.WidgetMapper">
<insert id="insert" parameterType="Widget" useGeneratedKeys="true" keyProperty ="id">
INSERT INTO widgets (dashboard_id, widget_key, name, description, column_index, row_index, configured, created_at, updated_at)
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper-oracle.xml
index e3cf5c803f4..4bf30699d67 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.WidgetPropertyMapper">
+<mapper namespace="org.sonar.core.dashboard.WidgetPropertyMapper">
<insert id="insert" parameterType="WidgetProperty" keyColumn="id" useGeneratedKeys="false" keyProperty="id">
INSERT INTO widget_properties (id, widget_id, kee, text_value)
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper.xml b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml
index 0ce1248fa27..99abdec67f0 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/dashboard/WidgetPropertyMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/dashboard/WidgetPropertyMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.dashboard.WidgetPropertyMapper">
+<mapper namespace="org.sonar.core.dashboard.WidgetPropertyMapper">
<insert id="insert" parameterType="WidgetProperty" useGeneratedKeys="true" keyProperty="id">
INSERT INTO widget_properties (widget_id, kee, text_value)
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-mssql.xml b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-mssql.xml
index c2577c58ef8..57d2a21257b 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-mssql.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-mssql.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.duplication.DuplicationMapper">
+<mapper namespace="org.sonar.core.duplication.DuplicationMapper">
<select id="selectCandidates" parameterType="map" resultType="DuplicationUnit">
SELECT DISTINCT to_blocks.hash hash, res.kee resourceKey, to_blocks.index_in_file indexInFile, to_blocks.start_line startLine, to_blocks.end_line endLine
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-oracle.xml
index c2577c58ef8..57d2a21257b 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.duplication.DuplicationMapper">
+<mapper namespace="org.sonar.core.duplication.DuplicationMapper">
<select id="selectCandidates" parameterType="map" resultType="DuplicationUnit">
SELECT DISTINCT to_blocks.hash hash, res.kee resourceKey, to_blocks.index_in_file indexInFile, to_blocks.start_line startLine, to_blocks.end_line endLine
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper.xml b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml
index 1dc84fbad26..1b68f8afbc1 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/duplication/DuplicationMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/duplication/DuplicationMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.duplication.DuplicationMapper">
+<mapper namespace="org.sonar.core.duplication.DuplicationMapper">
<select id="selectCandidates" parameterType="map" resultType="DuplicationUnit">
SELECT DISTINCT to_blocks.hash hash, res.kee resourceKey, to_blocks.index_in_file indexInFile, to_blocks.start_line startLine, to_blocks.end_line endLine
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/resource/ResourceIndexerMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceIndexerMapper.xml
index 62e58dfcd51..4fcf08b84fd 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/resource/ResourceIndexerMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceIndexerMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.resource.ResourceIndexerMapper">
+<mapper namespace="org.sonar.core.resource.ResourceIndexerMapper">
<select id="selectResourcesToIndex" parameterType="map" resultType="Resource">
select id, root_id as "rootId", name, scope, qualifier
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/review/ReviewMapper.xml b/sonar-core/src/main/resources/org/sonar/core/review/ReviewMapper.xml
index d3182a1c046..5ccb4e72519 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/review/ReviewMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/review/ReviewMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.review.ReviewMapper">
+<mapper namespace="org.sonar.core.review.ReviewMapper">
<resultMap id="reviewResultMap" type="Review">
<result property="createdAt" column="created_at"/>
@@ -32,7 +32,7 @@
from reviews where resource_id=#{id}
</select>
- <select id="selectByQuery" parameterType="org.sonar.persistence.review.ReviewQuery" resultMap="reviewResultMap">
+ <select id="selectByQuery" parameterType="org.sonar.core.review.ReviewQuery" resultMap="reviewResultMap">
select
<include refid="reviewColumns"/>
from reviews
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/rule/RuleMapper.xml b/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml
index 23f776ccfcc..246e06da204 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/rule/RuleMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/rule/RuleMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.rule.RuleMapper">
+<mapper namespace="org.sonar.core.rule.RuleMapper">
<select id="selectAll" resultType="Rule">
select id, plugin_rule_key as "ruleKey", plugin_name as "repositoryKey", description, enabled, name from rules
</select>
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper-oracle.xml b/sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper-oracle.xml
index 56b625e8489..61b5d507111 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper-oracle.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper-oracle.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.template.LoadedTemplateMapper">
+<mapper namespace="org.sonar.core.template.LoadedTemplateMapper">
<resultMap id="loadedTemplateResultMap" type="LoadedTemplate">
<result property="id" column="id"/>
diff --git a/sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper.xml b/sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper.xml
index bad88abb25c..67342449f4a 100644
--- a/sonar-core/src/main/resources/org/sonar/persistence/template/LoadedTemplateMapper.xml
+++ b/sonar-core/src/main/resources/org/sonar/core/template/LoadedTemplateMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sonar.persistence.template.LoadedTemplateMapper">
+<mapper namespace="org.sonar.core.template.LoadedTemplateMapper">
<resultMap id="loadedTemplateResultMap" type="LoadedTemplate">
<result property="id" column="id"/>
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dashboard/ActiveDashboardDaoTest.java b/sonar-core/src/test/java/org/sonar/core/dashboard/ActiveDashboardDaoTest.java
index 4f68be3ef85..8b2f7f4ee60 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dashboard/ActiveDashboardDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/dashboard/ActiveDashboardDaoTest.java
@@ -17,11 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
+import org.sonar.core.persistence.DaoTestCase;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dashboard/DashboardDaoTest.java b/sonar-core/src/test/java/org/sonar/core/dashboard/DashboardDaoTest.java
index d63bfb871e5..6f12e07f82c 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dashboard/DashboardDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/dashboard/DashboardDaoTest.java
@@ -17,11 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dashboard;
+package org.sonar.core.dashboard;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
+import org.sonar.core.persistence.DaoTestCase;
import java.util.Date;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/duplication/DuplicationDaoTest.java b/sonar-core/src/test/java/org/sonar/core/duplication/DuplicationDaoTest.java
index 88632baf0a1..8c6706526b2 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/duplication/DuplicationDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/duplication/DuplicationDaoTest.java
@@ -17,19 +17,17 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.duplication;
+package org.sonar.core.duplication;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
+import org.junit.Before;
+import org.junit.Test;
+import org.sonar.core.persistence.DaoTestCase;
import java.util.Arrays;
import java.util.List;
-import org.junit.Before;
-import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
-import org.sonar.persistence.duplication.DuplicationDao;
-import org.sonar.persistence.duplication.DuplicationUnitDto;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
public class DuplicationDaoTest extends DaoTestCase {
diff --git a/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java b/sonar-core/src/test/java/org/sonar/core/metric/CacheMetricFinderTest.java
index 813740c7e6c..f50f84a580b 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/CacheMetricFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/metric/CacheMetricFinderTest.java
@@ -17,10 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.metric;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.core.metric.CacheMetricFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.Arrays;
diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java b/sonar-core/src/test/java/org/sonar/core/metric/DefaultMetricFinderTest.java
index cfb615d5da5..74311fce355 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/DefaultMetricFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/metric/DefaultMetricFinderTest.java
@@ -17,10 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.metric;
import org.junit.Before;
import org.junit.Test;
+import org.sonar.core.metric.DefaultMetricFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.Arrays;
diff --git a/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java
index ae661ae43cc..85bd7b0f495 100644
--- a/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java
@@ -17,18 +17,17 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.notifications;
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
+package org.sonar.core.notification;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.notifications.Notification;
-import org.sonar.jpa.entity.NotificationQueueElement;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.junit.Assert.assertThat;
+
public class DefaultNotificationManagerTest extends AbstractDbUnitTestCase {
private DefaultNotificationManager manager;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DaoTestCase.java b/sonar-core/src/test/java/org/sonar/core/persistence/DaoTestCase.java
index 0806dea79cc..31bbc452b09 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DaoTestCase.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DaoTestCase.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.io.IOUtils;
import org.dbunit.Assertion;
@@ -29,11 +29,8 @@ import org.dbunit.database.IDatabaseConnection;
import org.dbunit.dataset.*;
import org.dbunit.dataset.filter.DefaultColumnFilter;
import org.dbunit.dataset.xml.FlatXmlDataSet;
-import org.dbunit.ext.mssql.InsertIdentityOperation;
-import org.dbunit.operation.DatabaseOperation;
import org.junit.*;
import org.sonar.api.config.Settings;
-import org.sonar.persistence.*;
import java.io.InputStream;
import java.io.StringWriter;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DaoUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java
index 9a6459dc21a..6765342327d 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DaoUtilsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DaoUtilsTest.java
@@ -17,10 +17,9 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.junit.Test;
-import org.sonar.persistence.DaoUtils;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.Assert.assertThat;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DatabaseCommands.java b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseCommands.java
index 2f841413d8d..1e2bc711e95 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DatabaseCommands.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DatabaseCommands.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.lang.StringUtils;
import org.dbunit.dataset.datatype.DefaultDataTypeFactory;
@@ -28,7 +28,7 @@ import org.dbunit.ext.mysql.MySqlDataTypeFactory;
import org.dbunit.ext.oracle.Oracle10DataTypeFactory;
import org.dbunit.ext.postgresql.PostgresqlDataTypeFactory;
import org.dbunit.operation.DatabaseOperation;
-import org.sonar.persistence.dialect.*;
+import org.sonar.core.persistence.dialect.*;
import java.util.Arrays;
import java.util.List;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DdlUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java
index 0eb67a0ce1f..276b15e3036 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DdlUtilsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DdlUtilsTest.java
@@ -17,11 +17,10 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.derby.jdbc.EmbeddedDriver;
import org.hamcrest.core.Is;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.sql.Connection;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DefaultDatabaseTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java
index a1a6cdf1ae3..c8ff67bda46 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DefaultDatabaseTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DefaultDatabaseTest.java
@@ -17,14 +17,14 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.dbcp.BasicDataSource;
import org.hamcrest.core.Is;
import org.junit.Test;
import org.sonar.api.config.Settings;
-import org.sonar.persistence.dialect.Oracle;
-import org.sonar.persistence.dialect.PostgreSql;
+import org.sonar.core.persistence.dialect.Oracle;
+import org.sonar.core.persistence.dialect.PostgreSql;
import java.sql.SQLException;
import java.util.Properties;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/DerbyUtils.java b/sonar-core/src/test/java/org/sonar/core/persistence/DerbyUtils.java
index a7d27345aa1..cdff01cb574 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/DerbyUtils.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/DerbyUtils.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import java.io.OutputStream;
import java.sql.DriverManager;
@@ -38,7 +38,7 @@ public final class DerbyUtils {
* See http://db.apache.org/derby/docs/10.7/ref/rrefproper33027.html
*/
public static void fixDerbyLogs() {
- System.setProperty("derby.stream.error.field", "org.sonar.persistence.DerbyUtils.DEV_NULL");
+ System.setProperty("derby.stream.error.field", "org.sonar.core.persistence.DerbyUtils.DEV_NULL");
}
public static void dropInMemoryDatabase() {
diff --git a/sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabase.java b/sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabase.java
index a705e503c91..5c305a61fca 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabase.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabase.java
@@ -17,14 +17,14 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.dbcp.BasicDataSourceFactory;
import org.hibernate.cfg.Environment;
+import org.sonar.core.persistence.dialect.Derby;
+import org.sonar.core.persistence.dialect.Dialect;
import org.sonar.jpa.session.CustomHibernateConnectionProvider;
-import org.sonar.persistence.dialect.Derby;
-import org.sonar.persistence.dialect.Dialect;
import javax.sql.DataSource;
import java.sql.*;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabaseTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabaseTest.java
index f9f985609f5..4b47a3c1da6 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/InMemoryDatabaseTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/InMemoryDatabaseTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.commons.dbcp.BasicDataSource;
import org.hamcrest.core.Is;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/MyBatisTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/MyBatisTest.java
index 3807f1e625c..8831eebb323 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/MyBatisTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/MyBatisTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence;
+package org.sonar.core.persistence;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.ExecutorType;
@@ -26,7 +26,7 @@ import org.hamcrest.core.Is;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.sonar.persistence.rule.RuleMapper;
+import org.sonar.core.rule.RuleMapper;
import java.io.IOException;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/DerbyTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DerbyTest.java
index 130e68f3886..93e743077c7 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/DerbyTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DerbyTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/DialectUtilsTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java
index b0a47867c87..25636d556e6 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/DialectUtilsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/DialectUtilsTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hamcrest.core.Is;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/MsSqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java
index 589d0cd3875..161e9a6d0ce 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/MsSqlTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MsSqlTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/MySqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java
index d3268392ae4..08498ce1f5b 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/MySqlTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/MySqlTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/OracleSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java
index 96a144a33e4..4aa40b03338 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/OracleSequenceGeneratorTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleSequenceGeneratorTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hibernate.id.PersistentIdentifierGenerator;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/OracleTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java
index 43ccd7f24a1..2478dd5a384 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/OracleTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/OracleTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hamcrest.core.Is;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSQLSequenceGeneratorTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java
index 8dc84f4336c..7d20f9b64c7 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSQLSequenceGeneratorTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSQLSequenceGeneratorTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hibernate.id.PersistentIdentifierGenerator;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSqlTest.java b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java
index 84647a986ff..dbf36e94758 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/dialect/PostgreSqlTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/persistence/dialect/PostgreSqlTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.dialect;
+package org.sonar.core.persistence.dialect;
import org.hamcrest.core.Is;
import org.junit.Test;
diff --git a/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java b/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java
index 61fed39e147..8798f3ee4f1 100644
--- a/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/plugins/DefaultPluginMetadataTest.java
@@ -19,19 +19,14 @@
*/
package org.sonar.core.plugins;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import org.hamcrest.CoreMatchers;
import org.hamcrest.core.Is;
import org.junit.Test;
import org.sonar.api.platform.PluginMetadata;
import java.io.File;
-import java.util.*;
+import java.util.Arrays;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
public class DefaultPluginMetadataTest {
diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java b/sonar-core/src/test/java/org/sonar/core/qualitymodel/DefaultModelFinderTest.java
index 0b96ed82e26..2f7e3346215 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/DefaultModelFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/qualitymodel/DefaultModelFinderTest.java
@@ -17,11 +17,10 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.qualitymodel;
import org.junit.Test;
import org.sonar.api.qualitymodel.Model;
-import org.sonar.core.components.DefaultModelFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import static org.junit.Assert.assertNotNull;
diff --git a/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java b/sonar-core/src/test/java/org/sonar/core/qualitymodel/ModelTest.java
index 92ed7f0dad7..0d93c737a8e 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/ModelTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/qualitymodel/ModelTest.java
@@ -17,7 +17,7 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.qualitymodel;
import org.junit.Test;
import org.sonar.api.qualitymodel.Characteristic;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/resource/ResourceIndexerDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceIndexerDaoTest.java
index c23b4dd554c..fba523f1efb 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/resource/ResourceIndexerDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceIndexerDaoTest.java
@@ -17,13 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.resource;
+package org.sonar.core.resource;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
-
-import java.util.Arrays;
+import org.sonar.core.persistence.DaoTestCase;
public class ResourceIndexerDaoTest extends DaoTestCase {
diff --git a/sonar-core/src/test/java/org/sonar/persistence/review/ReviewDaoTest.java b/sonar-core/src/test/java/org/sonar/core/review/ReviewDaoTest.java
index 710edbf28b0..5f0f55a5eea 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/review/ReviewDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/review/ReviewDaoTest.java
@@ -17,14 +17,14 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.review;
+package org.sonar.core.review;
import com.google.common.collect.Lists;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
+import org.sonar.core.persistence.DaoTestCase;
import java.util.List;
diff --git a/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java b/sonar-core/src/test/java/org/sonar/core/rule/CacheRuleFinderTest.java
index bbf0201ed4d..d7adfa0a5a0 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/CacheRuleFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/rule/CacheRuleFinderTest.java
@@ -17,11 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.rule;
import org.junit.Test;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleFinder;
+import org.sonar.core.rule.CacheRuleFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import static org.hamcrest.CoreMatchers.nullValue;
diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java b/sonar-core/src/test/java/org/sonar/core/rule/DefaultRuleFinderTest.java
index 0d5ce6b71b9..c5ddaed6310 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/DefaultRuleFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/rule/DefaultRuleFinderTest.java
@@ -17,12 +17,13 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
+package org.sonar.core.rule;
import org.junit.Test;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleFinder;
import org.sonar.api.rules.RuleQuery;
+import org.sonar.core.rule.DefaultRuleFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
import java.util.Collection;
diff --git a/sonar-core/src/test/java/org/sonar/persistence/rule/RuleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java
index 1c40ae38ab6..7a68afd7160 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/rule/RuleDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java
@@ -17,13 +17,12 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.rule;
+package org.sonar.core.rule;
import org.hamcrest.core.Is;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
-import org.sonar.persistence.rule.RuleDao;
+import org.sonar.core.persistence.DaoTestCase;
import java.util.List;
@@ -41,10 +40,10 @@ public class RuleDaoTest extends DaoTestCase {
@Test
public void testSelectAll() throws Exception {
setupData("selectAll");
- List<org.sonar.persistence.rule.RuleDto> ruleDtos = dao.selectAll();
+ List<RuleDto> ruleDtos = dao.selectAll();
assertThat(ruleDtos.size(), Is.is(1));
- org.sonar.persistence.rule.RuleDto ruleDto = ruleDtos.get(0);
+ RuleDto ruleDto = ruleDtos.get(0);
assertThat(ruleDto.getId(), Is.is(1L));
assertThat(ruleDto.getName(), Is.is("Avoid Null"));
assertThat(ruleDto.getDescription(), Is.is("Should avoid NULL"));
@@ -55,7 +54,7 @@ public class RuleDaoTest extends DaoTestCase {
@Test
public void testSelectById() throws Exception {
setupData("selectById");
- org.sonar.persistence.rule.RuleDto ruleDto = dao.selectById(2L);
+ RuleDto ruleDto = dao.selectById(2L);
assertThat(ruleDto.getId(), Is.is(2L));
assertThat(ruleDto.getName(), Is.is("Avoid Null"));
diff --git a/sonar-core/src/test/java/org/sonar/persistence/template/LoadedTemplateDaoTest.java b/sonar-core/src/test/java/org/sonar/core/template/LoadedTemplateDaoTest.java
index a229272c193..d74bbf0616f 100644
--- a/sonar-core/src/test/java/org/sonar/persistence/template/LoadedTemplateDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/template/LoadedTemplateDaoTest.java
@@ -17,11 +17,11 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.persistence.template;
+package org.sonar.core.template;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.persistence.DaoTestCase;
+import org.sonar.core.persistence.DaoTestCase;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
diff --git a/sonar-core/src/test/java/org/sonar/core/components/DefaultUserFinderTest.java b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java
index 16a6275d224..ed8935bc137 100644
--- a/sonar-core/src/test/java/org/sonar/core/components/DefaultUserFinderTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/user/DefaultUserFinderTest.java
@@ -17,18 +17,19 @@
* License along with Sonar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
-package org.sonar.core.components;
-
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.nullValue;
-import static org.junit.Assert.assertThat;
+package org.sonar.core.user;
import org.junit.Before;
import org.junit.Test;
import org.sonar.api.database.model.User;
import org.sonar.api.security.UserFinder;
+import org.sonar.core.user.DefaultUserFinder;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.junit.Assert.assertThat;
+
public class DefaultUserFinderTest extends AbstractDbUnitTestCase {
private UserFinder userFinder;
diff --git a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java
index f17496a6d55..0f57e0535d5 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/dao/RulesDaoTest.java
@@ -21,11 +21,9 @@ package org.sonar.jpa.dao;
import org.junit.Before;
import org.junit.Test;
-import org.sonar.api.profiles.RulesProfile;
-import org.sonar.api.rules.*;
+import org.sonar.api.rules.Rule;
import org.sonar.jpa.test.AbstractDbUnitTestCase;
-import java.util.Arrays;
import java.util.List;
import static org.hamcrest.CoreMatchers.*;
diff --git a/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java b/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java
index e4cf53ae4cf..fa647f96484 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/entity/SchemaMigrationTest.java
@@ -20,9 +20,9 @@
package org.sonar.jpa.entity;
import org.junit.Test;
+import org.sonar.core.persistence.Database;
+import org.sonar.core.persistence.InMemoryDatabase;
import org.sonar.jpa.session.MemoryDatabaseConnector;
-import org.sonar.persistence.Database;
-import org.sonar.persistence.InMemoryDatabase;
import java.sql.Connection;
diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/JpaDatabaseSessionTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/JpaDatabaseSessionTest.java
index 697fe1ec035..eca0e2c8e90 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/session/JpaDatabaseSessionTest.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/session/JpaDatabaseSessionTest.java
@@ -19,22 +19,20 @@
*/
package org.sonar.jpa.session;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
+import com.google.common.collect.Maps;
import org.junit.Before;
import org.junit.Test;
-import com.google.common.collect.Maps;
-
+import javax.persistence.NonUniqueResultException;
+import javax.persistence.Query;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
-import javax.persistence.NonUniqueResultException;
-import javax.persistence.Query;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
public class JpaDatabaseSessionTest {
diff --git a/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java b/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java
index 6e073148d42..f69395dc643 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/session/ThreadLocalDatabaseSessionFactoryTest.java
@@ -20,9 +20,6 @@
package org.sonar.jpa.session;
import org.junit.Test;
-import org.sonar.api.database.DatabaseSession;
-
-import static org.junit.Assert.assertTrue;
public class ThreadLocalDatabaseSessionFactoryTest {
diff --git a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
index da7b2fca1c7..b70d9561888 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
@@ -33,6 +33,9 @@ import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.sonar.api.database.DatabaseSession;
+import org.sonar.core.persistence.Database;
+import org.sonar.core.persistence.InMemoryDatabase;
+import org.sonar.core.persistence.MyBatis;
import org.sonar.jpa.dao.DaoFacade;
import org.sonar.jpa.dao.MeasuresDao;
import org.sonar.jpa.dao.ProfilesDao;
@@ -41,9 +44,6 @@ import org.sonar.jpa.session.DatabaseSessionFactory;
import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.JpaDatabaseSession;
import org.sonar.jpa.session.MemoryDatabaseConnector;
-import org.sonar.persistence.Database;
-import org.sonar.persistence.InMemoryDatabase;
-import org.sonar.persistence.MyBatis;
import java.io.InputStream;
import java.io.StringWriter;
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/empty.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/empty.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/empty.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml
index 2afd93017a3..2afd93017a3 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldGetMaxOrderIndexForNullUser.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml
index 32c63e7b7c8..32c63e7b7c8 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsert.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsert.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml
index 6bdcf4d6182..6bdcf4d6182 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/ActiveDashboardDaoTest/shouldInsertWithNoUser-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert-result.xml
index 8c4415d3657..8c4415d3657 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsert.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsert.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml
index a60907fc455..a60907fc455 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldInsertWithNullableColumns-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml
index ab98303c344..ab98303c344 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/dashboard/DashboardDaoTest/shouldSelectGlobalDashboard.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldGetByHash.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml
index 4f821a44e31..4f821a44e31 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldGetByHash.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldGetByHash.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml
index 7149a08ee8c..7149a08ee8c 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert.xml b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml
index e0efcf156c4..e0efcf156c4 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/duplication/DuplicationDaoTest/shouldInsert.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/duplication/DuplicationDaoTest/shouldInsert.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/CacheMetricFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/metric/CacheMetricFinderTest/shared.xml
index 85709bcbf98..85709bcbf98 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/CacheMetricFinderTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/metric/CacheMetricFinderTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/DefaultMetricFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/metric/DefaultMetricFinderTest/shared.xml
index 85709bcbf98..85709bcbf98 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/DefaultMetricFinderTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/metric/DefaultMetricFinderTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml b/sonar-core/src/test/resources/org/sonar/core/notification/DefaultNotificationManagerTest/fixture.xml
index acae954e294..acae954e294 100644
--- a/sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/notification/DefaultNotificationManagerTest/fixture.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/DefaultModelFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml
index c26de5371bb..c26de5371bb 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/DefaultModelFinderTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/qualitymodel/DefaultModelFinderTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml
index 2f35b67259d..2f35b67259d 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml
index 66686dff07a..66686dff07a 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexAllResources.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml
index 0bcc35f398b..0bcc35f398b 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml
index 3fd51854a75..3fd51854a75 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml
index f4cf0805ede..f4cf0805ede 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml
index 5a4a28b7df3..5a4a28b7df3 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexSingleResource.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml
index 6523767aa7c..6523767aa7c 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml
index 1c5531156ba..1c5531156ba 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shared.xml
index 70c101759de..70c101759de 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml b/sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml
index 2726ddb9e6c..2726ddb9e6c 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/review/ReviewDaoTest/shouldPartitionFiltersOnPermanentId.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/rule/CacheRuleFinderTest/shared.xml
index fc4fcd733aa..fc4fcd733aa 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/CacheRuleFinderTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/rule/CacheRuleFinderTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/rule/DefaultRuleFinderTest/shared.xml
index fc4fcd733aa..fc4fcd733aa 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/DefaultRuleFinderTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/rule/DefaultRuleFinderTest/shared.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectAll.xml b/sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectAll.xml
index bef45741abc..bef45741abc 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectAll.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectAll.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectById.xml b/sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectById.xml
index ed969e76e69..ed969e76e69 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/rule/RuleDaoTest/selectById.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/rule/RuleDaoTest/selectById.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
index f4b6b01f4ab..f4b6b01f4ab 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldCountByTypeAndKey.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert-result.xml b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert-result.xml
index 020f9ed466a..020f9ed466a 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert-result.xml
diff --git a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert.xml b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/sonar-core/src/test/resources/org/sonar/persistence/template/LoadedTemplateDaoTest/shouldInsert.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/template/LoadedTemplateDaoTest/shouldInsert.xml
diff --git a/sonar-core/src/test/resources/org/sonar/core/components/DefaultUserFinderTest/fixture.xml b/sonar-core/src/test/resources/org/sonar/core/user/DefaultUserFinderTest/fixture.xml
index 456f9305802..456f9305802 100644
--- a/sonar-core/src/test/resources/org/sonar/core/components/DefaultUserFinderTest/fixture.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/user/DefaultUserFinderTest/fixture.xml
diff --git a/sonar-server/src/main/java/org/sonar/server/notifications/NotificationService.java b/sonar-server/src/main/java/org/sonar/server/notifications/NotificationService.java
index 523ec15aa44..5ab663927e1 100644
--- a/sonar-server/src/main/java/org/sonar/server/notifications/NotificationService.java
+++ b/sonar-server/src/main/java/org/sonar/server/notifications/NotificationService.java
@@ -29,8 +29,8 @@ import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
import org.sonar.api.utils.Logs;
import org.sonar.api.utils.TimeProfiler;
-import org.sonar.core.notifications.DefaultNotificationManager;
-import org.sonar.jpa.entity.NotificationQueueElement;
+import org.sonar.core.notification.DefaultNotificationManager;
+import org.sonar.core.notification.NotificationQueueElement;
import java.util.*;
import java.util.concurrent.Executors;
diff --git a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
index c86f5f93477..9ff7a031df8 100644
--- a/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
+++ b/sonar-server/src/main/java/org/sonar/server/platform/Platform.java
@@ -34,14 +34,18 @@ import org.sonar.api.rules.XMLRuleParser;
import org.sonar.api.utils.HttpDownloader;
import org.sonar.api.utils.IocContainer;
import org.sonar.api.utils.TimeProfiler;
-import org.sonar.core.components.DefaultMetricFinder;
-import org.sonar.core.components.DefaultModelFinder;
-import org.sonar.core.components.DefaultRuleFinder;
-import org.sonar.core.components.DefaultUserFinder;
import org.sonar.core.i18n.GwtI18n;
import org.sonar.core.i18n.I18nManager;
import org.sonar.core.i18n.RuleI18nManager;
-import org.sonar.core.notifications.DefaultNotificationManager;
+import org.sonar.core.metric.DefaultMetricFinder;
+import org.sonar.core.notification.DefaultNotificationManager;
+import org.sonar.core.persistence.DaoUtils;
+import org.sonar.core.persistence.DatabaseMigrator;
+import org.sonar.core.persistence.DefaultDatabase;
+import org.sonar.core.persistence.MyBatis;
+import org.sonar.core.qualitymodel.DefaultModelFinder;
+import org.sonar.core.rule.DefaultRuleFinder;
+import org.sonar.core.user.DefaultUserFinder;
import org.sonar.jpa.dao.DaoFacade;
import org.sonar.jpa.dao.MeasuresDao;
import org.sonar.jpa.dao.ProfilesDao;
@@ -50,10 +54,6 @@ import org.sonar.jpa.session.DatabaseSessionFactory;
import org.sonar.jpa.session.DatabaseSessionProvider;
import org.sonar.jpa.session.DefaultDatabaseConnector;
import org.sonar.jpa.session.ThreadLocalDatabaseSessionFactory;
-import org.sonar.persistence.DaoUtils;
-import org.sonar.persistence.DatabaseMigrator;
-import org.sonar.persistence.DefaultDatabase;
-import org.sonar.persistence.MyBatis;
import org.sonar.server.charts.ChartFactory;
import org.sonar.server.configuration.Backup;
import org.sonar.server.configuration.ProfilesManager;
diff --git a/sonar-server/src/main/java/org/sonar/server/startup/IndexProjects.java b/sonar-server/src/main/java/org/sonar/server/startup/IndexProjects.java
index e3f4b784b93..40556756f23 100644
--- a/sonar-server/src/main/java/org/sonar/server/startup/IndexProjects.java
+++ b/sonar-server/src/main/java/org/sonar/server/startup/IndexProjects.java
@@ -25,8 +25,8 @@ import org.sonar.api.resources.Qualifiers;
import org.sonar.api.resources.Scopes;
import org.sonar.api.utils.TimeProfiler;
import org.sonar.jpa.entity.SchemaMigration;
-import org.sonar.persistence.resource.ResourceIndexerDao;
-import org.sonar.persistence.resource.ResourceIndexerFilter;
+import org.sonar.core.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerFilter;
/**
* Index existing projects during migration to 2.13. Since this latter version, resources are automatically indexed
diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java
index f46dad792b5..ff0b6c0b0b1 100644
--- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java
+++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java
@@ -25,9 +25,9 @@ import org.slf4j.LoggerFactory;
import org.sonar.api.utils.TimeProfiler;
import org.sonar.api.web.Dashboard;
import org.sonar.api.web.DashboardTemplate;
-import org.sonar.persistence.dashboard.*;
-import org.sonar.persistence.template.LoadedTemplateDao;
-import org.sonar.persistence.template.LoadedTemplateDto;
+import org.sonar.core.dashboard.*;
+import org.sonar.core.template.LoadedTemplateDao;
+import org.sonar.core.template.LoadedTemplateDto;
import java.util.Collections;
import java.util.Comparator;
diff --git a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
index 0514b55e8b7..cad0e11e695 100644
--- a/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
+++ b/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
@@ -35,8 +35,8 @@ import org.sonar.api.utils.ValidationMessages;
import org.sonar.api.web.*;
import org.sonar.core.i18n.RuleI18nManager;
import org.sonar.markdown.Markdown;
-import org.sonar.persistence.Database;
-import org.sonar.persistence.DatabaseMigrator;
+import org.sonar.core.persistence.Database;
+import org.sonar.core.persistence.DatabaseMigrator;
import org.sonar.server.configuration.Backup;
import org.sonar.server.configuration.ProfilesManager;
import org.sonar.server.filters.Filter;
diff --git a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
index 318ef647c06..710c59768e4 100644
--- a/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/database/EmbeddedDatabaseTest.java
@@ -24,10 +24,9 @@ import org.apache.commons.lang.SystemUtils;
import org.apache.derby.jdbc.ClientDriver;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.sonar.api.config.Settings;
-import org.sonar.persistence.InMemoryDatabase;
+import org.sonar.core.persistence.InMemoryDatabase;
import java.io.File;
import java.io.IOException;
@@ -73,7 +72,7 @@ public class EmbeddedDatabaseTest {
File[] files = testRoot.listFiles();
for (File file : files) {
if (file.isDirectory() &&
- file.getName().startsWith(TEST_DB_DIR_PREFIX)) {
+ file.getName().startsWith(TEST_DB_DIR_PREFIX)) {
try {
FileUtils.deleteDirectory(file);
} catch (IOException e) {
diff --git a/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java b/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java
index 38a089538ca..9dec6686cb3 100644
--- a/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/notifications/NotificationServiceTest.java
@@ -28,8 +28,8 @@ import org.sonar.api.config.Settings;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationChannel;
import org.sonar.api.notifications.NotificationDispatcher;
-import org.sonar.core.notifications.DefaultNotificationManager;
-import org.sonar.jpa.entity.NotificationQueueElement;
+import org.sonar.core.notification.DefaultNotificationManager;
+import org.sonar.core.notification.NotificationQueueElement;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
diff --git a/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java b/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java
index b4f4ac838dd..19f7a12e458 100644
--- a/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/platform/ServerFileSystemTest.java
@@ -21,8 +21,8 @@ package org.sonar.server.platform;
import org.junit.Test;
import org.sonar.jpa.session.DatabaseConnector;
-import org.sonar.persistence.dialect.Dialect;
-import org.sonar.persistence.dialect.MySql;
+import org.sonar.core.persistence.dialect.Dialect;
+import org.sonar.core.persistence.dialect.MySql;
import org.sonar.test.TestUtils;
import java.io.File;
diff --git a/sonar-server/src/test/java/org/sonar/server/startup/IndexProjectsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/IndexProjectsTest.java
index d87b036fdd4..3676c081dd6 100644
--- a/sonar-server/src/test/java/org/sonar/server/startup/IndexProjectsTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/startup/IndexProjectsTest.java
@@ -22,8 +22,8 @@ package org.sonar.server.startup;
import org.junit.Test;
import org.sonar.api.platform.ServerUpgradeStatus;
import org.sonar.jpa.entity.SchemaMigration;
-import org.sonar.persistence.resource.ResourceIndexerDao;
-import org.sonar.persistence.resource.ResourceIndexerFilter;
+import org.sonar.core.resource.ResourceIndexerDao;
+import org.sonar.core.resource.ResourceIndexerFilter;
import static org.mockito.Mockito.*;
diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java
index 95132c0f293..ed42fe972fe 100644
--- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java
@@ -27,9 +27,9 @@ import org.junit.Test;
import org.sonar.api.web.Dashboard;
import org.sonar.api.web.DashboardLayout;
import org.sonar.api.web.DashboardTemplate;
-import org.sonar.persistence.dashboard.*;
-import org.sonar.persistence.template.LoadedTemplateDao;
-import org.sonar.persistence.template.LoadedTemplateDto;
+import org.sonar.core.dashboard.*;
+import org.sonar.core.template.LoadedTemplateDao;
+import org.sonar.core.template.LoadedTemplateDto;
import java.util.Collections;
import java.util.List;