continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r472221 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Tue, 07 Nov 2006 19:35:43 GMT
Author: jmcconnell
Date: Tue Nov  7 11:35:42 2006
New Revision: 472221

URL: http://svn.apache.org/viewvc?view=rev&rev=472221
Log:
if there is a cycle detected on a scheduled build of a project group then all projects would
be built unordered, no just the projects in that project group, so fix it so that only those
projects in that project group would be built unsorted

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=472221&r1=472220&r2=472221
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Tue Nov  7 11:35:42 2006
@@ -539,9 +539,12 @@
 
         Map projectGroupsMap = null;
 
+        // get the Maps of id's that are effected by this schedule
         try
         {
-            // todo the store should get cleaned up some so this isn't as clunky, I think
the store should be able to return all of these info
+            // todo the store should get cleaned up some so this isn't as clunky,
+            // todo I think the store should be able to return all of these info
+
             projectsMap = store.getProjectIdsAndBuildDefinitionsIdsBySchedule( schedule.getId()
);
 
             projectGroupsMap = store.getProjectGroupIdsAndBuildDefinitionsIdsBySchedule(
schedule.getId() );
@@ -560,10 +563,13 @@
 
         Collection projectGroups = getAllProjectGroupsWithProjects();
 
+        // walk through all of the project groups
         for ( Iterator i = projectGroups.iterator(); i.hasNext(); )
         {
+            // get the project group
             ProjectGroup projectGroup = (ProjectGroup) i.next();
 
+            // get all the sorted projects in a project group
             try
             {
                 projectsList = getProjectsInBuildOrder( store.getProjectsWithDependenciesByGroupId(
projectGroup.getId() ) );
@@ -573,13 +579,15 @@
                 getLogger().warn(
                     "Cycle detected while sorting projects for building, falling back to
unsorted build." );
 
-                projectsList = getProjects();
+                projectsList = getProjectsInGroup( projectGroup.getId() );
             }
 
             getLogger().info( "Building " + projectsList.size() + " projects" );
 
+            // get the group build definitions associated with this project group
             List groupBuildDefinitionIds = (List) projectGroupsMap.get( new Integer( projectGroup.getId()
) );
 
+            // iterate through the sorted (or potentially unsorted) projects in this project
group
             for ( Iterator j = projectsList.iterator(); j.hasNext(); )
             {
                 Project project = (Project) j.next();



Mime
View raw message