}
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) {
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");
+++ /dev/null
-<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