continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372260 [5/30] - in /continuum/trunk: ./ continuum-api/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/ continuum-api/src/main/java/org/apache/continuum/builder/distributed/executor/ continuum-api/src/main/java/org/ap...
Date Mon, 13 Aug 2012 04:29:28 GMT
Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,12 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.Date;
-import java.util.Map;
-
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ScmResult;
 
+import java.util.Date;
+import java.util.Map;
+
 public class BuildContext
 {
     private int projectId;
@@ -58,7 +58,7 @@ public class BuildContext
     private String scmTag;
 
     private int trigger;
-    
+
     private String username;
 
     private boolean buildFresh;
@@ -254,7 +254,7 @@ public class BuildContext
         return actionContext;
     }
 
-    public void setActionContext( Map<String, Object> actionContext ) 
+    public void setActionContext( Map<String, Object> actionContext )
     {
         this.actionContext = actionContext;
     }
@@ -388,14 +388,14 @@ public class BuildContext
     {
         return buildDefinitionLabel;
     }
-    
+
     public void setUsername( String username )
     {
-         this.username = username;
+        this.username = username;
     }
-    
+
     public String getUsername()
     {
-         return username;
+        return username;
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/BuildContextManager.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,10 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.List;
-
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 
+import java.util.List;
+
 /**
  * @author Jan Stevens Ancajas
  */

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/manager/DefaultBuildContextManager.java Mon Aug 13 04:29:09 2012
@@ -19,13 +19,13 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
+import org.apache.continuum.buildagent.buildcontext.BuildContext;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.continuum.buildagent.buildcontext.BuildContext;
-
 /**
  * @author Jan Steven Ancajas
  * @plexus.component role="org.apache.continuum.buildagent.buildcontext.manager.BuildContextManager" role-hint="default"

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfiguration.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
 import org.apache.continuum.buildagent.model.ContinuumBuildAgentConfigurationModel;
 import org.apache.continuum.buildagent.model.io.xpp3.ContinuumBuildAgentConfigurationModelXpp3Reader;
 import org.apache.continuum.buildagent.model.io.xpp3.ContinuumBuildAgentConfigurationModelXpp3Writer;
@@ -34,6 +28,12 @@ import org.codehaus.plexus.util.xml.pull
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
 public class DefaultBuildAgentConfiguration
     implements BuildAgentConfiguration
 {
@@ -88,19 +88,19 @@ public class DefaultBuildAgentConfigurat
             fis = new FileInputStream( file );
             ContinuumBuildAgentConfigurationModelXpp3Reader configurationXpp3Reader =
                 new ContinuumBuildAgentConfigurationModelXpp3Reader();
-            ContinuumBuildAgentConfigurationModel configuration =
-                configurationXpp3Reader.read( new InputStreamReader( fis ) );
+            ContinuumBuildAgentConfigurationModel configuration = configurationXpp3Reader.read( new InputStreamReader(
+                fis ) );
 
             this.generalBuildAgentConfiguration = new GeneralBuildAgentConfiguration();
             if ( StringUtils.isNotEmpty( configuration.getBuildOutputDirectory() ) )
             {
-                this.generalBuildAgentConfiguration.setBuildOutputDirectory(
-                    new File( configuration.getBuildOutputDirectory() ) );
+                this.generalBuildAgentConfiguration.setBuildOutputDirectory( new File(
+                    configuration.getBuildOutputDirectory() ) );
             }
             if ( StringUtils.isNotEmpty( configuration.getWorkingDirectory() ) )
             {
-                this.generalBuildAgentConfiguration.setWorkingDirectory(
-                    new File( configuration.getWorkingDirectory() ) );
+                this.generalBuildAgentConfiguration.setWorkingDirectory( new File(
+                    configuration.getWorkingDirectory() ) );
             }
 
             this.generalBuildAgentConfiguration.setContinuumServerUrl( configuration.getContinuumServerUrl() );

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/DefaultBuildAgentConfigurationService.java Mon Aug 13 04:29:09 2012
@@ -19,18 +19,17 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import javax.annotation.Resource;
-
 import org.apache.continuum.buildagent.model.Installation;
 import org.apache.continuum.buildagent.model.LocalRepository;
 import org.codehaus.plexus.util.FileUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Resource;
+
 public class DefaultBuildAgentConfigurationService
     implements BuildAgentConfigurationService
 {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/configuration/GeneralBuildAgentConfiguration.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,12 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.List;
-
 import org.apache.continuum.buildagent.model.Installation;
 import org.apache.continuum.buildagent.model.LocalRepository;
 
+import java.io.File;
+import java.util.List;
+
 public class GeneralBuildAgentConfiguration
 {
     private File workingDirectory;
@@ -34,7 +34,7 @@ public class GeneralBuildAgentConfigurat
     private String continuumServerUrl;
 
     private List<Installation> installations;
-    
+
     private List<LocalRepository> localRepositories;
 
     private String sharedSecretPassword;
@@ -78,7 +78,7 @@ public class GeneralBuildAgentConfigurat
     {
         this.installations = installations;
     }
-    
+
     public List<LocalRepository> getLocalRepositories()
     {
         return localRepositories;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/installation/DefaultBuildAgentInstallationService.java Mon Aug 13 04:29:09 2012
@@ -19,13 +19,13 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.HashMap;
-import java.util.Map;
-
 import org.apache.maven.continuum.execution.ExecutorConfigurator;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * @plexus.component role="org.apache.continuum.buildagent.installation.BuildAgentInstallationService" role-hint="default"
  */
@@ -43,16 +43,19 @@ public class DefaultBuildAgentInstallati
         throws InitializationException
     {
         this.typesValues = new HashMap<String, ExecutorConfigurator>();
-        this.typesValues.put( BuildAgentInstallationService.ANT_TYPE,
-                              new ExecutorConfigurator( "ant", "bin", "ANT_HOME", "-version" ) );
+        this.typesValues.put( BuildAgentInstallationService.ANT_TYPE, new ExecutorConfigurator( "ant", "bin",
+                                                                                                "ANT_HOME",
+                                                                                                "-version" ) );
 
         this.typesValues.put( BuildAgentInstallationService.ENVVAR_TYPE, null );
-        this.typesValues.put( BuildAgentInstallationService.JDK_TYPE,
-                              new ExecutorConfigurator( "java", "bin", "JAVA_HOME", "-version" ) );
-        this.typesValues.put( BuildAgentInstallationService.MAVEN1_TYPE,
-                              new ExecutorConfigurator( "maven", "bin", "MAVEN_HOME", "-v" ) );
-        this.typesValues
-            .put( BuildAgentInstallationService.MAVEN2_TYPE, new ExecutorConfigurator( "mvn", "bin", "M2_HOME", "-v" ) );
+        this.typesValues.put( BuildAgentInstallationService.JDK_TYPE, new ExecutorConfigurator( "java", "bin",
+                                                                                                "JAVA_HOME",
+                                                                                                "-version" ) );
+        this.typesValues.put( BuildAgentInstallationService.MAVEN1_TYPE, new ExecutorConfigurator( "maven", "bin",
+                                                                                                   "MAVEN_HOME",
+                                                                                                   "-v" ) );
+        this.typesValues.put( BuildAgentInstallationService.MAVEN2_TYPE, new ExecutorConfigurator( "mvn", "bin",
+                                                                                                   "M2_HOME", "-v" ) );
     }
 
     public String getEnvVar( String type )

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentManager.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,10 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.Map;
-
 import org.apache.maven.continuum.ContinuumException;
 
+import java.util.Map;
+
 public interface BuildAgentManager
 {
     String ROLE = BuildAgentManager.class.getName();

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentPurgeManager.java Mon Aug 13 04:29:09 2012
@@ -4,7 +4,7 @@ package org.apache.continuum.buildagent.
 public interface BuildAgentPurgeManager
 {
     String ROLE = BuildAgentPurgeManager.class.getName();
-    
+
     void executeDirectoryPurge( String directoryType, int daysOlder, int retentionCount, boolean deleteAll )
         throws Exception;
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java Mon Aug 13 04:29:09 2012
@@ -19,20 +19,19 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.Map;
-import java.util.Properties;
-
 import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
 import org.apache.maven.shared.release.ReleaseResult;
 
+import java.util.Map;
+import java.util.Properties;
+
 public interface BuildAgentReleaseManager
 {
     String ROLE = BuildAgentReleaseManager.class.getName();
 
-    String releasePrepare( Map<String, Object> project, Properties properties,
-                           Map<String, String> releaseVersion, Map<String, String> developmentVersion,
-                           Map<String, String> environments, String username )
+    String releasePrepare( Map<String, Object> project, Properties properties, Map<String, String> releaseVersion,
+                           Map<String, String> developmentVersion, Map<String, String> environments, String username )
         throws ContinuumReleaseException;
 
     ReleaseResult getReleaseResult( String releaseId );
@@ -43,7 +42,8 @@ public interface BuildAgentReleaseManage
 
     String getPreparedReleaseName( String releaseId );
 
-    void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository, String username )
+    void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository,
+                         String username )
         throws ContinuumReleaseException;
 
     String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
@@ -55,6 +55,6 @@ public interface BuildAgentReleaseManage
 
     void releaseRollback( String releaseId, int projectId )
         throws ContinuumReleaseException;
-    
+
     ContinuumReleaseManager getReleaseManager();
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java Mon Aug 13 04:29:09 2012
@@ -19,10 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map;
-
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 import org.apache.continuum.buildagent.buildcontext.manager.BuildContextManager;
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
@@ -33,6 +29,10 @@ import org.codehaus.plexus.util.StringUt
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+
 /**
  * @plexus.component role="org.apache.continuum.buildagent.manager.BuildAgentManager" role-hint="default"
  */
@@ -56,9 +56,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             client.startProjectBuild( projectId, getBuildAgentUrl( projectId ) );
         }
         catch ( MalformedURLException e )
@@ -80,9 +79,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             client.returnBuildResult( buildResult, ContinuumBuildAgentUtil.getBuildAgentUrl( buildResult ) );
         }
         catch ( MalformedURLException e )
