continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372236 - in /continuum/trunk: continuum-release/src/main/java/org/apache/maven/continuum/release/executors/ continuum-release/src/test/java/org/apache/maven/continuum/release/phase/ continuum-webapp/src/main/java/org/apache/continuum/web/...
Date Mon, 13 Aug 2012 01:41:29 GMT
Author: brett
Date: Mon Aug 13 01:41:28 2012
New Revision: 1372236

URL: http://svn.apache.org/viewvc?rev=1372236&view=rev
Log:
formatting only

Modified:
    continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
    continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/phase/UpdateWorkingCopyPhaseTest.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java?rev=1372236&r1=1372235&r2=1372236&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
(original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/executors/PerformReleaseTaskExecutor.java
Mon Aug 13 01:41:28 2012
@@ -19,10 +19,6 @@ package org.apache.maven.continuum.relea
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
@@ -51,6 +47,10 @@ import org.codehaus.plexus.taskqueue.exe
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @author Edwin Punzalan
  * @version $Id$
@@ -81,18 +81,18 @@ public class PerformReleaseTaskExecutor
         descriptor.setUseReleaseProfile( performTask.isUseReleaseProfile() );
         descriptor.setPerformGoals( performTask.getGoals() );
         descriptor.setCheckoutDirectory( performTask.getBuildDirectory().getAbsolutePath()
);
-        
+
         repository = performTask.getLocalRepository();
 
         List reactorProjects = null;
         MavenProject mavenProject = null;
-        
+
         try
         {
-        	mavenProject = getMavenProject( performTask );
-            if( mavenProject != null )
+            mavenProject = getMavenProject( performTask );
+            if ( mavenProject != null )
             {
-                reactorProjects = getReactorProjects( descriptor, mavenProject ); 
+                reactorProjects = getReactorProjects( descriptor, mavenProject );
             }
         }
         catch ( ContinuumReleaseException e )
@@ -107,11 +107,11 @@ public class PerformReleaseTaskExecutor
 
             throw new TaskExecutionException( "Failed to build reactor projects.", e );
         }
-        
+
         ReleaseResult result =
             releaseManager.performWithResult( descriptor, new DefaultReleaseEnvironment().setSettings(
settings ),
                                               reactorProjects, listener );
-        
+
         //override to show the actual start time
         result.setStartTime( getStartTime() );
 
@@ -132,7 +132,7 @@ public class PerformReleaseTaskExecutor
         List<MavenProject> reactorProjects = new ArrayList<MavenProject>();
 
         reactorProjects.add( project );
-       
+
         addModules( reactorProjects, project );
 
         try
@@ -218,30 +218,30 @@ public class PerformReleaseTaskExecutor
     {
         container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
     }
-    
+
     protected MavenProject getMavenProject( PerformReleaseProjectTask releaseTask )
-	    throws ContinuumReleaseException
-	{
-	    ReleaseDescriptor descriptor = releaseTask.getDescriptor();
-	
-	    if ( StringUtils.isEmpty( descriptor.getWorkingDirectory() ) )
-	    {
-	        //Perform with provided release parameters (CONTINUUM-1541)
-	        descriptor.setCheckoutDirectory( releaseTask.getBuildDirectory().getAbsolutePath()
);
-	        return null;
-	    }
-	
-	    MavenProject project;
-	    try
-	    {
-	        project = projectBuilder.build( getProjectDescriptorFile( descriptor ), getLocalRepository(),
-	                                        getProfileManager( settings ) );
-	    }
-	    catch ( ProjectBuildingException e )
-	    {
-	        throw new ContinuumReleaseException( "Failed to build project.", e );
-	    }
-	    
-	    return project;
-	}   
+        throws ContinuumReleaseException
+    {
+        ReleaseDescriptor descriptor = releaseTask.getDescriptor();
+
+        if ( StringUtils.isEmpty( descriptor.getWorkingDirectory() ) )
+        {
+            //Perform with provided release parameters (CONTINUUM-1541)
+            descriptor.setCheckoutDirectory( releaseTask.getBuildDirectory().getAbsolutePath()
);
+            return null;
+        }
+
+        MavenProject project;
+        try
+        {
+            project = projectBuilder.build( getProjectDescriptorFile( descriptor ), getLocalRepository(),
+                                            getProfileManager( settings ) );
+        }
+        catch ( ProjectBuildingException e )
+        {
+            throw new ContinuumReleaseException( "Failed to build project.", e );
+        }
+
+        return project;
+    }
 }

Modified: continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/phase/UpdateWorkingCopyPhaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/phase/UpdateWorkingCopyPhaseTest.java?rev=1372236&r1=1372235&r2=1372236&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/phase/UpdateWorkingCopyPhaseTest.java
(original)
+++ continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/phase/UpdateWorkingCopyPhaseTest.java
Mon Aug 13 01:41:28 2012
@@ -19,101 +19,98 @@ package org.apache.maven.continuum.relea
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.continuum.release.config.ContinuumReleaseDescriptor;
-import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.shared.release.phase.ReleasePhase;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.codehaus.plexus.util.FileUtils;
 
