continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r521668 - in /maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release: executors/PerformReleaseTaskExecutor.java phase/GenerateReactorProjectsPhase.java
Date Fri, 23 Mar 2007 10:49:24 GMT
Author: evenisse
Date: Fri Mar 23 03:49:23 2007
New Revision: 521668

URL: http://svn.apache.org/viewvc?view=rev&rev=521668
Log:
[CONTINUUM-1219] Add modules in reactor projects list and sort them
Submitted by: Lester Ecarma

Modified:
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
    maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java?view=diff&rev=521668&r1=521667&r2=521668
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
(original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
Fri Mar 23 03:49:23 2007
@@ -135,6 +135,8 @@
                                             getLocalRepository(), getProfileManager( settings
) );
 
             reactorProjects.add( project );
+            
+            addModules( reactorProjects, project );
         }
         catch ( ProjectBuildingException e )
         {
@@ -148,7 +150,26 @@
         {
             throw new ContinuumReleaseException( "Failed to build project.", e );
         }
+        
+        try
+        {
+            reactorProjects = new ProjectSorter( reactorProjects ).getSortedProjects();
+        }
+        catch ( CycleDetectedException e )
+        {
+            throw new ContinuumReleaseException( "Failed to sort projects.", e );
+        }
+        catch ( DuplicateProjectException e )
+        {
+            throw new ContinuumReleaseException( "Failed to sort projects.", e );
+        }
 
+        return reactorProjects;
+    }
+
+    private void addModules( List reactorProjects, MavenProject project )
+        throws ContinuumReleaseException
+    {
         for( Iterator modules = project.getModules().iterator(); modules.hasNext(); )
         {
             String moduleDir = modules.next().toString();
@@ -161,6 +182,8 @@
                                                                     getProfileManager( settings
) );
 
                 reactorProjects.add( reactorProject );
+                
+                addModules( reactorProjects, reactorProject );
             }
             catch ( ProjectBuildingException e )
             {
@@ -175,23 +198,7 @@
                 throw new ContinuumReleaseException( "Failed to build project.", e );
             }
         }
-
-        try
-        {
-            reactorProjects = new ProjectSorter( reactorProjects ).getSortedProjects();
-        }
-        catch ( CycleDetectedException e )
-        {
-            throw new ContinuumReleaseException( "Failed to sort projects.", e );
-        }
-        catch ( DuplicateProjectException e )
-        {
-            throw new ContinuumReleaseException( "Failed to sort projects.", e );
-        }
-
-        return reactorProjects;
     }
-
 
     private File getProjectDescriptorFile( ReleaseDescriptor descriptor )
     {

Modified: maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?view=diff&rev=521668&r1=521667&r2=521668
==============================================================================
--- maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
(original)
+++ maven/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Fri Mar 23 03:49:23 2007
@@ -105,6 +105,8 @@
                                             getLocalRepository(), getProfileManager( getSettings()
) );
 
             reactorProjects.add( project );
+            
+            addModules( reactorProjects, project );
         }
         catch ( ProjectBuildingException e )
         {
@@ -119,6 +121,25 @@
             throw new ContinuumReleaseException( "Failed to build project.", e );
         }
 
+        try
+        {
+            reactorProjects = new ProjectSorter( reactorProjects ).getSortedProjects();
+        }
+        catch ( CycleDetectedException e )
+        {
+            throw new ContinuumReleaseException( "Failed to sort projects.", e );
+        }
+        catch ( DuplicateProjectException e )
+        {
+            throw new ContinuumReleaseException( "Failed to sort projects.", e );
+        }
+
+        return reactorProjects;
+    }
+    
+    private void addModules( List reactorProjects, MavenProject project )
+        throws ContinuumReleaseException
+    {
         for( Iterator modules = project.getModules().iterator(); modules.hasNext(); )
         {
             String moduleDir = modules.next().toString();
@@ -131,6 +152,8 @@
                                                                     getProfileManager( getSettings()
) );
 
                 reactorProjects.add( reactorProject );
+                
+                addModules( reactorProjects, reactorProject );
             }
             catch ( ProjectBuildingException e )
             {
@@ -145,21 +168,6 @@
                 throw new ContinuumReleaseException( "Failed to build project.", e );
             }
         }
-
-        try
-        {
-            reactorProjects = new ProjectSorter( reactorProjects ).getSortedProjects();
-        }
-        catch ( CycleDetectedException e )
-        {
-            throw new ContinuumReleaseException( "Failed to sort projects.", e );
-        }
-        catch ( DuplicateProjectException e )
-        {
-            throw new ContinuumReleaseException( "Failed to sort projects.", e );
-        }
-
-        return reactorProjects;
     }
 
     private File getProjectDescriptorFile( ReleaseDescriptor descriptor )



Mime
View raw message