@@ -104,9 +102,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             return client.getEnvironments( buildDefinitionId, installationType );
         }
         catch ( MalformedURLException e )
@@ -128,9 +125,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             client.updateProject( project );
         }
         catch ( MalformedURLException e )
@@ -152,9 +148,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             return client.shouldBuild( context, ContinuumBuildAgentUtil.getBuildAgentUrl( context ) );
         }
         catch ( MalformedURLException e )
@@ -176,9 +171,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             client.startPrepareBuild( context, ContinuumBuildAgentUtil.getBuildAgentUrl( context ) );
         }
         catch ( MalformedURLException e )
@@ -200,9 +194,8 @@ public class DefaultBuildAgentManager
     {
         try
         {
-            MasterBuildAgentTransportClient client =
-                new MasterBuildAgentTransportClient( new URL( buildAgentConfigurationService.getContinuumServerUrl() ) )
-                ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                buildAgentConfigurationService.getContinuumServerUrl() ) );
             client.prepareBuildFinished( context, ContinuumBuildAgentUtil.getBuildAgentUrl( context ) );
         }
         catch ( MalformedURLException e )
@@ -225,20 +218,18 @@ public class DefaultBuildAgentManager
         {
             if ( StringUtils.isBlank( continuumServerUrl ) )
             {
-                throw new ContinuumException( "Build agent is not configured properly. Missing continuumServerUrl in the configuration file" );
+                throw new ContinuumException(
+                    "Build agent is not configured properly. Missing continuumServerUrl in the configuration file" );
             }
 
-            MasterBuildAgentTransportClient client = 
-                new MasterBuildAgentTransportClient( new URL( continuumServerUrl ) )
-            ;
+            MasterBuildAgentTransportClient client = new MasterBuildAgentTransportClient( new URL(
+                continuumServerUrl ) );
             return client.ping();
         }
         catch ( MalformedURLException e )
         {
-            log.error(
-                "Invalid continuum server URL '" + continuumServerUrl + "'", e );
-            throw new ContinuumException(
-                "Invalid continuum server URL '" + continuumServerUrl + "'", e );
+            log.error( "Invalid continuum server URL '" + continuumServerUrl + "'", e );
+            throw new ContinuumException( "Invalid continuum server URL '" + continuumServerUrl + "'", e );
         }
         catch ( Exception e )
         {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentPurgeManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentPurgeManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentPurgeManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentPurgeManager.java Mon Aug 13 04:29:09 2012
@@ -1,10 +1,5 @@
 package org.apache.continuum.buildagent.manager;
 
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.Arrays;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.comparator.LastModifiedFileComparator;
 import org.apache.commons.io.filefilter.AgeFileFilter;
@@ -17,6 +12,11 @@ import org.apache.continuum.buildagent.c
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.Arrays;
+
 /**
  * @plexus.component role="org.apache.continuum.buildagent.manager.BuildAgentPurgeManager" role-hint="default"
  */
@@ -29,19 +29,20 @@ public class DefaultBuildAgentPurgeManag
      * @plexus.requirement
      */
     private BuildAgentConfigurationService buildAgentConfigurationService;
-    
+
     public void executeDirectoryPurge( String directoryType, int daysOlder, int retentionCount, boolean deleteAll )
         throws Exception
     {
-        StringBuilder log = new StringBuilder().append( "Executing directory purge with the following settings[directoryType=" ).
-                                                append( directoryType ).append( ",daysOlder=" ).
-                                                append( daysOlder ).append( ", retentionCount=" ).
-                                                append( retentionCount ).append( ", deleteAll=" ).
-                                                append( deleteAll ).append( "]" );
+        StringBuilder log = new StringBuilder().append(
+            "Executing directory purge with the following settings[directoryType=" ).
+            append( directoryType ).append( ",daysOlder=" ).
+            append( daysOlder ).append( ", retentionCount=" ).
+            append( retentionCount ).append( ", deleteAll=" ).
+            append( deleteAll ).append( "]" );
         logger.info( log.toString() );
-        
+
         File directory = null;
-        
+
         if ( "working".equals( directoryType ) || "releases".equals( directoryType ) )
         {
             directory = buildAgentConfigurationService.getWorkingDirectory();
@@ -59,18 +60,19 @@ public class DefaultBuildAgentPurgeManag
         {
             purgeFiles( directory, directoryType, daysOlder, retentionCount );
         }
-        
+
         logger.info( "Directory purge execution done" );
     }
-    
-    private void purgeAll( File directory, String directoryType ) throws Exception
+
+    private void purgeAll( File directory, String directoryType )
+        throws Exception
     {
         AndFileFilter filter = new AndFileFilter();
         filter.addFileFilter( DirectoryFileFilter.DIRECTORY );
         filter.addFileFilter( createFileFilterForDirectoryType( directoryType ) );
-        
-        File[] files = directory.listFiles( ( FileFilter ) filter );
-        if  ( files == null )
+
+        File[] files = directory.listFiles( (FileFilter) filter );
+        if ( files == null )
         {
             return;
         }
@@ -86,39 +88,38 @@ public class DefaultBuildAgentPurgeManag
             }
         }
     }
