The build order of a multi-module project is wrong even after calling ProjectSorter.getSortedProjects() Calling getProjectsWithDependenciesByGroupId() instead of getProjectWithDependencies() fixed it.
I'll create a test for this. Thanks, -- Marica On Wed, Sep 9, 2009 at 11:10 AM, Wendy Smoak <[email protected]> wrote: > Can you explain more about what was wrong, and how this fixed it? Is > there any way to test it? Thanks, -Wendy > > On Tue, Sep 8, 2009 at 6:38 PM, <[email protected]> wrote: > > Author: ctan > > Date: Wed Sep 9 01:38:37 2009 > > New Revision: 812746 > > > > URL: http://svn.apache.org/viewvc?rev=812746&view=rev > > Log: > > [CONTINUUM-2356] fixed build order in distributed build > > merge -r 812744:812745 of 1.3.x branch > > > > Modified: > > > > continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java > > > > Modified: > continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java > > URL: > http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=812746&r1=812745&r2=812746&view=diff > > > ============================================================================== > > --- > continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java > (original) > > +++ > continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java > Wed Sep 9 01:38:37 2009 > > @@ -132,19 +132,15 @@ > > throws ContinuumException > > { > > List<Map<String, Object>> buildContext = new > ArrayList<Map<String, Object>>(); > > - List<Project> projects = new ArrayList<Project>(); > > > > try > > { > > - for ( Integer projectId : > projectsAndBuildDefinitions.keySet() ) > > - { > > - Project project = projectDao.getProjectWithDependencies( > projectId ); > > - projects.add( project ); > > - } > > + ProjectScmRoot scmRoot = > projectScmRootDao.getProjectScmRoot( scmRootId ); > > > > - projects = ProjectSorter.getSortedProjects( projects, null > ); > > + List<Project> projects = > projectDao.getProjectsWithDependenciesByGroupId( > scmRoot.getProjectGroup().getId() ); > > + List<Project> sortedProjects = > ProjectSorter.getSortedProjects( projects, null ); > > > > - for ( Project project : projects ) > > + for ( Project project : sortedProjects ) > > { > > int buildDefinitionId = projectsAndBuildDefinitions.get( > project.getId() ); > > BuildDefinition buildDef = > buildDefinitionDao.getBuildDefinition( buildDefinitionId ); > > > > > > >
