continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r575112 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ cont...
Date Wed, 12 Sep 2007 22:45:39 GMT
Author: olamy
Date: Wed Sep 12 15:45:37 2007
New Revision: 575112

URL: http://svn.apache.org/viewvc?rev=575112&view=rev
Log:
[CONTINUUM-1443] Add an 'Always build' checkbox in 'build definition'


Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Sep 12 15:45:37 2007
@@ -1387,8 +1387,8 @@
     public int addProject( Project project, String executorId, int groupId )
         throws ContinuumException
     {
-        //test
-        //project.setExecutorId( executorId );
+
+        project.setExecutorId( executorId );
 
         if ( executorId.equalsIgnoreCase( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR
) )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Wed Sep 12 15:45:37 2007
@@ -118,6 +118,7 @@
                 mergeScmResults( context );
             }
 
+            // ignore this if AlwaysBuild ?
             if ( !checkScmResult( context ) )
             {
                 getLogger().info( "Error updating from SCM, not building" );
@@ -131,8 +132,14 @@
                 getLogger().info( "No changes, not building" );
                 return;
             }
-
-            getLogger().info( "Changes found, building" );
+            if ( context.getBuildDefinition().isAlwaysBuild() )
+            {
+                getLogger().info( "AlwaysBuild configured, building" );
+            }
+            else
+            {
+                getLogger().info( "Changes found, building" );
+            }
 
             Map actionContext = context.getActionContext();
 
@@ -459,6 +466,11 @@
     protected boolean shouldBuild( BuildContext context )
         throws TaskExecutionException
     {
+        BuildDefinition buildDefinition = (BuildDefinition) context.getBuildDefinition();
+        if ( buildDefinition.isAlwaysBuild() )
+        {
+            return true;
+        }
         if ( context.getOldBuildResult() == null )
         {
             //The project was never be built with the current build definition

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
Wed Sep 12 15:45:37 2007
@@ -184,6 +184,8 @@
                 
                 storedDefinition.setType( buildDefinition.getType() );
                 
+                storedDefinition.setAlwaysBuild( buildDefinition.isAlwaysBuild() );
+                
                 store.storeBuildDefinition( storedDefinition );
 
                 return storedDefinition;

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.xml Wed Sep 12 15:45:37 2007
@@ -990,6 +990,15 @@
           <type>int</type>
           <defaultValue>0</defaultValue>
         </field>
+        <field>
+          <name>alwaysBuild</name>
+          <version>1.1.0+</version>
+          <type>boolean</type>
+          <defaultValue>false</defaultValue>
+          <description>
+            true if the build had to be forced even if there is no scm change
+          </description>
+        </field>        
       </fields>
     </class>
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Wed Sep 12 15:45:37 2007
@@ -82,6 +82,8 @@
     private String description;
     
     private String buildDefinitionType;
+    
+    private boolean alwaysBuild;
 
     public void prepare()
         throws Exception
@@ -163,7 +165,7 @@
                 }
                 description = buildDefinition.getDescription();
                 buildDefinitionType = buildDefinition.getType();
-                
+                alwaysBuild = buildDefinition.isAlwaysBuild();
             }
             else
             {
@@ -423,6 +425,7 @@
         }
         buildDefinition.setDescription( description );
         buildDefinition.setType( buildDefinitionType );
+        buildDefinition.setAlwaysBuild( alwaysBuild );
         return buildDefinition;
     }
 
@@ -612,5 +615,15 @@
     public void setBuildDefinitionType( String buildDefinitionType )
     {
         this.buildDefinitionType = buildDefinitionType;
+    }
+
+    public boolean isAlwaysBuild()
+    {
+        return alwaysBuild;
+    }
+
+    public void setAlwaysBuild( boolean alwaysBuild )
+    {
+        this.alwaysBuild = alwaysBuild;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
Wed Sep 12 15:45:37 2007
@@ -201,6 +201,7 @@
         }
         bds.setDescription( bd.getDescription() );
         bds.setType( bd.getType() );
+        bds.setAlwaysBuild( bd.isAlwaysBuild() );
         return bds;
     }
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/mdo/view-models.mdo Wed Sep 12 15:45:37
2007
@@ -353,7 +353,14 @@
           <version>1.0.0</version>
           <type>String</type>
           <description>type of the buid defintion</description>
-        </field>               
+        </field>   
+        <field>
+          <name>alwaysBuild</name>
+          <version>1.0.0</version>
+          <type>boolean</type>
+          <defaultValue>false</defaultValue>
+          <description>true if the build had to be forced even if there is no scm change</description>
+        </field>                    
       </fields>
     </class>
     <class>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed Sep 12 15:45:37 2007
@@ -320,6 +320,7 @@
 projectView.buildDefinition.profile = Profile
 projectView.buildDefinition.schedule = Schedule
 projectView.buildDefinition.type = Type
+projectView.buildDefinition.alwaysBuild = Always Build
 buildDefinition.profile.label = Profile
 projectView.buildDefinition.from = From
 projectView.buildDefinition.default = Default
@@ -374,6 +375,7 @@
 buildDefinition.defaultForProject.label = Is it default?
 buildDefinition.schedule.label = Schedule
 buildDefinition.description.label = Description
+buildDefinition.alwaysBuild.label = Always Build
 buildDefinition.noname.save.error.message = There was an error saving the schedule, no schedule
name was supplied.
 buildDefinition.duplicatename.save.error.message = There was an error saving the schedule,
a schedule with the same name already exists.
 

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
Wed Sep 12 15:45:37 2007
@@ -66,6 +66,7 @@
     
                     <ww:textfield label="%{getText('buildDefinition.arguments.label')}"
name="arguments"/>
                     <ww:checkbox label="%{getText('buildDefinition.buildFresh.label')}"
name="buildFresh" value="buildFresh" fieldValue="true"/>
+                    <ww:checkbox label="%{getText('buildDefinition.alwaysBuild.label')}"
name="alwaysBuild" />
                     <ww:if test="defaultBuildDefinition == true">
                       <ww:label label="%{getText('buildDefinition.defaultForProject.label')}"
value="true"/>
                     </ww:if>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp?rev=575112&r1=575111&r2=575112&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionGroupSummaryComponent.jsp
Wed Sep 12 15:45:37 2007
@@ -60,6 +60,7 @@
       <ec:column property="isDefault" title="projectView.buildDefinition.default"/>
       <ec:column property="description" title="projectView.buildDefinition.description"/>
       <ec:column property="type" title="projectView.buildDefinition.type"/>
+      <ec:column property="alwaysBuild" title="projectView.buildDefinition.alwaysBuild"/>
       <ec:column property="buildAction" title="&nbsp;" width="1%">
         <redback:ifAuthorized permission="continuum-build-group" resource="${projectGroupName}">
           <ww:url id="buildUrl" action="buildProject" namespace="/">
@@ -159,6 +160,7 @@
       <ec:column property="isDefault" title="projectView.buildDefinition.default"/>
       <ec:column property="description" title="projectView.buildDefinition.description"/>
       <ec:column property="type" title="projectView.buildDefinition.type"/>
+      <ec:column property="alwaysBuild" title="projectView.buildDefinition.alwaysBuild"/>
       <ec:column property="buildNowAction" title="&nbsp;" width="1%">
         <redback:ifAuthorized permission="continuum-build-group" resource="${projectGroupName}">
           <ww:url id="buildProjectUrl" action="buildProject" namespace="/" includeParams="none">



Mime
View raw message