-    
+
     private void purgeFiles( File directory, String directoryType, int daysOlder, int retentionCount )
     {
         AndFileFilter filter = new AndFileFilter();
         filter.addFileFilter( DirectoryFileFilter.DIRECTORY );
         filter.addFileFilter( createFileFilterForDirectoryType( directoryType ) );
-        
-        
-        File[] files = directory.listFiles( ( FileFilter ) filter );
-        
+
+        File[] files = directory.listFiles( (FileFilter) filter );
+
         if ( files == null )
         {
             return;
         }
-        
+
         //calculate to include files not in the dayold category
         int countToPurge = files.length - retentionCount;
-        
+
         if ( daysOlder > 0 )
         {
             long cutoff = System.currentTimeMillis() - ( 24 * 60 * 26 * 1000 * daysOlder );
             filter.addFileFilter( new AgeFileFilter( cutoff ) );
         }
-        
-        files = directory.listFiles( ( FileFilter ) filter );
-        
+
+        files = directory.listFiles( (FileFilter) filter );
+
         if ( files == null )
         {
             return;
         }
-        
+
         Arrays.sort( files, LastModifiedFileComparator.LASTMODIFIED_COMPARATOR );
-        
+
         for ( File file : files )
         {
             if ( countToPurge - 1 < 0 )
@@ -135,17 +136,17 @@ public class DefaultBuildAgentPurgeManag
                 logger.warn( "Unable to purge " + directoryType + " directory: " + file.getName() );
             }
         }
-        
+
     }
-    
+
     private IOFileFilter createFileFilterForDirectoryType( String directoryType )
     {
         WildcardFileFilter releasesFilter = new WildcardFileFilter( "releases-*" );
-        
+
         if ( "working".equals( directoryType ) )
         {
             return new NotFileFilter( releasesFilter );
-        } 
+        }
         else if ( "releases".equals( directoryType ) )
         {
             return releasesFilter;
@@ -155,7 +156,7 @@ public class DefaultBuildAgentPurgeManag
             return null;
         }
     }
