continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From epunza...@apache.org
Subject svn commit: r439242 - /maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Date Fri, 01 Sep 2006 09:00:52 GMT
Author: epunzalan
Date: Fri Sep  1 02:00:51 2006
New Revision: 439242

URL: http://svn.apache.org/viewvc?rev=439242&view=rev
Log:
PR: CONTINUUM-727

fixed some bugs from prev commit

Modified:
    maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java

Modified: maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?rev=439242&r1=439241&r2=439242&view=diff
==============================================================================
--- maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
(original)
+++ maven/continuum/branches/release-integration/continuum/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Fri Sep  1 02:00:51 2006
@@ -16,34 +16,38 @@
  * limitations under the License.
  */
 
-import org.apache.maven.plugins.release.ReleaseManager;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.apache.maven.plugins.release.ReleaseExecutionException;
 import org.apache.maven.plugins.release.ReleaseFailureException;
+import org.apache.maven.plugins.release.ReleaseManager;
 import org.apache.maven.plugins.release.config.ReleaseDescriptor;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileManager;
+import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
-import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.ProjectSorter;
+import org.apache.maven.project.DuplicateProjectException;
 import org.apache.maven.settings.Settings;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
-import java.util.Map;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
 import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @author Jason van Zyl
+ * @author Edwin Punzalan
  */
 public class DefaultContinuumReleaseManager
     implements ContinuumReleaseManager, Contextualizable
@@ -138,18 +142,32 @@
         {
             String moduleDir = modules.next().toString();
 
-            File pomFile = new File( project.getBasedir(), moduleDir );
+            File pomFile = new File( project.getBasedir(), moduleDir + "/pom.xml" );
 
             try
             {
-                projectBuilder.build( pomFile, getLocalRepository(), getProfileManager( settings
) );
+                MavenProject reactorProject = projectBuilder.build( pomFile, getLocalRepository(),
+                                                                    getProfileManager( settings
) );
 
-                reactorProjects.add( projectBuilder );
+                reactorProjects.add( reactorProject );
             }
             catch ( ProjectBuildingException e )
             {
                 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;



Mime
View raw message