diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-04-26 23:48:49 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-04-26 23:48:49 +0400 |
commit | 120cc721996f295724bc889d3497ff20aa1351c7 (patch) | |
tree | 39eba2cc2df8305308008bdec1c341f248df7b2a /sonar-batch | |
parent | e4316bd324d4dfc6fc6766e8cac87076c918c13f (diff) | |
download | sonarqube-120cc721996f295724bc889d3497ff20aa1351c7.tar.gz sonarqube-120cc721996f295724bc889d3497ff20aa1351c7.zip |
SONAR-2298 Rename MavenProjectBuilder to ProjectBuilder
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java (renamed from sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java) | 7 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java | 6 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/ProjectBuilderTest.java (renamed from sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java) | 6 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java | 4 | ||||
-rw-r--r-- | sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml (renamed from sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml) | 0 | ||||
-rw-r--r-- | sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysis.xml (renamed from sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysis.xml) | 0 | ||||
-rw-r--r-- | sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml (renamed from sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml) | 0 | ||||
-rw-r--r-- | sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isNotLatestAnalysis.xml (renamed from sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isNotLatestAnalysis.xml) | 0 |
8 files changed, 11 insertions, 12 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java index 48bc41730b0..c652ce8a76e 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectBuilder.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectBuilder.java @@ -36,12 +36,11 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -// TODO Godin: rename to ProjectBuilder ? -public class MavenProjectBuilder { +public class ProjectBuilder { private DatabaseSession databaseSession; - public MavenProjectBuilder(DatabaseSession databaseSession) { + public ProjectBuilder(DatabaseSession databaseSession) { this.databaseSession = databaseSession; } @@ -49,7 +48,7 @@ public class MavenProjectBuilder { Configuration configuration = getStartupConfiguration(project); return new Project(loadProjectKey(project), loadProjectBranch(configuration), loadProjectName(project)) .setDescription(project.getProperties().getProperty(CoreProperties.PROJECT_DESCRIPTION_PROPERTY)) - .setPackaging("jar"); // FIXME http://jira.codehaus.org/browse/SONAR-2341 + .setPackaging("jar"); } Configuration getStartupConfiguration(ProjectDefinition project) { diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java index ac2db745ec3..72a599821e6 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java +++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectTree.java @@ -36,11 +36,11 @@ import java.util.*; public class ProjectTree { private List<Project> projects; - private MavenProjectBuilder projectBuilder; + private ProjectBuilder projectBuilder; private List<ProjectDefinition> definitions; public ProjectTree(Reactor sonarReactor, DatabaseSession databaseSession) { - this.projectBuilder = new MavenProjectBuilder(databaseSession); + this.projectBuilder = new ProjectBuilder(databaseSession); definitions = Lists.newArrayList(); for (ProjectDefinition project : sonarReactor.getSortedProjects()) { collectProjects(project, definitions); @@ -50,7 +50,7 @@ public class ProjectTree { /** * for unit tests */ - protected ProjectTree(MavenProjectBuilder projectBuilder, List<MavenProject> poms) { + protected ProjectTree(ProjectBuilder projectBuilder, List<MavenProject> poms) { this.projectBuilder = projectBuilder; definitions = Lists.newArrayList(); collectProjects(MavenProjectConverter.convert(poms), definitions); diff --git a/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectBuilderTest.java index 734f4e64424..ffa872b0e1b 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/MavenProjectBuilderTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectBuilderTest.java @@ -35,13 +35,13 @@ import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -public class MavenProjectBuilderTest extends AbstractDbUnitTestCase { +public class ProjectBuilderTest extends AbstractDbUnitTestCase { - private MavenProjectBuilder builder = null; + private ProjectBuilder builder = null; @Before public void before() { - builder = new MavenProjectBuilder(getSession()); + builder = new ProjectBuilder(getSession()); } @Test 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 c494dfb02bc..fc05f42a4ac 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectTreeTest.java @@ -200,7 +200,7 @@ public class ProjectTreeTest extends AbstractDbUnitTestCase { return pom; } - private MavenProjectBuilder newProjectBuilder() { - return new MavenProjectBuilder(getSession()); + private ProjectBuilder newProjectBuilder() { + return new ProjectBuilder(getSession()); } } diff --git a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml index 2f95da16602..2f95da16602 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/MavenPluginsConfiguratorTest/pom.xml diff --git a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysis.xml index 8742237c8c6..8742237c8c6 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysis.xml diff --git a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml index 525f99850b6..525f99850b6 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isLatestAnalysisIfNeverAnalysed.xml diff --git a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isNotLatestAnalysis.xml b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isNotLatestAnalysis.xml index 679a9d9837d..679a9d9837d 100644 --- a/sonar-batch/src/test/resources/org/sonar/batch/MavenProjectBuilderTest/isNotLatestAnalysis.xml +++ b/sonar-batch/src/test/resources/org/sonar/batch/ProjectBuilderTest/isNotLatestAnalysis.xml |