diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:36:24 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:37:00 +0100 |
commit | 536562976dad7425fcb546736eaa6e463c8032a9 (patch) | |
tree | 28f2f72eeb12e6f2875b3ff16f08e396ca9481b5 | |
parent | 7cbe24d9765f4d212fd651bdbf864ac52d218938 (diff) | |
download | sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.tar.gz sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.zip |
SONAR-3208 complete database tables
* add PROJECTS.PERSON_ID
* create the table AUTHORS
63 files changed, 253 insertions, 156 deletions
diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml index a9c48393d40..861917acf7c 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/security/RoleManagerTest/sharedFixture.xml @@ -2,6 +2,6 @@ <projects id="10" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="[null]" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" long_name="[null]" /> </dataset>
\ No newline at end of file diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml index 26db515cf22..039debd839a 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shared.xml @@ -13,7 +13,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml index 108ad6f6f97..5ea2a38f4a1 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml @@ -13,7 +13,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" diff --git a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml index 23caa6d175c..cb141d795df 100644 --- a/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml +++ b/plugins/sonar-core-plugin/src/test/resources/org/sonar/plugins/core/timemachine/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml @@ -12,7 +12,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" diff --git a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java index 9e9a5c6e909..c5e963aefcc 100644 --- a/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java +++ b/plugins/sonar-dbcleaner-plugin/src/main/java/org/sonar/plugins/dbcleaner/DefaultPurgeTask.java @@ -83,7 +83,7 @@ public class DefaultPurgeTask implements PurgeTask { private void doPurge(long resourceId) { try { LOG.debug("Purge data [id=" + resourceId + "]"); - purgeDao.purgeProject(resourceId, getScopesWithoutHistoricalData()); + purgeDao.purge(resourceId, getScopesWithoutHistoricalData()); } catch (Exception e) { // purge errors must no fail the batch LOG.error("Fail to purge data [id=" + resourceId + "]", e); diff --git a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java index 8947b8e21fd..f059d70d180 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java +++ b/plugins/sonar-dbcleaner-plugin/src/test/java/org/sonar/plugins/dbcleaner/DefaultPurgeTaskTest.java @@ -39,7 +39,7 @@ public class DefaultPurgeTaskTest { task.purge(1L); - verify(purgeDao).purgeProject(1L, new String[]{Scopes.FILE}); + verify(purgeDao).purge(1L, new String[]{Scopes.FILE}); } @Test @@ -50,17 +50,17 @@ public class DefaultPurgeTaskTest { task.purge(1L); - verify(purgeDao).purgeProject(1L, new String[]{Scopes.DIRECTORY, Scopes.FILE}); + verify(purgeDao).purge(1L, new String[]{Scopes.DIRECTORY, Scopes.FILE}); } @Test public void shouldNotFailOnErrors() { PurgeDao purgeDao = mock(PurgeDao.class); - when(purgeDao.purgeProject(anyLong(), (String[]) any())).thenThrow(new RuntimeException()); + when(purgeDao.purge(anyLong(), (String[]) any())).thenThrow(new RuntimeException()); DefaultPurgeTask task = new DefaultPurgeTask(purgeDao, new Settings(), mock(DefaultPeriodCleaner.class)); task.purge(1L); - verify(purgeDao).purgeProject(anyLong(), (String[]) any()); + verify(purgeDao).purge(anyLong(), (String[]) any()); } } diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml index 2b4bb07c497..daa989bd2ad 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots-result.xml @@ -10,24 +10,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- files --> <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" diff --git a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml index a71f43da47e..9d20d5a0f09 100644 --- a/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml +++ b/plugins/sonar-dbcleaner-plugin/src/test/resources/org/sonar/plugins/dbcleaner/api/PurgeUtilsTest/purgeSnapshots.xml @@ -10,24 +10,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="package" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- files --> <projects long_name="[null]" id="3" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2" name="class" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml b/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml index 5d94c817fd0..3a6d76cabaf 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/DefaultTimeMachineTest/loadMeasuresFromDate.xml @@ -6,10 +6,10 @@ <projects long_name="[null]" id="1" scope="PRJ" kee="group:artifact" qualifier="TRK" name="my project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="2" scope="DIR" kee="group:artifact:org.sonar" qualifier="PAC" name="org.sonar" root_id="2" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- Project : 3 snapshots --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml index 6b0e7bb6e6e..de187166907 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysis.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="5" scope="PRJ" qualifier="TRK" kee="my:key" name="My project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="30" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" project_id="5" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml index f568c80762d..a26c76aa43a 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isLatestAnalysisIfNeverAnalysed.xml @@ -4,7 +4,7 @@ <projects long_name="[null]" id="5" scope="PRJ" qualifier="TRK" kee="other:key" name="My project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="50" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" project_id="5" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="true" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml index ac74363f142..6658daa1b47 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectConfiguratorTest/isNotLatestAnalysis.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="5" scope="PRJ" qualifier="TRK" kee="my:key" name="My project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" depth="[null]" id="30" scope="PRJ" qualifier="TRK" created_at="2010-11-01 13:58:00.00" build_date="2010-11-01 13:58:00.00" version="[null]" project_id="5" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="false" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml index 77e98e8ffb6..022dbcd0169 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastMeasuresLoaderTest/shared.xml @@ -21,19 +21,19 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="project:org.foo" name="org.foo" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- file --> <projects long_name="org.foo.Bar" id="3" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" name="Bar" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- snapshots --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml index 3914489d920..2d07a1dda77 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDateTest/shared.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- 2008-11-01 --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml index eb07ea0f0c5..4a2fc84eb3c 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shared.xml @@ -4,19 +4,19 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="project:org.foo" name="org.foo" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- file --> <projects long_name="org.foo.Bar" id="3" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" name="Bar" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- first analysis : 2008-11-01--> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml index 30b4fd235ab..a62a55c49dd 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByDaysTest/shouldNotFindSelf.xml @@ -4,19 +4,19 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- package --> <projects long_name="[null]" id="2" scope="DIR" qualifier="PAC" kee="project:org.foo" name="org.foo" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- file --> <projects long_name="org.foo.Bar" id="3" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" name="Bar" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- current analysis : 2008-11-16 --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml index f5edd855a07..f6e905101a6 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldFindPreviousAnalysis.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1006" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml index 2dcdd10d5fa..3c1bad25f37 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByPreviousAnalysisTest/shouldNotFindPreviousAnalysis.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- unprocessed analysis --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml index c414b95daa4..98c40a5fc53 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/PastSnapshotFinderByVersionTest/shared.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="project" name="project" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- version 1.1-SNAPSHOT --> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/components/TimeMachineConfigurationTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/components/TimeMachineConfigurationTest/shared.xml index 5e53bd405e7..65c8a495038 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/components/TimeMachineConfigurationTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/components/TimeMachineConfigurationTest/shared.xml @@ -1,12 +1,12 @@ <dataset> <projects long_name="[null]" id="1" scope="PRJ" kee="my:project" qualifier="LIB" name="my project as lib" - root_id="[null]" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + root_id="[null]" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="2" scope="PRJ" kee="my:project" qualifier="TRK" name="my project" - root_id="[null]" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + root_id="[null]" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="3" scope="DIR" kee="my:project:path/to/dir" qualifier="TRK" name="my dir" - root_id="2" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + root_id="2" description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> </dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml index 61455e2ca4c..b0d3176964b 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shared.xml @@ -3,7 +3,7 @@ <!-- other project --> <projects id="1000" scope="PRJ" qualifier="TRK" kee="my:key" root_id="[null]" name="Other project" long_name="Other" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3000" project_id="1000" parent_snapshot_id="[null]" root_project_id="1000" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml index ab4d7f32c3f..7ce78e742c1 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewDirectory-result.xml @@ -3,7 +3,7 @@ <!-- other project --> <projects id="1000" scope="PRJ" qualifier="TRK" kee="my:key" root_id="[null]" name="Other project" long_name="Other" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3000" project_id="1000" parent_snapshot_id="[null]" root_project_id="1000" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" @@ -13,11 +13,11 @@ <!-- new project --> <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="Foo" long_name="Foo" description="some description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-25 00:00:00.00" build_date="2010-12-25 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml index bf73689908c..00654ab48df 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewLibrary-result.xml @@ -3,7 +3,7 @@ <!-- other project --> <projects id="1000" scope="PRJ" qualifier="TRK" kee="my:key" root_id="[null]" name="Other project" long_name="Other" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3000" project_id="1000" parent_snapshot_id="[null]" root_project_id="1000" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" @@ -13,11 +13,11 @@ <!-- new project --> <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="Foo" long_name="Foo" description="some description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="PRJ" qualifier="LIB" kee="junit:junit" root_id="[null]" name="junit:junit" long_name="junit:junit" description="[null]" - enabled="true" language="[null]" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="[null]" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-25 00:00:00.00" build_date="2010-12-25 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml index 775852ae2d2..d4d5128df0d 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewMultiModulesProject-result.xml @@ -3,7 +3,7 @@ <!-- other project --> <projects id="1000" scope="PRJ" qualifier="TRK" kee="my:key" root_id="[null]" name="Other project" long_name="Other" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3000" project_id="1000" parent_snapshot_id="[null]" root_project_id="1000" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" @@ -13,19 +13,19 @@ <!-- new project --> <projects id="1001" scope="PRJ" qualifier="TRK" kee="root" root_id="[null]" name="Root" long_name="Root" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="PRJ" qualifier="BRC" kee="a" root_id="1001" name="A" long_name="A" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="PRJ" qualifier="BRC" kee="b" root_id="1001" name="B" long_name="B" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1004" scope="PRJ" qualifier="BRC" kee="b1" root_id="1001" name="B1" long_name="B1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" root_project_id="1001" parent_snapshot_id="[null]" root_snapshot_id="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml index 90dea6bdd7f..2eebe8f7ce2 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldSaveNewProject-result.xml @@ -3,7 +3,7 @@ <!-- other project --> <projects id="1000" scope="PRJ" qualifier="TRK" kee="my:key" root_id="[null]" name="Other project" long_name="Other" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3000" project_id="1000" parent_snapshot_id="[null]" root_project_id="1000" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" @@ -13,7 +13,7 @@ <!-- new project --> <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="Foo" long_name="Foo" description="some description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-25 00:00:00.00" build_date="2010-12-25 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml index 6dcfff897e9..dee68cf4db9 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml @@ -2,7 +2,7 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="new name" long_name="new name" description="new description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- old snapshot --> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml index df0192b6958..3e6ecc1bf92 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource.xml @@ -2,7 +2,7 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="old name" long_name="old name" description="old description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml index 7babf7adaa5..b3e9936d13b 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shared.xml @@ -7,15 +7,15 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="project name" long_name="project name" description="project description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="FIL" qualifier="CLA" kee="foo:org.foo.Bar" root_id="1001" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml index 80aad10108a..cca7f553c6a 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldDelaySaving-result.xml @@ -8,15 +8,15 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="project name" long_name="project name" description="project description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="FIL" qualifier="CLA" kee="foo:org.foo.Bar" root_id="1001" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml index d5bb93e10fd..65045ce8147 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldInsertMeasure-result.xml @@ -8,15 +8,15 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="project name" long_name="project name" description="project description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="FIL" qualifier="CLA" kee="foo:org.foo.Bar" root_id="1001" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml index e7a2a069e27..087482acc04 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldNotDelaySavingWithDatabaseOnlyMeasure-result.xml @@ -8,15 +8,15 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="project name" long_name="project name" description="project description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="FIL" qualifier="CLA" kee="foo:org.foo.Bar" root_id="1001" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml index 44f8643e2cd..d36cda4f4a2 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/MeasurePersisterTest/shouldUpdateMeasure-result.xml @@ -8,15 +8,15 @@ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" name="project name" long_name="project name" description="project description" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1002" scope="DIR" qualifier="PAC" kee="foo:org.foo" root_id="1001" name="org.foo" long_name="org.foo" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <projects id="1003" scope="FIL" qualifier="CLA" kee="foo:org.foo.Bar" root_id="1001" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="3001" project_id="1001" parent_snapshot_id="[null]" root_project_id="1001" root_snapshot_id="[null]" scope="PRJ" qualifier="TRK" created_at="2010-12-23 00:00:00.00" build_date="2010-12-23 00:00:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml index 462bb7c4e50..9bfe3ded05d 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shared.xml @@ -2,7 +2,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]" scope="FIL" qualifier="CLA" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml index e67531bb41f..8bc81a76ad2 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/index/SourcePersisterTest/shouldSaveSource-result.xml @@ -2,7 +2,7 @@ <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" name="Bar" long_name="org.foo.Bar" description="[null]" - enabled="true" language="java" copy_resource_id="[null]" profile_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]" scope="FIL" qualifier="CLA" created_at="2008-11-01 13:58:00.00" build_date="2008-11-01 13:58:00.00" version="[null]" path="" diff --git a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/sharedFixture.xml b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/sharedFixture.xml index 9bb3df9ceed..4585e14ba0b 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/sharedFixture.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/phases/UpdateStatusJobTest/sharedFixture.xml @@ -15,24 +15,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact" name="[null]" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="2" scope="PRJ" qualifier="TRK" kee="mygroup:myartifact2" name="[null]" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="3" scope="DIR" qualifier="PAC" kee="mygroup:myartifact:my.package" name="[null]" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="4" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class1" name="[null]" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="5" scope="FIL" qualifier="CLA" kee="mygroup:myartifact:my.package.Class2" name="[null]" root_id="1" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> </dataset>
\ No newline at end of file diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java index 814c1ee26e2..781f8691f84 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java @@ -46,6 +46,7 @@ public final class DatabaseUtils { "active_rule_parameters", "active_rule_param_changes", "alerts", + "authors", "characteristics", "characteristic_edges", "characteristic_properties", diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java index 1d01411d815..610d9586c5a 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java +++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java @@ -34,7 +34,7 @@ public class SchemaMigration { public final static int VERSION_UNKNOWN = -1; - public static final int LAST_VERSION = 260; + public static final int LAST_VERSION = 262; public static final int VERSION_2_13 = 241; public final static String TABLE_NAME = "schema_migrations"; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql index 59c4d9f02cd..1038bf1ddc2 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql @@ -177,6 +177,9 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('256'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('257'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('258'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('259'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('260'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('261'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('262'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl index 2de07173e61..e301e098883 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl @@ -295,7 +295,8 @@ CREATE TABLE "PROJECTS" ( "PROFILE_ID" INTEGER, "LANGUAGE" VARCHAR(5), "COPY_RESOURCE_ID" INTEGER, - "LONG_NAME" VARCHAR(256) + "LONG_NAME" VARCHAR(256), + "PERSON_ID" INTEGER ); CREATE TABLE "REVIEWS" ( @@ -507,6 +508,13 @@ CREATE TABLE "RULE_NOTES" ( "UPDATED_AT" TIMESTAMP ); +CREATE TABLE "AUTHORS" ( + "PERSON_ID" INTEGER, + "COMMITTER" VARCHAR(100), + "CREATED_AT" TIMESTAMP, + "UPDATED_AT" TIMESTAMP +); + -- ---------------------------------------------- -- DDL Statements for indexes diff --git a/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java b/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java index 2c9dd6299a8..37bdba4d99a 100644 --- a/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java @@ -120,21 +120,21 @@ public class PurgeDaoTest extends DaoTestCase { @Test public void shouldPurgeProject() { setupData("shouldPurgeProject"); - dao.purgeProject(1, new String[0]); + dao.purge(1, new String[0]); checkTables("shouldPurgeProject", "projects", "snapshots"); } @Test public void shouldPurgeDirectoriesAndFiles() { setupData("shouldPurgeDirectoriesAndFiles"); - dao.purgeProject(1, new String[]{Scopes.DIRECTORY, Scopes.FILE}); + dao.purge(1, new String[]{Scopes.DIRECTORY, Scopes.FILE}); checkTables("shouldPurgeDirectoriesAndFiles", "projects", "snapshots"); } @Test public void shouldDisableResourcesWithoutLastSnapshot() { setupData("shouldDisableResourcesWithoutLastSnapshot"); - dao.purgeProject(1, new String[0]); + dao.purge(1, new String[0]); checkTables("shouldDisableResourcesWithoutLastSnapshot", "projects", "snapshots"); } diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml index 1d434ed08c6..e5e94801418 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteProject.xml @@ -3,7 +3,7 @@ <!-- root --> <projects id="1" enabled="[true]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="[false]" purge_status="[null]" @@ -33,7 +33,7 @@ <!-- modules --> <projects id="2" enabled="[true]" root_id="1" long_name="[null]" scope="PRJ" qualifier="BRC" kee="module1" name="module1" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" status="P" islast="[false]" purge_status="[null]" @@ -49,7 +49,7 @@ <projects id="3" enabled="[false]" root_id="1" long_name="[null]" scope="PRJ" qualifier="BRC" kee="module2" name="module2" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="3" project_id="3" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" status="P" islast="[true]" purge_status="[null]" @@ -65,7 +65,7 @@ <!-- file of module 2--> <projects id="4" enabled="[false]" root_id="3" long_name="[null]" scope="FIL" qualifier="FIL" kee="module2:File.java" name="File" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1" status="P" islast="[true]" purge_status="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteResource.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteResource.xml index 7230006191a..1f37f22fa84 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteResource.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteResource.xml @@ -2,7 +2,7 @@ <projects id="1" enabled="[true]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="[false]" purge_status="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot-result.xml index 84a427552e3..732f1a1d776 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot-result.xml @@ -10,17 +10,17 @@ What has been changed : <!-- the project --> <projects id="1" enabled="[false]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the directory --> <projects id="2" enabled="[false]" root_id="1" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the file --> <projects id="3" enabled="[false]" root_id="1" long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot.xml index 827bb856789..16df8f3489e 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDisableResourcesWithoutLastSnapshot.xml @@ -3,17 +3,17 @@ <!-- the project --> <projects id="1" enabled="[true]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles-result.xml index a0020290680..a50174fdd99 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles-result.xml @@ -9,17 +9,17 @@ What has been changed : purge_status=1 on snapshots 4, 5 and 6 <!-- the project --> <projects id="1" enabled="[true]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- do not purge last snapshots --> <snapshots id="1" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles.xml index d299f79946b..955b522db3f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeDirectoriesAndFiles.xml @@ -3,17 +3,17 @@ <!-- the project --> <projects id="1" enabled="[true]" root_id="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" long_name="[null]" scope="FIL" qualifier="FIL" kee="project:my/dir/File.java" name="my/dir/File.java" - description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- do not purge last snapshots --> <snapshots id="1" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml index 48436ab0815..4890f79c519 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml @@ -3,7 +3,7 @@ <!-- the project --> <projects id="1" enabled="[true]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- snapshot already purged --> diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml index 55682016a04..3ad298bd6b9 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject.xml @@ -3,7 +3,7 @@ <!-- the project --> <projects id="1" enabled="[true]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" profile_id="[null]"/> + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" profile_id="[null]"/> <!-- snapshot already purged --> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture.xml index 41ab615c627..a993fe82a6f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/fixture.xml @@ -3,7 +3,7 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="[null]" long_name="Struts" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" status="P" islast="[false]" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" @@ -17,7 +17,7 @@ <!-- project --> <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1" status="P" islast="[false]" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" @@ -32,7 +32,7 @@ <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts" name="org.struts" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1" status="P" islast="[false]" purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" @@ -47,7 +47,7 @@ <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts:org.struts.RequestContext" name="RequestContext" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1" status="P" islast="[false]" purge_status="[null]" diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml index 2e1e9bb9678..7210c845707 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject-result.xml @@ -4,24 +4,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="2" scope="PRJ" qualifier="BRC" kee="org.struts:struts-core" name="Struts Core" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- note that the root_id of package/file is wrong. It references the module but not the root project --> <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.struts.RequestContext" id="4" scope="CLA" qualifier="CLA" kee="org.struts:struts-core:org.struts.RequestContext" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1"/> <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml index 33fcdb11728..820d4a95e59 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexMultiModulesProject.xml @@ -4,24 +4,24 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="[null]" id="2" scope="PRJ" qualifier="BRC" kee="org.struts:struts-core" name="Struts Core" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- note that the root_id of package/file is wrong. It references the module but not the root project --> <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:org.struts.RequestContext" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1"/> <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml index 2aca7a20445..c7484ec4a2a 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects-result.xml @@ -4,20 +4,20 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- directory --> <projects long_name="org.struts" id="2" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts" name="org.struts" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- file --> <projects long_name="org.struts.RequestContext" id="3" scope="CLA" qualifier="CLA" kee="org.struts:struts:org.struts.RequestContext" name="RequestContext" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ" qualifier="TRK"/> <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2" scope="DIR" qualifier="PAC"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml index 87e14d537a7..5388b78865a 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldIndexProjects.xml @@ -4,19 +4,19 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- directory --> <projects long_name="org.struts" id="2" scope="DIR" qualifier="PAC" kee="org.struts:struts:org.struts" name="org.struts" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- file --> <projects long_name="org.struts.RequestContext" id="3" scope="FIL" qualifier="CLA" kee="org.struts:struts:org.struts.RequestContext" name="RequestContext" root_id="1" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ" qualifier="TRK" /> <snapshots purge_status="[null]" id="2" islast="[true]" root_project_id="1" project_id="2" scope="DIR" qualifier="PAC"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml index 30cf6f02ba7..4909ab38144 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming-result.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Apache Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ" qualifier="TRK"/> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml index dfce65c8413..fae54763976 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceIndexerDaoTest/shouldReindexProjectAfterRenaming.xml @@ -3,7 +3,7 @@ <projects long_name="[null]" id="1" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Apache Struts" root_id="[null]" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" id="1" islast="[true]" root_project_id="1" project_id="1" scope="PRJ" qualifier="TRK"/> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java index 8109987704d..86bd05ef823 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java @@ -77,6 +77,9 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { @Column(name = "copy_resource_id", updatable = true, nullable = true) private Integer copyResourceId; + @Column(name = "person_id", updatable = true, nullable = true) + private Integer personId; + @OneToMany(mappedBy = "resource", fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE}) @BatchSize(size = 8) private List<ProjectLink> projectLinks = new ArrayList<ProjectLink>(); @@ -94,11 +97,11 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { /** * <p>Creates a resource model</p> * - * @param scope the scope the rule will apply on - * @param key the rule key. This is the name of the resource, including the path + * @param scope the scope the rule will apply on + * @param key the rule key. This is the name of the resource, including the path * @param qualifier the resource qualifier - * @param rootId the rootId for the resource - * @param name the short name of the resource + * @param rootId the rootId for the resource + * @param name the short name of the resource */ public ResourceModel(String scope, String key, String qualifier, Integer rootId, String name) { this.scope = scope; @@ -154,7 +157,7 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { */ public void setName(String name) { this.name = StringUtils.abbreviate(name, NAME_COLUMN_SIZE); - if (this.longName==null) { + if (this.longName == null) { this.longName = this.name; } } @@ -206,8 +209,24 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { return copyResourceId; } - public void setCopyResourceId(Integer copyResourceId) { - this.copyResourceId = copyResourceId; + public ResourceModel setCopyResourceId(Integer i) { + this.copyResourceId = i; + return this; + } + + /** + * @since 2.14 + */ + public Integer getPersonId() { + return personId; + } + + /** + * @since 2.14 + */ + public ResourceModel setPersonId(Integer i) { + this.personId = i; + return this; } /** @@ -254,35 +273,36 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { } ResourceModel other = (ResourceModel) obj; return new EqualsBuilder() - .append(key, other.key) - .append(enabled, other.enabled) - .append(rootId, other.rootId) - .isEquals(); + .append(key, other.key) + .append(enabled, other.enabled) + .append(rootId, other.rootId) + .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(17, 37) - .append(key) - .append(enabled) - .append(rootId) - .toHashCode(); + .append(key) + .append(enabled) + .append(rootId) + .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this) - .append("id", getId()) - .append("key", key) - .append("scope", scope) - .append("qualifier", qualifier) - .append("name", name) - .append("longName", longName) - .append("lang", languageKey) - .append("enabled", enabled) - .append("rootId", rootId) - .append("copyResourceId", copyResourceId) - .toString(); + .append("id", getId()) + .append("key", key) + .append("scope", scope) + .append("qualifier", qualifier) + .append("name", name) + .append("longName", longName) + .append("lang", languageKey) + .append("enabled", enabled) + .append("rootId", rootId) + .append("copyResourceId", copyResourceId) + .append("personId", personId) + .toString(); } @Override @@ -295,6 +315,7 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable { clone.setLanguageKey(getLanguageKey()); clone.setCopyResourceId(getCopyResourceId()); clone.setLongName(getLongName()); + clone.setPersonId(getPersonId()); return clone; } diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_deadline.rb index 9ea0116032b..d9b9b5200fe 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_deadline.rb @@ -21,7 +21,7 @@ # # Sonar 2.14 # -class RenameActionPlansColumns < ActiveRecord::Migration +class RenameActionPlansDeadline < ActiveRecord::Migration def self.up rename_column(:action_plans, :dead_line, :deadline) diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb new file mode 100644 index 00000000000..a6512b007c7 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb @@ -0,0 +1,30 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2012 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.14 +# +class AddProjectsPersonId < ActiveRecord::Migration + + def self.up + add_column 'projects', 'person_id', :integer, :null => true + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb new file mode 100644 index 00000000000..f43c3b4a909 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb @@ -0,0 +1,34 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2012 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.14 +# +class CreateAuthors < ActiveRecord::Migration + + def self.up + create_table 'authors', :id => false do |t| + t.column 'person_id', :integer, :null => false + t.column 'committer', :string, :null => true, :limit => 100 + t.timestamps + end + end + +end diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml index bdc9bb389b9..daf3a4cf609 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml @@ -15,11 +15,11 @@ <!-- Java classes --> <projects long_name="org.sonar.foo:File1" id="4" scope="FIL" kee="project:java:org.sonar.foo:File1" qualifier="CLA" name="File1" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.sonar.foo:File2" id="5" scope="FIL" kee="project:java:org.sonar.foo:File2" qualifier="CLA" name="File2" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="5" created_at="2008-12-25 01:00:01.00" build_date="2008-12-25 01:00:01.00" version="1.0" project_id="4" scope="FIL" qualifier="CLA" diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml index e794ed5298e..26eed6f6800 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml @@ -1,15 +1,15 @@ <dataset> <projects long_name="java project" id="1" scope="PRJ" kee="project:java" qualifier="TRK" name="java project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="php project" id="2" scope="PRJ" kee="project:php" qualifier="TRK" name="php project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="php" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="php" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.sonar.foo" id="3" scope="DIR" kee="project:java:org.sonar.foo" qualifier="PAC" name="org.sonar.foo" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- Java project --> diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml index ae1441dd900..aac9b0863b0 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml @@ -2,16 +2,16 @@ <!-- java project --> <projects long_name="java project" id="1" scope="PRJ" kee="project:java" qualifier="TRK" name="java project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- views --> <projects long_name="Root view" id="2" scope="PRJ" kee="ROOT_VIEW" qualifier="VW" name="Root view" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="Sub view" id="3" scope="PRJ" kee="SUB_VIEW" qualifier="SVW" name="Sub view" root_id="2" - description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"/> <!-- java project copy used in view --> <projects long_name="java project" id="4" scope="FIL" kee="cp-project:java" qualifier="TRK" name="java project" diff --git a/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml b/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml index f3a1b304598..c62b04aa28b 100644 --- a/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml +++ b/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml @@ -4,7 +4,7 @@ <projects long_name="[null]" id="3333" scope="PRJ" qualifier="TRK" kee="mygroup:anotherproject" name="[null]" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- general properties --> <properties prop_key="general_only" resource_id="[null]" user_id="[null]" text_value="is_general"/> |