diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-01-13 20:49:01 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-01-13 20:49:54 +0100 |
commit | 808e4f107fdd1659a41bb616660090fc04a9d7c0 (patch) | |
tree | e3b1c3fa12d35d90909dbe77f1c6722796b15885 /sonar-core/src | |
parent | 256c992dd006ded2b7e2a84e0a5a7dfb8be16fe7 (diff) | |
download | sonarqube-808e4f107fdd1659a41bb616660090fc04a9d7c0.tar.gz sonarqube-808e4f107fdd1659a41bb616660090fc04a9d7c0.zip |
SONAR-3024 Introduce deprecated key on resources to ease transition
Diffstat (limited to 'sonar-core/src')
27 files changed, 153 insertions, 114 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java index 985b64c7699..550bf27eee2 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java +++ b/sonar-core/src/main/java/org/sonar/core/component/ComponentKeys.java @@ -55,6 +55,19 @@ public final class ComponentKeys { return key; } + public static String createDeprecatedKey(Project project, Resource resource) { + String key = resource.getKey(); + if (!StringUtils.equals(Scopes.PROJECT, resource.getScope())) { + // not a project nor a library + key = new StringBuilder(ResourceModel.KEY_SIZE) + .append(project.getKey()) + .append(':') + .append(resource.getDeprecatedKey()) + .toString(); + } + return key; + } + /** * <p>Test if given parameter is valid for a project/module. Valid format is:</p> * <ul> diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index 7b51ce46344..1a518f9f8b9 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -33,7 +33,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 487; + public static final int LAST_VERSION = 488; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java index eeae6e4d053..e7c062b86f6 100644 --- a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java +++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java @@ -25,6 +25,7 @@ public class ResourceDto { private Long id; private String key; + private String deprecatedKey; private String name; private String longName; private Long rootId; @@ -65,6 +66,15 @@ public class ResourceDto { return this; } + public String getDeprecatedKey() { + return deprecatedKey; + } + + public ResourceDto setDeprecatedKey(String s) { + this.deprecatedKey = s; + return this; + } + public Long getRootId() { return rootId; } diff --git a/sonar-core/src/main/java/org/sonar/core/resource/ResourceKeyUpdaterDao.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceKeyUpdaterDao.java index 1e99e4baf5d..869d6091e7a 100644 --- a/sonar-core/src/main/java/org/sonar/core/resource/ResourceKeyUpdaterDao.java +++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceKeyUpdaterDao.java @@ -22,6 +22,7 @@ package org.sonar.core.resource; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; +import org.apache.commons.lang.StringUtils; import org.apache.ibatis.session.SqlSession; import org.sonar.core.persistence.MyBatis; @@ -31,8 +32,8 @@ import java.util.Map; import java.util.Set; /** - * Class used to rename the key of a project and its resources. - * + * Class used to rename the key of a project and its resources. + * * @since 3.2 */ public class ResourceKeyUpdaterDao { @@ -120,6 +121,10 @@ public class ResourceKeyUpdaterDao { for (ResourceDto resource : resources) { String resourceKey = resource.getKey(); resource.setKey(newKey + resourceKey.substring(oldKey.length(), resourceKey.length())); + String resourceDeprecatedKey = resource.getDeprecatedKey(); + if (StringUtils.isNotBlank(resourceDeprecatedKey)) { + resource.setDeprecatedKey(newKey + resourceDeprecatedKey.substring(oldKey.length(), resourceDeprecatedKey.length())); + } mapper.update(resource); } } diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 281b89e9e26..b39afa8b967 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -199,6 +199,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('484'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('485'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('486'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('487'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('488'); 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-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 3a5a5ef0b22..091220084ca 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -271,6 +271,7 @@ CREATE TABLE "PROJECTS" ( "SCOPE" VARCHAR(3), "QUALIFIER" VARCHAR(10), "KEE" VARCHAR(400), + "DEPRECATED_KEE" VARCHAR(400), "PATH" VARCHAR(2000), "ROOT_ID" INTEGER, "LANGUAGE" VARCHAR(20), diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceKeyUpdaterMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceKeyUpdaterMapper.xml index 3995965d6c2..6f50a88e8c1 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceKeyUpdaterMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceKeyUpdaterMapper.xml @@ -6,6 +6,7 @@ <resultMap id="resourceResultMap" type="Resource"> <id property="id" column="id"/> <result property="key" column="kee"/> + <result property="deprecatedKey" column="deprecated_kee"/> <result property="rootId" column="root_id"/> <result property="scope" column="scope"/> </resultMap> @@ -27,12 +28,12 @@ <select id="selectDescendantProjects" parameterType="long" resultMap="resourceResultMap"> select * from projects where scope='PRJ' and root_id=#{id} </select> - + <update id="update" parameterType="Resource"> - update projects - set kee = #{key} + update projects + set kee = #{key}, deprecated_kee = #{deprecatedKey} where id = #{id} </update> - + </mapper> diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml index f1ad0f06c26..e2d0d0a4745 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml @@ -6,6 +6,7 @@ <sql id="resourceColumns"> p.id, p.kee as key, + p.deprecated_kee as deprecatedKey, p.name as name, p.long_name as longName, p.root_id as rootId, @@ -253,17 +254,17 @@ <insert id="insert" parameterType="Resource" keyColumn="id" useGeneratedKeys="true" keyProperty="id"> insert into projects - (name, long_name, description, scope, qualifier, kee, path, language, root_id, copy_resource_id, person_id, enabled, created_at) + (name, long_name, description, scope, qualifier, kee, deprecated_kee, path, language, root_id, copy_resource_id, person_id, enabled, created_at) values ( #{name}, #{longName}, #{description}, #{scope}, #{qualifier}, - #{key}, #{path}, #{language}, #{rootId}, #{copyResourceId}, + #{key}, #{deprecatedKey}, #{path}, #{language}, #{rootId}, #{copyResourceId}, #{personId}, #{enabled}, #{createdAt} ) </insert> <update id="update" parameterType="Resource"> update projects set name=#{name}, long_name=#{longName}, description=#{description}, - scope=#{scope}, qualifier=#{qualifier}, kee=#{key}, path=#{path}, + scope=#{scope}, qualifier=#{qualifier}, kee=#{key}, deprecated_kee=#{deprecatedKey}, path=#{path}, language=#{language}, root_id=#{rootId}, copy_resource_id=#{copyResourceId}, person_id=#{personId}, enabled=#{enabled} where id=#{id} </update> diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java index 9287ea60fce..e758668c70c 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java @@ -33,8 +33,9 @@ public class ComponentKeysTest { Project project = new Project("my_project"); assertThat(ComponentKeys.createKey(project, project)).isEqualTo("my_project"); - JavaPackage javaPackage = new JavaPackage("org.foo"); - assertThat(ComponentKeys.createKey(project, javaPackage)).isEqualTo("my_project:org.foo"); + JavaPackage javaPackage = JavaPackage.create("src/org/foo", "org.foo"); + assertThat(ComponentKeys.createKey(project, javaPackage)).isEqualTo("my_project:/src/org/foo"); + assertThat(ComponentKeys.createDeprecatedKey(project, javaPackage)).isEqualTo("my_project:org.foo"); Library library = new Library("junit:junit", "4.7"); assertThat(ComponentKeys.createKey(project, library)).isEqualTo("junit:junit"); diff --git a/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java b/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java index 1b817929d45..a54bb58f8a0 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/IssueNotificationsTest.java @@ -35,7 +35,6 @@ import org.sonar.api.resources.File; import org.sonar.api.resources.Project; import org.sonar.api.utils.DateUtils; import org.sonar.core.component.ResourceComponent; -import org.sonar.core.i18n.RuleI18nManager; import java.util.Arrays; import java.util.Date; @@ -133,18 +132,18 @@ public class IssueNotificationsTest { .setAssignee("freddy") .setFieldChange(context, "resolution", null, "FIXED") .setSendNotifications(true) - .setComponentKey("struts:Action") + .setComponentKey("struts:Action.java") .setProjectKey("struts"); DefaultIssueQueryResult queryResult = new DefaultIssueQueryResult(Arrays.<Issue>asList(issue)); queryResult.addProjects(Arrays.<Component>asList(new Project("struts"))); - queryResult.addComponents(Arrays.<Component>asList(new ResourceComponent(new File("struts:Action").setEffectiveKey("struts:Action")))); + queryResult.addComponents(Arrays.<Component>asList(new ResourceComponent(File.create("Action.java", "Action.java", null, false).setEffectiveKey("struts:Action.java")))); Notification notification = issueNotifications.sendChanges(issue, context, queryResult).get(0); assertThat(notification.getFieldValue("message")).isEqualTo("the message"); assertThat(notification.getFieldValue("key")).isEqualTo("ABCDE"); - assertThat(notification.getFieldValue("componentKey")).isEqualTo("struts:Action"); - assertThat(notification.getFieldValue("componentName")).isEqualTo("struts:Action"); + assertThat(notification.getFieldValue("componentKey")).isEqualTo("struts:Action.java"); + assertThat(notification.getFieldValue("componentName")).isEqualTo("/Action.java"); assertThat(notification.getFieldValue("old.resolution")).isNull(); assertThat(notification.getFieldValue("new.resolution")).isEqualTo("FIXED"); Mockito.verify(manager).scheduleForSending(eq(Arrays.asList(notification))); diff --git a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java index bc8bd0a7c9d..5420558b1eb 100644 --- a/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/resource/ResourceDaoTest.java @@ -213,7 +213,8 @@ public class ResourceDaoTest extends AbstractDaoTestCase { setupData("update"); ResourceDto project = new ResourceDto() - .setKey("org.struts:struts").setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT) + .setKey("org.struts:struts") + .setDeprecatedKey("deprecated key").setScope(Scopes.PROJECT).setQualifier(Qualifiers.PROJECT) .setName("Struts").setLongName("Apache Struts").setLanguage("java").setDescription("MVC Framework") .setPath("/foo/bar") .setId(1L); @@ -229,10 +230,12 @@ public class ResourceDaoTest extends AbstractDaoTestCase { setupData("insert"); ResourceDto file1 = new ResourceDto() - .setKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) + .setKey("org.struts:struts:/src/main/java/org/struts/Action.java") + .setDeprecatedKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Action").setLongName("org.struts.Action").setPath("/foo/bar"); ResourceDto file2 = new ResourceDto() - .setKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) + .setKey("org.struts:struts:/src/main/java/org/struts/Filter.java") + .setDeprecatedKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Filter").setLongName("org.struts.Filter"); dao.insertOrUpdate(file1, file2); @@ -251,10 +254,12 @@ public class ResourceDaoTest extends AbstractDaoTestCase { setupData("insert"); ResourceDto file1 = new ResourceDto() - .setKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) + .setKey("org.struts:struts:/src/main/java/org/struts/Action.java") + .setDeprecatedKey("org.struts:struts:org.struts.Action").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Action").setLongName("org.struts.Action"); ResourceDto file2 = new ResourceDto() - .setKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) + .setKey("org.struts:struts:/src/main/java/org/struts/Filter.java") + .setDeprecatedKey("org.struts:struts:org.struts.Filter").setScope(Scopes.FILE).setQualifier(Qualifiers.FILE) .setLanguage("java").setName("Filter").setLongName("org.struts.Filter"); SqlSession session = getMyBatis().openSession(); diff --git a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java index 5d8176e0383..c934cd619ac 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/AuthorDaoTest.java @@ -75,7 +75,8 @@ public class AuthorDaoTest extends AbstractDaoTestCase { dao.insertAuthorAndDeveloper(login, resourceDto); checkTables("shouldInsertAuthorAndDeveloper", - new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "path", "language", "long_name", "person_id", "root_id", "scope"}, + new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "deprecated_kee", "path", "language", "long_name", "person_id", "root_id", + "scope"}, "authors", "projects"); } @@ -106,7 +107,8 @@ public class AuthorDaoTest extends AbstractDaoTestCase { } checkTables("shouldPreventAuthorsAndDevelopersDuplication", - new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "path", "language", "long_name", "person_id", "root_id", "scope"}, + new String[] {"created_at", "updated_at", "copy_resource_id", "description", "enabled", "kee", "deprecated_kee", "path", "language", "long_name", "person_id", "root_id", + "scope"}, "authors", "projects"); } } diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml index 3d2063f3797..fa6f544a993 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles-result.xml @@ -9,17 +9,17 @@ What has been changed : purge_status=1 on snapshot 4 (PRJ) and snapshots 5 and 6 <!-- the project --> <projects id="1" enabled="[true]" root_id="[null]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" created_at="[null]" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"/> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" created_at="[null]" 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]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- do not purge last snapshots --> <snapshots id="1" diff --git a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml index 292bc88e7c8..7e4db89bd58 100644 --- a/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml +++ b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldDeleteHistoricalDataOfDirectoriesAndFiles.xml @@ -3,17 +3,17 @@ <!-- the project --> <projects id="1" enabled="[true]" root_id="[null]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"/> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"/> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" created_at="[null]" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" created_at="[null]" 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]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- do not purge last snapshots --> <snapshots id="1" 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 0b1651d2ae2..8857dc5ddca 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]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the directory --> <projects id="2" enabled="[false]" root_id="1" created_at="[null]" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the file --> <projects id="3" enabled="[false]" root_id="1" created_at="[null]" 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]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[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 61e32cc1f08..fbda7d8a16d 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]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the directory --> <projects id="2" enabled="[true]" root_id="1" created_at="[null]" long_name="[null]" scope="DIR" qualifier="DIR" kee="project:my/dir" name="my/dir" - description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- the file --> <projects id="3" enabled="[true]" root_id="1" created_at="[null]" 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]" person_id="[null]" path="[null]" /> + description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[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/shouldPurgeProject-result.xml b/sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/shouldPurgeProject-result.xml index 9844d964885..917079471ee 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]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[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 7ab36ca2e6c..7fcfe0326af 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]" created_at="[null]" long_name="[null]" scope="PRJ" qualifier="TRK" kee="project" name="project" - root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" /> + root_id="[null]" description="[null]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]" /> <!-- snapshot already purged --> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml index aeadd58b983..3e2403d4518 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/insert-result.xml @@ -1,11 +1,11 @@ <dataset> - <projects id="1" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Action" name="Action" + <projects id="1" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:/src/main/java/org/struts/Action.java" name="Action" description="[null]" long_name="org.struts.Action" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar" /> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar" deprecated_kee="org.struts:struts:org.struts.Action" /> - <projects id="2" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:org.struts.Filter" name="Filter" + <projects id="2" root_id="[null]" scope="FIL" qualifier="FIL" kee="org.struts:struts:/src/main/java/org/struts/Filter.java" name="Filter" description="[null]" long_name="org.struts.Filter" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" /> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts:org.struts.Filter" /> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update-result.xml index 60bc0572238..ba1fcbfe097 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update-result.xml @@ -2,6 +2,6 @@ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="MVC Framework" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="/foo/bar" deprecated_kee="deprecated key"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml index fdd155a71a6..9ba62dc1976 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceDaoTest/update.xml @@ -2,6 +2,6 @@ <projects id="1" root_id="200" scope="PRJ" qualifier="TRK" kee="old key" name="old name" description="old name" long_name="old long name" - enabled="[false]" language="old" copy_resource_id="2" person_id="3" created_at="[null]" path="/old/foo/bar"/> + enabled="[false]" language="old" copy_resource_id="2" person_id="3" created_at="[null]" path="/old/foo/bar" deprecated_kee="old deprecated key"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml index 7a1469afe6b..e3c65aea1e3 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shared.xml @@ -3,48 +3,48 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="[null]" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts"/> <!-- **************** First sub 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]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"/> <!-- **************** Second sub project **************** --> <projects id="5" root_id="1" kee="org.struts:struts-ui" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="org.struts:struts-ui:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-ui:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-ui:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-ui:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext"/> <!-- **************** Another independent project **************** --> <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" scope="PRJ" qualifier="BRC" long_name="Foo Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml index 85e3d646568..b55b2699b11 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKey-result.xml @@ -3,48 +3,48 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" description="[null]" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts"/> <!-- **************** First sub project **************** --> <projects id="2" root_id="1" kee="org.apache.struts:struts-core" name="Struts Core" scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.apache.struts:struts-core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.apache.struts:struts-core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext"/> <!-- **************** Second sub project **************** --> <projects id="5" root_id="1" kee="org.apache.struts:struts-ui" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="org.apache.struts:struts-ui:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.apache.struts:struts-ui:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-ui:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-ui:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-ui:org.struts.RequestContext"/> <!-- **************** Another independent project **************** --> <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" scope="PRJ" qualifier="BRC" long_name="Foo Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml index 4d5611bdabd..ba73191c96f 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldBulkUpdateKeyOnOnlyOneSubmodule-result.xml @@ -3,48 +3,48 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="[null]" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts"/> <!-- **************** First sub 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]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"/> <!-- **************** Second sub project **************** --> <projects id="5" root_id="1" kee="org.struts:struts-web" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="org.struts:struts-web:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-web:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-web:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-web:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-web:org.struts.RequestContext"/> <!-- **************** Another independent project **************** --> <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" scope="PRJ" qualifier="BRC" long_name="Foo Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml index 0da70e1fed9..55aa9728ecf 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules-result.xml @@ -3,42 +3,42 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.apache.struts:struts" name="Struts" description="[null]" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts"/> <!-- **************** First sub project **************** --> <projects id="2" root_id="1" kee="org.apache.struts:struts-core" name="Struts Core" scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.apache.struts:struts-core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.apache.struts:struts-core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.apache.struts:struts-core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.apache.struts:struts-core:org.struts.RequestContext"/> <!-- **************** Second sub project THAT HAS A DIFFERENT GROUP ID => MUST NOT BE UPDATED **************** --> <projects id="5" root_id="1" kee="foo:struts-ui" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="foo:struts-ui:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="foo:struts-ui:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml index 8b075699918..58d4452c3b1 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldNotUpdateAllSubmodules.xml @@ -3,42 +3,42 @@ <!-- root project --> <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="[null]" long_name="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts"/> <!-- **************** First sub 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]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="org.struts:struts-core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="org.struts:struts-core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-core:org.struts.RequestContext"/> <!-- **************** Second sub project THAT HAS A DIFFERENT GROUP ID => MUST NOT BE UPDATED **************** --> <projects id="5" root_id="1" kee="foo:struts-ui" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="foo:struts-ui:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="foo:struts-ui:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="foo:struts-ui:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-ui:org.struts.RequestContext"/> </dataset> diff --git a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml index 894780b152a..360bd068c94 100644 --- a/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.xml +++ b/sonar-core/src/test/resources/org/sonar/core/resource/ResourceKeyUpdaterDaoTest/shouldUpdateKey-result.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="Apache Struts" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts"/> <!-- **************** First sub project **************** --> @@ -11,42 +11,42 @@ <!-- --> <projects id="2" root_id="1" kee="struts:core" name="Struts Core" scope="PRJ" qualifier="BRC" long_name="Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core"/> <!-- directory --> - <projects long_name="org.struts" id="3" scope="DIR" qualifier="PAC" kee="struts:core:org.struts" + <projects long_name="org.struts" id="3" scope="DIR" qualifier="DIR" kee="struts:core:/src/org/struts" name="org.struts" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="struts:core:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="4" scope="FIL" qualifier="CLA" kee="struts:core:/src/org/struts/RequestContext.java" name="RequestContext" root_id="2" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="struts:core:org.struts.RequestContext"/> <!-- **************** Second sub project **************** --> <projects id="5" root_id="1" kee="org.struts:struts-ui" name="Struts UI" scope="PRJ" qualifier="BRC" long_name="Struts UI" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui"/> <!-- directory --> - <projects long_name="org.struts" id="6" scope="DIR" qualifier="PAC" kee="org.struts:struts-ui:org.struts" + <projects long_name="org.struts" id="6" scope="DIR" qualifier="DIR" kee="org.struts:struts-ui:/src/org/struts" name="org.struts" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts"/> <!-- file --> - <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-ui:org.struts.RequestContext" + <projects long_name="org.struts.RequestContext" id="7" scope="FIL" qualifier="CLA" kee="org.struts:struts-ui:/src/org/struts/RequestContext.java" name="RequestContext" root_id="5" description="[null]" - enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="org.struts:struts-ui:org.struts.RequestContext"/> <!-- **************** Another independent project **************** --> <projects id="8" root_id="[null]" kee="foo:struts-core" name="Foo Struts Core" scope="PRJ" qualifier="BRC" long_name="Foo Struts Core" - description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]"/> + description="[null]" enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo:struts-core"/> </dataset> |