-    
+
     public void setBuildAgentConfigurationService( BuildAgentConfigurationService buildAgentConfigurationService )
     {
         this.buildAgentConfigurationService = buildAgentConfigurationService;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.continuum.buildagent.installation.BuildAgentInstallationService;
 import org.apache.continuum.buildagent.model.Installation;
@@ -43,6 +37,12 @@ import org.codehaus.plexus.util.StringUt
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 /**
  * @plexus.component role="org.apache.continuum.buildagent.manager.BuildAgentReleaseManager" role-hint="default"
  */
@@ -74,7 +74,7 @@ public class DefaultBuildAgentReleaseMan
         Project project = getProject( projectMap );
 
         ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
-        
+
         listener.setUsername( username );
 
         String workingDirectory = buildAgentConfigurationService.getWorkingDirectory( project.getId() ).getPath();
@@ -101,9 +101,8 @@ public class DefaultBuildAgentReleaseMan
 
         if ( environments != null )
         {
-            String m2Home =
-                environments.get( buildAgentInstallationService.getEnvVar( BuildAgentInstallationService.MAVEN2_TYPE ) )
-                ;
+            String m2Home = environments.get( buildAgentInstallationService.getEnvVar(
+                BuildAgentInstallationService.MAVEN2_TYPE ) );
             if ( StringUtils.isNotEmpty( m2Home ) )
             {
                 executable = m2Home + File.separator + "bin" + File.separator + executable;
@@ -129,17 +128,17 @@ public class DefaultBuildAgentReleaseMan
 
     public Map<String, Object> getListener( String releaseId )
     {
-        ContinuumReleaseManagerListener listener =
-            (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
+        ContinuumReleaseManagerListener listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get(
+            releaseId );
 
         Map<String, Object> map = new HashMap<String, Object>();
 
         if ( listener != null )
         {
             map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, listener.getState() );
-            
+
             map.put( ContinuumBuildAgentUtil.KEY_USERNAME, listener.getUsername() );
-            
+
             if ( listener.getPhases() != null )
             {
                 map.put( ContinuumBuildAgentUtil.KEY_RELEASE_PHASES, listener.getPhases() );
@@ -185,30 +184,32 @@ public class DefaultBuildAgentReleaseMan
         throws ContinuumReleaseException
     {
         ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
-        
+
         listener.setUsername( username );
 
         LocalRepository repo = null;
 
         if ( !repository.isEmpty() )
         {
-            List<org.apache.continuum.buildagent.model.LocalRepository>  localRepos = buildAgentConfigurationService.getLocalRepositories();
-            for( org.apache.continuum.buildagent.model.LocalRepository localRepo : localRepos )
+            List<org.apache.continuum.buildagent.model.LocalRepository> localRepos =
+                buildAgentConfigurationService.getLocalRepositories();
+            for ( org.apache.continuum.buildagent.model.LocalRepository localRepo : localRepos )
             {
-                if( localRepo.getName().equalsIgnoreCase( ContinuumBuildAgentUtil.getLocalRepositoryName( repository ) ) )
+                if ( localRepo.getName().equalsIgnoreCase( ContinuumBuildAgentUtil.getLocalRepositoryName(
+                    repository ) ) )
                 {
                     repo = new LocalRepository();
                     repo.setLayout( localRepo.getLayout() );
                     repo.setName( localRepo.getName() );
                     repo.setLocation( localRepo.getLocation() );
-                    
+
                     break;
-                }   
+                }
             }
         }
 
-        File performDirectory =
-            new File( buildAgentConfigurationService.getWorkingDirectory(), "releases-" + System.currentTimeMillis() );
+        File performDirectory = new File( buildAgentConfigurationService.getWorkingDirectory(),
+                                          "releases-" + System.currentTimeMillis() );
         performDirectory.mkdirs();
 
         releaseManager.perform( releaseId, performDirectory, goals, arguments, useReleaseProfile, listener, repo );
@@ -300,7 +301,7 @@ public class DefaultBuildAgentReleaseMan
         ProjectGroup group = new ProjectGroup();
 
         String localRepo = ContinuumBuildAgentUtil.getLocalRepositoryName( context );
-        
+
         if ( StringUtils.isBlank( localRepo ) )
         {
             group.setLocalRepository( null );
@@ -308,10 +309,11 @@ public class DefaultBuildAgentReleaseMan
         else
         {
             LocalRepository localRepository = new LocalRepository();
-            List<org.apache.continuum.buildagent.model.LocalRepository> localRepos = buildAgentConfigurationService.getLocalRepositories();
-            for( org.apache.continuum.buildagent.model.LocalRepository localRepoBA : localRepos )
+            List<org.apache.continuum.buildagent.model.LocalRepository> localRepos =
+                buildAgentConfigurationService.getLocalRepositories();
+            for ( org.apache.continuum.buildagent.model.LocalRepository localRepoBA : localRepos )
             {
-                if( localRepoBA.getName().equalsIgnoreCase( localRepo ) )
+                if ( localRepoBA.getName().equalsIgnoreCase( localRepo ) )
                 {
                     localRepository.setLocation( localRepoBA.getLocation() );
                     group.setLocalRepository( localRepository );
@@ -328,8 +330,8 @@ public class DefaultBuildAgentReleaseMan
     public void setBuildAgentConfigurationService( BuildAgentConfigurationService buildAgentConfigurationService )
     {
         this.buildAgentConfigurationService = buildAgentConfigurationService;
-    }    
-    
+    }
+
     public ContinuumReleaseManager getReleaseManager()
     {
         return releaseManager;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java Mon Aug 13 04:29:09 2012
@@ -19,12 +19,12 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.List;
-
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.Task;
 
+import java.util.List;
+
 public class PrepareBuildProjectsTask
     implements Task
 {
@@ -61,7 +61,7 @@ public class PrepareBuildProjectsTask
 
     public BuildTrigger getBuildTrigger()
     {
-    	return buildTrigger;
+        return buildTrigger;
     }
 
     public int getProjectGroupId()
@@ -81,6 +81,6 @@ public class PrepareBuildProjectsTask
 
     public int getHashCode()
     {
-    	return projectGroupId + scmRootId + buildTrigger.getTrigger();
+        return projectGroupId + scmRootId + buildTrigger.getTrigger();
     }
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Mon Aug 13 04:29:09 2012
@@ -19,13 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutor;
 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutorException;
@@ -64,6 +57,13 @@ import org.codehaus.plexus.util.StringUt
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @plexus.component role="org.codehaus.plexus.taskqueue.execution.TaskExecutor"
  * role-hint="build-agent"
@@ -110,21 +110,21 @@ public class BuildProjectTaskExecutor
             log.info( "Initializing build (projectId={})", projectId );
             BuildContext context = buildContextManager.getBuildContext( projectId );
             initializeBuildContext( context );
-    
+
             if ( !checkScmResult( context ) )
             {
                 return;
             }
-    
+
             log.info( "Checking if project '{}' should build", context.getProjectName() );
             if ( !shouldBuild( context ) )
             {
                 return;
             }
-    
+
             log.info( "Starting build of {}", context.getProjectName() );
             startBuild( context );
-    
+
             try
             {
                 try
@@ -134,13 +134,13 @@ public class BuildProjectTaskExecutor
                 catch ( TaskExecutionException e )
                 {
                     updateBuildResult( context, ContinuumBuildAgentUtil.throwableToString( e ) );
-    
+
                     //just log the error but don't stop the build from progressing in order not to suppress any build result messages there
                     log.error( "Error executing action update-project-from-agent-working-directory '", e );
                 }
-    
+
                 performAction( "execute-agent-builder", context );
-    
+
                 log.info( "Updating build result of project '{}'", context.getProjectName() );
                 updateBuildResult( context, null );
             }
@@ -175,24 +175,23 @@ public class BuildProjectTaskExecutor
         actionContext.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
-        actionContext.put( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS,
-                           getEnvironments( buildContext.getBuildDefinitionId(),
-                                            getInstallationType( buildContext ) ) );
-        
+        actionContext.put( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS, getEnvironments(
+            buildContext.getBuildDefinitionId(), getInstallationType( buildContext ) ) );
+
         // CONTINUUM-2391        
-        if( buildContext.getLocalRepository() != null )
+        if ( buildContext.getLocalRepository() != null )
         {
-            List<LocalRepository> localRepos = buildAgentConfigurationService.getLocalRepositories();        
-            for( LocalRepository local : localRepos )
+            List<LocalRepository> localRepos = buildAgentConfigurationService.getLocalRepositories();
+            for ( LocalRepository local : localRepos )
             {
-                if( local.getName().equalsIgnoreCase( buildContext.getLocalRepository() ) )
+                if ( local.getName().equalsIgnoreCase( buildContext.getLocalRepository() ) )
                 {
                     actionContext.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY, local.getLocation() );
                     break;
                 }
             }
-        }        
-        
+        }
+
         actionContext.put( ContinuumBuildAgentUtil.KEY_SCM_RESULT, buildContext.getScmResult() );
         buildContext.setActionContext( actionContext );
 
@@ -335,7 +334,7 @@ public class BuildProjectTaskExecutor
             build.setState( ContinuumProjectState.ERROR );
 
             build.setTrigger( context.getTrigger() );
-            
+
             build.setUsername( context.getUsername() );
 
             build.setStartTime( context.getBuildStartTime() );
@@ -456,12 +455,12 @@ public class BuildProjectTaskExecutor
         map.put( ContinuumBuildAgentUtil.KEY_USERNAME, context.getUsername() );
         map.put( ContinuumBuildAgentUtil.KEY_SCM_CHANGES, getScmChanges( context.getScmResult() ) );
         map.put( ContinuumBuildAgentUtil.KEY_BUILD_AGENT_URL, context.getBuildAgentUrl() );
-        
-        if( context.getExecutorId().equals( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR ) )
+
+        if ( context.getExecutorId().equals( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR ) )
         {
-            map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) );    
+            map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) );
         }
-        
+
         if ( context.getLatestUpdateDate() != null )
         {
             map.put( ContinuumBuildAgentUtil.KEY_LATEST_UPDATE_DATE, context.getLatestUpdateDate() );
@@ -564,8 +563,8 @@ public class BuildProjectTaskExecutor
 
         try
         {
-            ContinuumAgentBuildExecutor buildExecutor =
-                buildAgentBuildExecutorManager.getBuildExecutor( context.getExecutorId() );
+            ContinuumAgentBuildExecutor buildExecutor = buildAgentBuildExecutorManager.getBuildExecutor(
+                context.getExecutorId() );
 
             BuildDefinition buildDefinition = BuildContextToBuildDefinition.getBuildDefinition( context );
 
@@ -591,7 +590,7 @@ public class BuildProjectTaskExecutor
 
         return mavenProject;
     }
-    
+
     public void setBuildContextManager( BuildContextManager buildContextManager )
     {
         this.buildContextManager = buildContextManager;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java Mon Aug 13 04:29:09 2012
@@ -19,11 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.continuum.buildagent.manager.BuildAgentManager;
@@ -46,6 +41,11 @@ import org.codehaus.plexus.util.StringUt
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @plexus.component role="org.codehaus.plexus.taskqueue.execution.TaskExecutor"
  * role-hint="prepare-build-agent"
@@ -86,19 +86,19 @@ public class PrepareBuildProjectsTaskExe
                     for ( BuildContext buildContext : buildContexts )
                     {
                         BuildDefinition buildDef = BuildContextToBuildDefinition.getBuildDefinition( buildContext );
-    
-                        log.debug( "Check scm root state of project group '{}'",  buildContext.getProjectGroupName() );
+
+                        log.debug( "Check scm root state of project group '{}'", buildContext.getProjectGroupName() );
                         if ( !checkProjectScmRoot( context ) )
                         {
                             break;
                         }
-    
+
                         log.info( "Starting prepare build of project group '{}'", buildContext.getProjectGroupName() );
                         startPrepareBuild( buildContext );
-    
+
                         log.info( "Initializing prepare build" );
                         initializeActionContext( buildContext );
-    
+
                         try
                         {
                             if ( buildDef.isBuildFresh() )
@@ -106,10 +106,10 @@ public class PrepareBuildProjectsTaskExe
                                 log.info( "Clean up working directory of project '{}'", buildContext.getProjectName() );
                                 cleanWorkingDirectory( buildContext );
                             }
-    
+
                             log.info( "Updating working directory of project '{}'", buildContext.getProjectName() );
                             updateWorkingDirectory( buildContext );
-    
+
                             //CONTINUUM-1393
                             if ( !buildDef.isBuildFresh() )
                             {
@@ -128,7 +128,7 @@ public class PrepareBuildProjectsTaskExe
                 {
                     endPrepareBuild( context );
                 }
-    
+
                 if ( checkProjectScmRoot( context ) )
                 {
                     log.debug( "Successful prepare build. Creating build task" );
@@ -151,8 +151,8 @@ public class PrepareBuildProjectsTaskExe
     {
         Map<String, Object> actionContext = buildContext.getActionContext();
 
-        if ( actionContext == null ||
-            !( ContinuumBuildAgentUtil.getScmRootState( actionContext ) == ContinuumProjectState.UPDATING ) )
+        if ( actionContext == null || !( ContinuumBuildAgentUtil.getScmRootState( actionContext ) ==
+            ContinuumProjectState.UPDATING ) )
         {
             Map<String, Object> map = new HashMap<String, Object>();
             map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, buildContext.getProjectGroupId() );
@@ -194,8 +194,8 @@ public class PrepareBuildProjectsTaskExe
 
     private boolean checkProjectScmRoot( Map<String, Object> context )
     {
-        return !( context != null &&
-            ContinuumBuildAgentUtil.getScmRootState( context ) == ContinuumProjectState.ERROR );
+        return !( context != null && ContinuumBuildAgentUtil.getScmRootState( context ) ==
+            ContinuumProjectState.ERROR );
 
     }
 
@@ -212,8 +212,8 @@ public class PrepareBuildProjectsTaskExe
 
         performAction( "check-agent-working-directory", buildContext );
 
-        boolean workingDirectoryExists =
-            ContinuumBuildAgentUtil.getBoolean( actionContext, ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS );
+        boolean workingDirectoryExists = ContinuumBuildAgentUtil.getBoolean( actionContext,
+                                                                             ContinuumBuildAgentUtil.KEY_WORKING_DIRECTORY_EXISTS );
 
         ScmResult scmResult;
 
@@ -274,14 +274,14 @@ public class PrepareBuildProjectsTaskExe
         if ( context != null )
         {
             Map<String, Object> result = new HashMap<String, Object>();
-            result.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID,
-                        ContinuumBuildAgentUtil.getProjectGroupId( context ) );
-            result.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS,
-                        ContinuumBuildAgentUtil.getScmRootAddress( context ) );
-            result.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_STATE,
-                        ContinuumBuildAgentUtil.getScmRootState( context ) );
-            result.put( ContinuumBuildAgentUtil.KEY_BUILD_AGENT_URL,
-                        ContinuumBuildAgentUtil.getBuildAgentUrl( context ) );
+            result.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, ContinuumBuildAgentUtil.getProjectGroupId(
+                context ) );
+            result.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, ContinuumBuildAgentUtil.getScmRootAddress(
+                context ) );
+            result.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_STATE, ContinuumBuildAgentUtil.getScmRootState(
+                context ) );
+            result.put( ContinuumBuildAgentUtil.KEY_BUILD_AGENT_URL, ContinuumBuildAgentUtil.getBuildAgentUrl(
+                context ) );
 
             if ( ContinuumBuildAgentUtil.getScmRootState( context ) == ContinuumProjectState.ERROR )
             {
@@ -303,7 +303,8 @@ public class PrepareBuildProjectsTaskExe
 
             try
             {
-                log.debug( "End prepare build of project group '{}'", ContinuumBuildAgentUtil.getProjectGroupId( context ) );
+                log.debug( "End prepare build of project group '{}'", ContinuumBuildAgentUtil.getProjectGroupId(
+                    context ) );
                 buildAgentManager.endPrepareBuild( result );
             }
             catch ( ContinuumException e )

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java Mon Aug 13 04:29:09 2012
@@ -19,14 +19,14 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.List;
-
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
+import java.util.List;
+
 public interface BuildAgentTaskQueueManager
 {
     String ROLE = BuildAgentTaskQueueManager.class.getName();
@@ -46,7 +46,7 @@ public interface BuildAgentTaskQueueMana
 
     PrepareBuildProjectsTask getCurrentProjectInPrepareBuild()
         throws TaskQueueManagerException;
-    
+
     boolean hasBuildTaskInQueue()
         throws TaskQueueManagerException;
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java Mon Aug 13 04:29:09 2012
@@ -19,8 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.util.List;
-
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
@@ -39,6 +37,8 @@ import org.codehaus.plexus.taskqueue.exe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 /**
  * @plexus.component role="org.apache.continuum.buildagent.taskqueue.manager.BuildAgentTaskQueueManager" role-hint="default"
  */
@@ -221,9 +221,9 @@ public class DefaultBuildAgentTaskQueueM
             {
                 for ( PrepareBuildProjectsTask task : queues )
                 {
-                	if ( task != null && task.getProjectGroupId() == projectGroupId && 
-                             task.getBuildTrigger().getTrigger() == buildTrigger.getTrigger() &&
-                             task.getScmRootAddress().equals( scmRootAddress ) )
+                    if ( task != null && task.getProjectGroupId() == projectGroupId &&
+                        task.getBuildTrigger().getTrigger() == buildTrigger.getTrigger() &&
+                        task.getScmRootAddress().equals( scmRootAddress ) )
                     {
                         log.info( "project group {} in prepare build queue", task.getProjectGroupId() );
                         return true;
@@ -278,7 +278,8 @@ public class DefaultBuildAgentTaskQueueM
 
         if ( task != null )
         {
-            log.debug( "Current project group preparing build: {}", ( (PrepareBuildProjectsTask) task ).getProjectGroupId() );
+            log.debug( "Current project group preparing build: {}",
+                       ( (PrepareBuildProjectsTask) task ).getProjectGroupId() );
             return (PrepareBuildProjectsTask) task;
         }
         return null;
@@ -291,7 +292,7 @@ public class DefaultBuildAgentTaskQueueM
 
         if ( task != null )
         {
-            log.debug( "Current project building: {}", ( (BuildProjectTask) task).getProjectName() );
+            log.debug( "Current project building: {}", ( (BuildProjectTask) task ).getProjectName() );
             return (BuildProjectTask) task;
         }
 
@@ -345,9 +346,11 @@ public class DefaultBuildAgentTaskQueueM
         {
             for ( BuildProjectTask task : tasks )
             {
-                if ( task != null && task.getProjectId() == projectId && task.getBuildDefinitionId() == buildDefinitionId )
+                if ( task != null && task.getProjectId() == projectId &&
+                    task.getBuildDefinitionId() == buildDefinitionId )
                 {
-                    log.debug( "Remove project {} with buildDefinition{} from build queue", task.getProjectName(), task.getBuildDefinitionId() );
+                    log.debug( "Remove project {} with buildDefinition{} from build queue", task.getProjectName(),
+                               task.getBuildDefinitionId() );
                     return getBuildQueue().remove( task );
                 }
             }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java Mon Aug 13 04:29:09 2012
@@ -29,7 +29,7 @@ public class BuildContextToProject
 {
     public static Project getProject( BuildContext buildContext )
     {
-        Project project = new Project();    
+        Project project = new Project();
 
         project.setId( buildContext.getProjectId() );
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java Mon Aug 13 04:29:09 2012
@@ -19,16 +19,6 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
 import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
@@ -40,6 +30,16 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class ContinuumBuildAgentUtil
 {
     public static final String EOL = System.getProperty( "line.separator" );
@@ -55,7 +55,7 @@ public class ContinuumBuildAgentUtil
     public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
 
     public static final String KEY_TRIGGER = "trigger";
-    
+
     public static final String KEY_USERNAME = "username";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
@@ -360,15 +360,15 @@ public class ContinuumBuildAgentUtil
     {
         return getInteger( context, KEY_TRIGGER );
     }
-    
+
     public static String getUsername( Map<String, Object> context )
     {
-         return getString( context, KEY_USERNAME, "scheduled" );
+        return getString( context, KEY_USERNAME, "scheduled" );
     }
-    
+
     public static BuildTrigger getBuildTrigger( Map<String, Object> context )
     {
-         return new BuildTrigger( getTrigger( context ), getUsername( context ) );
+        return new BuildTrigger( getTrigger( context ), getUsername( context ) );
     }
 
     public static BuildResult getBuildResult( Map<String, Object> context, Object defaultValue )

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java Mon Aug 13 04:29:09 2012
@@ -19,6 +19,8 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
+import org.codehaus.plexus.util.StringUtils;
+
 import java.io.File;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
@@ -26,8 +28,6 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
-import org.codehaus.plexus.util.StringUtils;
-
 /**
  * @plexus.component role="org.apache.continuum.buildagent.utils.WorkingCopyContentGenerator"
  */
@@ -103,8 +103,8 @@ public class WorkingCopyContentGenerator
                 }
                 else
                 {
-                    userDirectory =
-                        f.getParentFile().getAbsolutePath().substring( basedir.getAbsolutePath().length() + 1 );
+                    userDirectory = f.getParentFile().getAbsolutePath().substring(
+                        basedir.getAbsolutePath().length() + 1 );
                 }
 
                 userDirectory = StringUtils.replace( userDirectory, "\\", "/" );
@@ -115,8 +115,8 @@ public class WorkingCopyContentGenerator
                     imagesBaseUrl ).append( "file.gif\">&nbsp;<a href=\"" ).append( baseUrl ).append(
                     urlParamSeparator ).append( "userDirectory=" ).append( userDirectory ).append( "&file=" ).append(
                     fileName ).append( "\">" ).append( fileName ).append( "</a></td><td width=\"1%\">" ).append(
-                    getReadableFileSize( f.length() ) ).append( "</td><td width=\"1%\">" ).append(
-                    getFormattedDate( f.lastModified() ) ).append( "</td>\n" );
+                    getReadableFileSize( f.length() ) ).append( "</td><td width=\"1%\">" ).append( getFormattedDate(
+                    f.lastModified() ) ).append( "</td>\n" );
                 buf.append( "</tr>\n" );
 
                 odd = !odd;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/spring-context.xml?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/spring-context.xml (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/resources/META-INF/spring-context.xml Mon Aug 13 04:29:09 2012
@@ -1,42 +1,42 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:aop="http://www.springframework.org/schema/aop"
-	xmlns:util="http://www.springframework.org/schema/util"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
-		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+
+
 		http://www.springframework.org/schema/context 
         http://www.springframework.org/schema/context/spring-context-2.5.xsd">
 
-  <context:annotation-config />
+  <context:annotation-config/>
   <context:component-scan base-package="org.apache.continuum.buildagent"/>
 
   <bean name="continuumAgentBuildExecutor#maven2"
-         class="org.apache.continuum.buildagent.build.execution.maven.m2.MavenTwoBuildExecutor" autowire="byName">
+        class="org.apache.continuum.buildagent.build.execution.maven.m2.MavenTwoBuildExecutor" autowire="byName">
     <property name="defaultExecutable" value="mvn"/>
     <property name="buildAgentMavenBuilderHelper" ref="buildAgentMavenBuilderHelper"/>
     <property name="projectHelper" ref="mavenProjectHelper"/>
   </bean>
   <bean name="continuumAgentBuildExecutor#maven-1"
-         class="org.apache.continuum.buildagent.build.execution.maven.m1.MavenOneBuildExecutor" autowire="byName">
+        class="org.apache.continuum.buildagent.build.execution.maven.m1.MavenOneBuildExecutor" autowire="byName">
     <property name="defaultExecutable" value="maven"/>
   </bean>
   <bean name="continuumAgentBuildExecutor#ant"
-         class="org.apache.continuum.buildagent.build.execution.ant.AntBuildExecutor" autowire="byName">
+        class="org.apache.continuum.buildagent.build.execution.ant.AntBuildExecutor" autowire="byName">
     <property name="defaultExecutable" value="ant"/>
   </bean>
   <bean name="continuumAgentBuildExecutor#shell"
-         class="org.apache.continuum.buildagent.build.execution.shell.ShellBuildExecutor" autowire="byName">
+        class="org.apache.continuum.buildagent.build.execution.shell.ShellBuildExecutor" autowire="byName">
   </bean>
 
-  <bean id="buildAgentConfigurationService" class="org.apache.continuum.buildagent.configuration.DefaultBuildAgentConfigurationService"
+  <bean id="buildAgentConfigurationService"
+        class="org.apache.continuum.buildagent.configuration.DefaultBuildAgentConfigurationService"
         init-method="initialize"/>
-  
-  <bean id="buildAgentConfiguration" class="org.apache.continuum.buildagent.configuration.DefaultBuildAgentConfiguration"
-     init-method="initialize">
-    <property name="configurationFile" value="file:${appserver.base}/conf/continuum-buildagent.xml" />
+
+  <bean id="buildAgentConfiguration"
+        class="org.apache.continuum.buildagent.configuration.DefaultBuildAgentConfiguration"
+        init-method="initialize">
+    <property name="configurationFile" value="file:${appserver.base}/conf/continuum-buildagent.xml"/>
   </bean>
 </beans>
 	
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationTest.java?rev=1372260&r1=1372259&r2=1372260&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationTest.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/configuration/BuildAgentConfigurationTest.java Mon Aug 13 04:29:09 2012
@@ -19,134 +19,140 @@ package org.apache.continuum.buildagent.
  * under the License.
  */
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.continuum.buildagent.model.Installation;
 import org.apache.continuum.buildagent.model.LocalRepository;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 public class BuildAgentConfigurationTest
     extends PlexusInSpringTestCase
-{   
+{
     public void testInitialize()
         throws Exception
     {
-        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup( BuildAgentConfiguration.class );
-        
-        config.setConfigurationFile( new File( getBasedir(), "target/test-classes/buildagent-config/continuum-buildagent.xml" ) );
-        
+        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup(
+            BuildAgentConfiguration.class );
+
+        config.setConfigurationFile( new File( getBasedir(),
+                                               "target/test-classes/buildagent-config/continuum-buildagent.xml" ) );
+
         config.initialize();
-        
+
         GeneralBuildAgentConfiguration generalConfig = config.getContinuumBuildAgentConfiguration();
         assertEquals( "http://localhost:9595/continuum/master-xmlrpc", generalConfig.getContinuumServerUrl() );
         assertEquals( new File( "/tmp/data/build-output-directory" ), generalConfig.getBuildOutputDirectory() );
         assertEquals( new File( "/tmp/data/working-directory" ), generalConfig.getWorkingDirectory() );
         assertEquals( 1, generalConfig.getInstallations().size() );
-        
+
         Installation installation = generalConfig.getInstallations().get( 0 );
         assertEquals( "Tool", installation.getType() );
         assertEquals( "Maven 2.2.1 Installation", installation.getName() );
         assertEquals( "M2_HOME", installation.getVarName() );
         assertEquals( "/tmp/apache-maven-2.2.1", installation.getVarValue() );
-        
+
         LocalRepository localRepo = generalConfig.getLocalRepositories().get( 0 );
-        assertLocalRepository( getExpectedLocalRepo(), localRepo );  
+        assertLocalRepository( getExpectedLocalRepo(), localRepo );
     }
-    
+
     public void testSaveExistingConfiguration()
         throws Exception
     {
-        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup( BuildAgentConfiguration.class );
-        
-        config.setConfigurationFile( new File( getBasedir(), "target/test-classes/buildagent-config/continuum-buildagent-edit.xml" ) );
-        
+        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup(
+            BuildAgentConfiguration.class );
+
+        config.setConfigurationFile( new File( getBasedir(),
+                                               "target/test-classes/buildagent-config/continuum-buildagent-edit.xml" ) );
+
         config.initialize();
-        
+
         String expected = "http://192.165.240.12:8080/continuum/master-xmlrpc";
-        
+
         GeneralBuildAgentConfiguration generalConfig = config.getContinuumBuildAgentConfiguration();
-        
+
         assertEquals( "http://localhost:9595/continuum/master-xmlrpc", generalConfig.getContinuumServerUrl() );
-        assertEquals( 1, generalConfig.getInstallations().size() ); 
-        
+        assertEquals( 1, generalConfig.getInstallations().size() );
+
         generalConfig.setContinuumServerUrl( expected );
-        
-        Installation expectedInstallation = getExpectedInstallation();        
+
+        Installation expectedInstallation = getExpectedInstallation();
         generalConfig.getInstallations().add( expectedInstallation );
-        
-        LocalRepository expectedLocalRepo = getExpectedLocalRepo(); 
-        
+
+        LocalRepository expectedLocalRepo = getExpectedLocalRepo();
+
         List<LocalRepository> localRepos = new ArrayList<LocalRepository>();
         localRepos.add( expectedLocalRepo );
-        
+
         generalConfig.setLocalRepositories( localRepos );
-        
+
         config.save();
-        
+
         config.reload();
-        
+
         assertEquals( expected, config.getContinuumBuildAgentConfiguration().getContinuumServerUrl() );
         assertEquals( 2, config.getContinuumBuildAgentConfiguration().getInstallations().size() );
-        
+
         Installation installation = generalConfig.getInstallations().get( 1 );
         assertInstallation( expectedInstallation, installation );
-        
+
         LocalRepository localRepo = generalConfig.getLocalRepositories().get( 0 );
         assertLocalRepository( expectedLocalRepo, localRepo );
-    }   
-    
+    }
+
     public void testSaveNewConfiguration()
         throws Exception
     {
-        File configFile = new File( getBasedir(), "target/test-classes/buildagent-config/continuum-buildagent-new.xml" );
-        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup( BuildAgentConfiguration.class );
-        
+        File configFile = new File( getBasedir(),
+                                    "target/test-classes/buildagent-config/continuum-buildagent-new.xml" );
+        DefaultBuildAgentConfiguration config = (DefaultBuildAgentConfiguration) lookup(
+            BuildAgentConfiguration.class );
+
         config.setConfigurationFile( configFile );
-        
+
         config.initialize();
-        
+
         String expectedUrl = "http://localhost:8080/continuum/master-xmlrpc";
         File expectedBuildOutputDir = new File( "/tmp/data/build-output-directory" );
         File expectedWorkingDir = new File( "/tmp/data/working-directory" );
-        
+
         GeneralBuildAgentConfiguration generalConfig = config.getContinuumBuildAgentConfiguration();
-        
+
         assertNull( generalConfig.getContinuumServerUrl() );
         assertNull( generalConfig.getBuildOutputDirectory() );
         assertNull( generalConfig.getWorkingDirectory() );
-        assertNull( generalConfig.getInstallations() ); 
-                
+        assertNull( generalConfig.getInstallations() );
+
         Installation expectedInstallation = getExpectedInstallation();
-        
+
         List<Installation> installations = new ArrayList<Installation>();
         installations.add( expectedInstallation );
-        
-        LocalRepository expectedLocalRepo = getExpectedLocalRepo(); 
-        
+
+        LocalRepository expectedLocalRepo = getExpectedLocalRepo();
+
         List<LocalRepository> localRepos = new ArrayList<LocalRepository>();
         localRepos.add( expectedLocalRepo );
-        
+
         generalConfig.setContinuumServerUrl( expectedUrl );
         generalConfig.setBuildOutputDirectory( expectedBuildOutputDir );
         generalConfig.setWorkingDirectory( expectedWorkingDir );
         generalConfig.setInstallations( installations );
         generalConfig.setLocalRepositories( localRepos );
-        
+
         config.save();
-        
+
         config.reload();
-        
+
         assertTrue( configFile.exists() );
         assertEquals( expectedUrl, config.getContinuumBuildAgentConfiguration().getContinuumServerUrl() );
         assertEquals( expectedBuildOutputDir, config.getContinuumBuildAgentConfiguration().getBuildOutputDirectory() );
         assertEquals( expectedWorkingDir, config.getContinuumBuildAgentConfiguration().getWorkingDirectory() );
         assertEquals( 1, config.getContinuumBuildAgentConfiguration().getInstallations().size() );
-        
+
         Installation installation = generalConfig.getInstallations().get( 0 );
         assertInstallation( expectedInstallation, installation );
-        
+
         LocalRepository localRepo = generalConfig.getLocalRepositories().get( 0 );
         assertLocalRepository( expectedLocalRepo, localRepo );
     }
@@ -169,7 +175,7 @@ public class BuildAgentConfigurationTest
         expectedLocalRepo.setLocation( "/tmp/.m2/repository" );
         return expectedLocalRepo;
     }
-    
+
     private void assertLocalRepository( LocalRepository expectedLocalRepo, LocalRepository localRepo )
     {
         assertEquals( expectedLocalRepo.getName(), localRepo.getName() );



Mime
View raw message