+import java.io.File;
+
 public class UpdateWorkingCopyPhaseTest
     extends PlexusInSpringTestCase
 {
     private UpdateWorkingCopyPhase phase;
-    
+
     protected void setUp()
         throws Exception
     {
         super.setUp();
-        
+
         phase = (UpdateWorkingCopyPhase) lookup( ReleasePhase.ROLE, "update-working-copy"
);
-        
+
         // set up project scm
         File scmPathFile = new File( getBasedir(), "target/scm-src" ).getAbsoluteFile();
         File scmTargetPathFile = new File( getBasedir(), "/target/scm-test" ).getAbsoluteFile();
         FileUtils.copyDirectoryStructure( scmPathFile, scmTargetPathFile );
     }
-    
+
     public void testWorkingDirDoesNotExist()
         throws Exception
     {
         assertNotNull( phase );
-        
+
         ContinuumReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
-        
+
         File workingDirectory = new File( releaseDescriptor.getWorkingDirectory() );
-        
+
         // assert no working directory yet
         assertFalse( workingDirectory.exists() );
-        
+
         phase.execute( releaseDescriptor, new Settings(), null );
-        
+
         assertTrue( workingDirectory.exists() );
     }
-    
+
     public void testWorkingDirAlreadyExistsWithProjectCheckout()
         throws Exception
     {
         assertNotNull( phase );
-        
+
         ContinuumReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
-        
+
         File workingDirectory = new File( releaseDescriptor.getWorkingDirectory() );
-        
+
         // assert working directory already exists with project checkout
         assertTrue( workingDirectory.exists() );
         assertTrue( workingDirectory.listFiles().length > 0 );
-        
+
         phase.execute( releaseDescriptor, new Settings(), null );
-        
+
         assertTrue( workingDirectory.exists() );
     }
-    
+
     public void testWorkingDirAlreadyExistsNoProjectCheckout()
         throws Exception
     {
         assertNotNull( phase );
-        
+
         ContinuumReleaseDescriptor releaseDescriptor = createReleaseDescriptor();
-        
+
         File workingDirectory = new File( releaseDescriptor.getWorkingDirectory() );
         FileUtils.deleteDirectory( workingDirectory );
         workingDirectory.mkdirs();
-        
+
         // assert empty working directory
         assertTrue( workingDirectory.exists() );
         assertTrue( workingDirectory.listFiles().length == 0 );
-        
+
         phase.execute( releaseDescriptor, new Settings(), null );
-        
+
         assertTrue( workingDirectory.exists() );
     }
-    
+
     private ContinuumReleaseDescriptor createReleaseDescriptor()
     {
         // project source and working directory paths
         String projectUrl = getBasedir() + "/target/scm-test/trunk";
         String workingDirPath = getBasedir() + "/target/test-classes/updateWorkingCopy_working-directory";
-        
+
         // create release descriptor
         ContinuumReleaseDescriptor releaseDescriptor = new ContinuumReleaseDescriptor();
         releaseDescriptor.setScmSourceUrl( "scm:svn:file://localhost/" + projectUrl );
         releaseDescriptor.setWorkingDirectory( workingDirPath );
-        
+
         return releaseDescriptor;
     }
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java?rev=1372236&r1=1372235&r2=1372236&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java
Mon Aug 13 01:41:28 2012
@@ -19,13 +19,8 @@ package org.apache.continuum.web.action;
  * under the License.
  */
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.continuum.configuration.BuildAgentGroupConfiguration;
 import org.apache.continuum.configuration.BuildAgentConfiguration;
+import org.apache.continuum.configuration.BuildAgentGroupConfiguration;
 import org.apache.continuum.release.distributed.DistributedReleaseUtil;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.system.Installation;
@@ -33,6 +28,11 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class AbstractReleaseAction
     extends ContinuumActionSupport
 {
@@ -44,12 +44,13 @@ public class AbstractReleaseAction
         }
 
         Map<String, String> envVars = new HashMap<String, String>();
-        
+
         if ( defaultBuildagent != null && defaultBuildagent.length() > 0 )
         {
             // get buildagent to be used from the buildagent group for distributed builds
setup
-            BuildAgentGroupConfiguration group = getContinuum().getConfiguration().getBuildAgentGroup(
profile.getBuildAgentGroup() );
-            
+            BuildAgentGroupConfiguration group =
+                getContinuum().getConfiguration().getBuildAgentGroup( profile.getBuildAgentGroup()
);
+
             if ( group != null )
             {
                 List<BuildAgentConfiguration> agents = group.getBuildAgents();
@@ -83,7 +84,8 @@ public class AbstractReleaseAction
         Installation builder = profile.getBuilder();
         if ( builder != null )
         {
-            envVars.put( getContinuum().getInstallationService().getEnvVar( InstallationService.MAVEN2_TYPE
), builder.getVarValue() );
+            envVars.put( getContinuum().getInstallationService().getEnvVar( InstallationService.MAVEN2_TYPE
),
+                         builder.getVarValue() );
         }
 
         List<Installation> installations = profile.getEnvironmentVariables();
@@ -93,11 +95,11 @@ public class AbstractReleaseAction
         }
         return envVars;
     }
-    
+
     private boolean isDefaultBuildAgentEnabledInGroup( String defaultBuildagent, List<BuildAgentConfiguration>
agents )
     {
         boolean isInGroup = false;
-        
+
         for ( BuildAgentConfiguration agent : agents )
         {
             if ( agent.isEnabled() == true )
@@ -109,7 +111,7 @@ public class AbstractReleaseAction
                 }
             }
         }
-        
+
         return isInGroup;
     }
 



Mime
View raw message