continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r327198 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum: DefaultContinuum.java buildcontroller/DefaultBuildController.java
Date Fri, 21 Oct 2005 14:23:50 GMT
Author: evenisse
Date: Fri Oct 21 07:23:45 2005
New Revision: 327198

URL: http://svn.apache.org/viewcvs?rev=327198&view=rev
Log:
[CONTINUUM-268] Set project state before build request returns

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

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=327198&r1=327197&r2=327198&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
Fri Oct 21 07:23:45 2005
@@ -344,6 +344,10 @@
             getLogger().info( "Enqueuing '" + project.getName() + "' (Build definition id="
+ buildDefinitionId + "." );
 
             buildQueue.put( new BuildProjectTask( projectId, buildDefinitionId, trigger )
);
+
+            project.setState( ContinuumProjectState.BUILDING );
+
+            store.updateProject( project );
         }
         catch ( ContinuumStoreException e )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=327198&r1=327197&r2=327198&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
Fri Oct 21 07:23:45 2005
@@ -232,6 +232,20 @@
         }
         finally
         {
+            try
+            {
+                project = store.getProject( project.getId() );
+
+                if ( ContinuumProjectState.BUILDING == project.getState() )
+                {
+                    project.setState( ContinuumProjectState.ERROR );
+                }
+            }
+            catch ( ContinuumStoreException e )
+            {
+                getLogger().error( "Can't store the project state for project " + project.getName()
);
+            }
+
             notifierDispatcher.buildComplete( project, build );
         }
     }



Mime
View raw message