continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r945152 - in /continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache: continuum/release/phase/ maven/continuum/release/executors/
Date Mon, 17 May 2010 13:47:09 GMT
Author: oching
Date: Mon May 17 13:47:08 2010
New Revision: 945152

URL: http://svn.apache.org/viewvc?rev=945152&view=rev
Log:
o update release perform and prepare to use respective non-deprecated methods in maven-release

Modified:
    continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPerformGoalsPhase.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPrepareGoalsPhase.java
    continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPerformGoalsPhase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPerformGoalsPhase.java?rev=945152&r1=945151&r2=945152&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPerformGoalsPhase.java
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPerformGoalsPhase.java
Mon May 17 13:47:08 2010
@@ -27,6 +27,7 @@ import org.apache.maven.shared.release.R
 import org.apache.maven.shared.release.ReleaseFailureException;
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.shared.release.env.ReleaseEnvironment;
 import org.codehaus.plexus.util.StringUtils;
 
 /**
@@ -42,10 +43,11 @@ public class RunPerformGoalsPhase
         return releaseDescriptor.getPerformGoals();
     }
 
-    public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, Settings settings,
List reactorProjects )
-        throws ReleaseExecutionException, ReleaseFailureException
-    {
-        String additionalArguments = releaseDescriptor.getAdditionalArguments();
+    public ReleaseResult execute(ReleaseDescriptor releaseDescriptor,
+			ReleaseEnvironment releaseEnvironment, List reactorProjects)
+			throws ReleaseExecutionException, ReleaseFailureException {
+		
+    	String additionalArguments = releaseDescriptor.getAdditionalArguments();
 
         if ( releaseDescriptor.isUseReleaseProfile() )
         {
@@ -58,10 +60,10 @@ public class RunPerformGoalsPhase
                 additionalArguments = "-DperformRelease=true";
             }
         }
-
+        
         return execute( releaseDescriptor, new File( releaseDescriptor.getCheckoutDirectory()
), additionalArguments );
-    }
-
+	}
+    
     public ReleaseResult simulate( ReleaseDescriptor releaseDescriptor, Settings settings,
List reactorProjects )
         throws ReleaseExecutionException, ReleaseFailureException
     {

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPrepareGoalsPhase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPrepareGoalsPhase.java?rev=945152&r1=945151&r2=945152&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPrepareGoalsPhase.java
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/continuum/release/phase/RunPrepareGoalsPhase.java
Mon May 17 13:47:08 2010
@@ -27,6 +27,7 @@ import org.apache.maven.shared.release.R
 import org.apache.maven.shared.release.ReleaseFailureException;
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.shared.release.env.ReleaseEnvironment;
 
 /**
  * Run Release Preparation Goals
@@ -41,12 +42,13 @@ public class RunPrepareGoalsPhase
         return releaseDescriptor.getPreparationGoals();
     }
 
-    public ReleaseResult execute( ReleaseDescriptor releaseDescriptor, Settings settings,
List reactorProjects )
-        throws ReleaseExecutionException, ReleaseFailureException
-    {
-        return execute( releaseDescriptor, new File( releaseDescriptor.getWorkingDirectory()
), 
-                        releaseDescriptor.getAdditionalArguments() );
-    }
+    public ReleaseResult execute(ReleaseDescriptor releaseDescriptor,
+			ReleaseEnvironment releaseEnvironment, List reactorProjects)
+			throws ReleaseExecutionException, ReleaseFailureException {
+		
+    	return execute( releaseDescriptor, new File( releaseDescriptor.getWorkingDirectory()
), 
+                releaseDescriptor.getAdditionalArguments() );
+	}
 
     public ReleaseResult simulate( ReleaseDescriptor releaseDescriptor, Settings settings,
List reactorProjects )
         throws ReleaseExecutionException, ReleaseFailureException

Modified: continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java?rev=945152&r1=945151&r2=945152&view=diff
==============================================================================
--- continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
(original)
+++ continuum/branches/continuum-flat-multi-module-updated/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
Mon May 17 13:47:08 2010
@@ -41,6 +41,7 @@ import org.apache.maven.settings.Setting
 import org.apache.maven.shared.release.ReleaseManagerListener;
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
+import org.apache.maven.shared.release.env.DefaultReleaseEnvironment;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.context.Context;
@@ -80,7 +81,7 @@ public class PerformReleaseTaskExecutor
         descriptor.setUseReleaseProfile( performTask.isUseReleaseProfile() );
         descriptor.setPerformGoals( performTask.getGoals() );
         descriptor.setCheckoutDirectory( performTask.getBuildDirectory().getAbsolutePath()
);
-
+        
         repository = performTask.getLocalRepository();
 
         List reactorProjects = null;
@@ -106,8 +107,10 @@ public class PerformReleaseTaskExecutor
 
             throw new TaskExecutionException( "Failed to build reactor projects.", e );
         }
-
-        ReleaseResult result = releaseManager.performWithResult( descriptor, settings, reactorProjects,
listener );
+        
+        ReleaseResult result =
+            releaseManager.performWithResult( descriptor, new DefaultReleaseEnvironment().setSettings(
settings ),
+                                              reactorProjects, listener );
         
         //override to show the actual start time
         result.setStartTime( getStartTime() );
@@ -224,6 +227,7 @@ public class PerformReleaseTaskExecutor
 	
 	    if ( StringUtils.isEmpty( descriptor.getWorkingDirectory() ) )
 	    {
+	    	System.out.println( "[PerformReleaseTaskExecutor] descriptors working dir is empty!"
);
 	        //Perform with provided release parameters (CONTINUUM-1541)
 	        descriptor.setCheckoutDirectory( releaseTask.getBuildDirectory().getAbsolutePath()
);
 	        return null;



Mime
View raw message