continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r329774 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Mon, 31 Oct 2005 08:55:00 GMT
Author: evenisse
Date: Mon Oct 31 00:54:57 2005
New Revision: 329774

URL: http://svn.apache.org/viewcvs?rev=329774&view=rev
Log:
o Check if project have a default build definition
o Don't add project in queue if it's already building.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.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=329774&r1=329773&r2=329774&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
Mon Oct 31 00:54:57 2005
@@ -318,6 +318,11 @@
     {
         BuildDefinition buildDef = getDefaultBuildDefinition( projectId );
 
+        if ( buildDef == null )
+        {
+            throw new ContinuumException( "Project (id=" + projectId + " doens't have a default
build definition." );
+        }
+
         buildProject( projectId, buildDef.getId(), ContinuumProjectState.TRIGGER_FORCED );
     }
 
@@ -326,6 +331,11 @@
     {
         BuildDefinition buildDef = getDefaultBuildDefinition( projectId );
 
+        if ( buildDef == null )
+        {
+            throw new ContinuumException( "Project (id=" + projectId + " doens't have a default
build definition." );
+        }
+
         buildProject( projectId, buildDef.getId(), trigger );
     }
 
@@ -340,6 +350,15 @@
         try
         {
             Project project = store.getProject( projectId );
+
+            if ( project.getState != ContinuumProjectState.NEW &&
+                 project.getState != ContinuumProjectState.SUCCESS &&
+                 project.getState != ContinuumProjectState.FAILURE &&
+                 project.getState != ContinuumProjectState.ERROR )
+            {
+                // project is building
+                return;
+            }
 
             project.setOldState( project.getState() );
 



Mime
View raw message