You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by oc...@apache.org on 2009/05/07 12:35:27 UTC

svn commit: r772595 - /continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Author: oching
Date: Thu May  7 10:35:27 2009
New Revision: 772595

URL: http://svn.apache.org/viewvc?rev=772595&view=rev
Log:
[CONTINUUM-2193]
o set all related projects in project and build definitions map instead of just the root project

Modified:
    continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=772595&r1=772594&r2=772595&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/branches/continuum-flat-multi-module/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Thu May  7 10:35:27 2009
@@ -30,7 +30,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -3353,35 +3352,9 @@
             {
                 projectsAndBuildDefinitionsMap = new HashMap<Integer, Integer>();
             }
-
-            // TODO: deng - do we still need a projects and build definitions map?
-            //    consider migrated multi-module projects which were checked out in separate directories!
-            //    how would they be affected by these changes?
-            if( project.isCheckedOutInSingleDirectory() )
-            {
-                Set<Integer> keys = projectsAndBuildDefinitionsMap.keySet();
-                if( keys != null && !keys.isEmpty() )
-                {                
-                    for( Integer key : keys )
-                    {
-                        if( key.intValue() > projectId )
-                        {
-                            projectsAndBuildDefinitionsMap.put( projectId, buildDefId );
-                            map.put( scmRoot, projectsAndBuildDefinitionsMap );
-                        }
-                    } 
-                }
-                else
-                {
-                    projectsAndBuildDefinitionsMap.put( projectId, buildDefId );                    
-                    map.put( scmRoot, projectsAndBuildDefinitionsMap );
-                }
-            }
-            else
-            {
-                projectsAndBuildDefinitionsMap.put( projectId, buildDefId );                
-                map.put( scmRoot, projectsAndBuildDefinitionsMap );
-            }   
+            
+            projectsAndBuildDefinitionsMap.put( projectId, buildDefId );                
+            map.put( scmRoot, projectsAndBuildDefinitionsMap );
         }
 
         prepareBuildProjects( map, trigger );
@@ -3418,37 +3391,9 @@
                 {
                     projectsAndBuildDefinitionsMap = new HashMap<Integer, Integer>();
                 }
-                
-             // TODO: deng - do we still need a projects and build definitions map?
-                // All multi-module projects
-                //    are now checked out in a single directory so once they are built
-                //    consider migrated multi-module projects which were checked out in separate directories!
-                //    how would they be affected by these changes?
-                if( project.isCheckedOutInSingleDirectory() )
-                {
-                    Set<Integer> keys = projectsAndBuildDefinitionsMap.keySet();
-                    if( keys != null && !keys.isEmpty() )
-                    {                
-                        for( Integer key : keys )
-                        {
-                            if( key.intValue() > projectId )
-                            {
-                                projectsAndBuildDefinitionsMap.put( projectId, buildDefinitionId );
-                                map.put( scmRoot, projectsAndBuildDefinitionsMap );
-                            }
-                        } 
-                    }
-                    else
-                    {
-                        projectsAndBuildDefinitionsMap.put( projectId, buildDefinitionId );                    
-                        map.put( scmRoot, projectsAndBuildDefinitionsMap );
-                    }
-                }
-                else
-                {
-                    projectsAndBuildDefinitionsMap.put( projectId, buildDefinitionId );                    
-                    map.put( scmRoot, projectsAndBuildDefinitionsMap );
-                }   
+             
+                projectsAndBuildDefinitionsMap.put( projectId, buildDefinitionId );                    
+                map.put( scmRoot, projectsAndBuildDefinitionsMap );                
             }
             catch ( BuildManagerException e )
             {