]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2409 Remove ability to use deprecated property 'branch'
authorEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 4 May 2011 11:50:46 +0000 (15:50 +0400)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Wed, 4 May 2011 11:50:46 +0000 (15:50 +0400)
sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java
sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java
sonar-batch/src/test/resources/org/sonar/batch/ProjectTreeTest/keyIncludesDeprecatedBranch/pom.xml [deleted file]

index b281c467154cc932eb3442831525620902e9d524..1761431ce7f5987a78dcc42fd13289ba4db62996 100644 (file)
@@ -78,7 +78,7 @@ public class ProjectBuilder {
   }
 
   String loadProjectBranch(Configuration configuration) {
-    return configuration.getString(CoreProperties.PROJECT_BRANCH_PROPERTY, configuration.getString("branch" /* deprecated property */));
+    return configuration.getString(CoreProperties.PROJECT_BRANCH_PROPERTY);
   }
 
   public void configure(Project project, ProjectDefinition def) {
index fc05f42a4ac959e18c241db9fffc05b6b8bdf401..baf1629cfc78523f57b2308101af3d6047a12807 100644 (file)
@@ -103,17 +103,6 @@ public class ProjectTreeTest extends AbstractDbUnitTestCase {
     assertThat(tree.getRootProject().getName(), is("Project BRANCH-1.X"));
   }
 
-  @Test
-  public void keyIncludesDeprecatedBranch() throws IOException, XmlPullParserException, URISyntaxException {
-    MavenProject pom = loadProject("/org/sonar/batch/ProjectTreeTest/keyIncludesDeprecatedBranch/pom.xml", true);
-
-    ProjectTree tree = new ProjectTree(newProjectBuilder(), Arrays.asList(pom));
-    tree.start();
-
-    assertThat(tree.getRootProject().getKey(), is("org.test:project:BRANCH-1.X"));
-    assertThat(tree.getRootProject().getName(), is("Project BRANCH-1.X"));
-  }
-
   @Test
   public void doNotSkipAnyModules() {
     Project foo = newProjectWithArtifactId("root");
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/ProjectTreeTest/keyIncludesDeprecatedBranch/pom.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectTreeTest/keyIncludesDeprecatedBranch/pom.xml
deleted file mode 100644 (file)
index 3fadbf4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.test</groupId>
-  <artifactId>project</artifactId>
-  <version>0.1-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>Project</name>
-  <properties>
-    <branch>BRANCH-1.X</branch>
-  </properties>
-</project>
\ No newline at end of file