continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r359792 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java
Date Thu, 29 Dec 2005 13:55:32 GMT
Author: evenisse
Date: Thu Dec 29 05:55:29 2005
New Revision: 359792

URL: http://svn.apache.org/viewcvs?rev=359792&view=rev
Log:
Fix build definitiuons

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java?rev=359792&r1=359791&r2=359792&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionEditAction.java
Thu Dec 29 05:55:29 2005
@@ -67,8 +67,17 @@
     {
         try
         {
+            boolean isNew = false;
+
             bd = getBuildDefinition();
 
+            if ( bd == null || buildDefinitionId == 0 )
+            {
+                bd = new BuildDefinition();
+
+                isNew = true;
+            }
+
             bd.setGoals( goals );
 
             bd.setBuildFile( buildFile );
@@ -81,7 +90,14 @@
 
             bd.setSchedule( schedule );
 
-            continuum.updateBuildDefinition( bd, projectId );
+            if ( !isNew )
+            {
+                continuum.updateBuildDefinition( bd, projectId );
+            }
+            else
+            {
+                continuum.addBuildDefinition( projectId, bd );
+            }
         }
         catch ( ContinuumException e )
         {



Mime
View raw message