diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-05-04 15:50:46 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-05-04 15:50:46 +0400 |
commit | 76bed236592c538acd248009af0a0126b47354fb (patch) | |
tree | 9ff265ce0228db9705b203447749eec084f950c3 | |
parent | 98c661a1e31158b6024bc4339a34b255d643530e (diff) | |
download | sonarqube-76bed236592c538acd248009af0a0126b47354fb.tar.gz sonarqube-76bed236592c538acd248009af0a0126b47354fb.zip |
SONAR-2409 Remove ability to use deprecated property 'branch'
3 files changed, 1 insertions, 24 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java index b281c467154..1761431ce7f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java @@ -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) { diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java index fc05f42a4ac..baf1629cfc7 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java @@ -104,17 +104,6 @@ public class ProjectTreeTest extends AbstractDbUnitTestCase { } @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"); Project bar = newProjectWithArtifactId("sub1"); 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 index 3fadbf40db1..00000000000 --- a/sonar-batch/src/test/resources/org/sonar/batch/ProjectTreeTest/keyIncludesDeprecatedBranch/pom.xml +++ /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 |