continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r699174 - in /continuum/branches/continuum-1.2.x: continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/
Date Fri, 26 Sep 2008 04:35:16 GMT
Author: evenisse
Date: Thu Sep 25 21:35:15 2008
New Revision: 699174

URL: http://svn.apache.org/viewvc?rev=699174&view=rev
Log:
[CONTINUUM-1838] implicit 'Always build' when 'fresh build' is used

Modified:
    continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildDefinitionAction.java

Modified: continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=699174&r1=699173&r2=699174&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ continuum/branches/continuum-1.2.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Thu Sep 25 21:35:15 2008
@@ -356,7 +356,8 @@
             // now we will load all BuildResult with an Id bigger or equals than the oldBuildResult
one
             if ( oldBuildResult != null )
             {
-                context.setOldScmResult( getOldScmResults( projectId, oldBuildResult.getBuildNumber(),
oldBuildResult.getEndTime() ) );
+                context.setOldScmResult(
+                    getOldScmResults( projectId, oldBuildResult.getBuildNumber(), oldBuildResult.getEndTime()
) );
             }
         }
         catch ( ContinuumStoreException e )
@@ -478,6 +479,11 @@
         throws TaskExecutionException
     {
         BuildDefinition buildDefinition = context.getBuildDefinition();
+        if ( buildDefinition.isBuildFresh() )
+        {
+            getLogger().info( "FreshBuild configured, building" );
+            return true;
+        }
         if ( buildDefinition.isAlwaysBuild() )
         {
             getLogger().info( "AlwaysBuild configured, building" );
@@ -799,7 +805,7 @@
                             if ( changeSet.getDate() < fromDate )
                             {
                                 continue;
-                            }                            
+                            }
                             if ( !res.getChanges().contains( changeSet ) )
                             {
                                 res.addChange( changeSet );

Modified: continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildDefinitionAction.java?rev=699174&r1=699173&r2=699174&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildDefinitionAction.java
(original)
+++ continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildDefinitionAction.java
Thu Sep 25 21:35:15 2008
@@ -19,16 +19,16 @@
  * under the License.
  */
 
-import java.util.LinkedList;
-import java.util.List;
-
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.web.model.BuildDefinitionSummary;
 
+import java.util.LinkedList;
+import java.util.List;
+
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
- * @since 16 sept. 07
  * @version $Id$
+ * @since 16 sept. 07
  */
 public abstract class AbstractBuildDefinitionAction
     extends ContinuumActionSupport
@@ -53,7 +53,7 @@
         }
         bds.setDescription( buildDefinition.getDescription() );
         bds.setType( buildDefinition.getType() );
-        bds.setAlwaysBuild( buildDefinition.isAlwaysBuild() );
+        bds.setAlwaysBuild( buildDefinition.isBuildFresh() || buildDefinition.isAlwaysBuild()
);
         return bds;
     }
 



Mime
View raw message