continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r321190 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Fri, 14 Oct 2005 19:26:31 GMT
Author: evenisse
Date: Fri Oct 14 12:25:35 2005
New Revision: 321190

URL: http://svn.apache.org/viewcvs?rev=321190&view=rev
Log:
[CONTINUUM-39] Build in correct order

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/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=321190&r1=321189&r2=321190&view=diff
==============================================================================
--- 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
Fri Oct 14 12:25:35 2005
@@ -195,6 +195,10 @@
     {
         try
         {
+            Project project = store.getProject( projectId );
+
+            getLogger().info( "Remove project " + project.getName() + "(" + projectId + ")"
);
+
             File workingDirectory = getWorkingDirectory( projectId );
 
             FileUtils.deleteDirectory( workingDirectory );
@@ -253,41 +257,53 @@
     public void buildProjects( int trigger )
         throws ContinuumException
     {
+        /*
         for ( Iterator i = getProjects().iterator(); i.hasNext(); )
         {
             Project project = (Project) i.next();
 
             buildProject( project.getId(), trigger );
         }
+        */
+
+        Collection projectsList = null;
 
-        /*
         try
         {
-            for ( Iterator i = getProjectsInBuildOrder().iterator(); i.hasNext(); )
-            {
-                ContinuumProject project = (ContinuumProject) i.next();
-
-                buildProject( project.getId(), force );
-            }
+            projectsList = getProjectsInBuildOrder();
         }
         catch ( CycleDetectedException e )
         {
             getLogger().warn( "Cycle detected while sorting projects for building, falling
back to unsorted build." );
 
-            for ( Iterator i = getProjects().iterator(); i.hasNext(); )
-            {
-                ContinuumProject project = (ContinuumProject) i.next();
+            projectsList = getProjects();
+        }
+
+        for ( Iterator i = projectsList.iterator(); i.hasNext(); )
+        {
+            Project project = (Project) i.next();
 
-                buildProject( project.getId(), force );
-            }
+            buildProject( project.getId(), trigger );
         }
-        */
     }
 
     public void buildProjects( Schedule schedule )
         throws ContinuumException
     {
-        for ( Iterator projectIterator = getProjects().iterator(); projectIterator.hasNext();
)
+        Collection projectsList = null;
+
+        try
+        {
+            projectsList = getProjectsInBuildOrder();
+        }
+        catch ( CycleDetectedException e )
+        {
+            getLogger().warn( "Cycle detected while sorting projects for building, falling
back to unsorted build." );
+
+            projectsList = getProjects();
+        }
+
+        for ( Iterator projectIterator = projectsList.iterator(); projectIterator.hasNext();
)
         {
             Project p = (Project) projectIterator.next();
 



Mime
View raw message