continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r387954 - in /maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum: buildcontroller/ core/action/ notification/
Date Wed, 22 Mar 2006 21:58:07 GMT
Author: evenisse
Date: Wed Mar 22 13:58:03 2006
New Revision: 387954

URL: http://svn.apache.org/viewcvs?rev=387954&view=rev
Log:
Rollback some deleted requests, so notifiers will be available correctly in the notifier dispatcher.
It's required to reload each time notifiers list with store.getProjectWithAllDetails because
store.update modify (in jpox) project instance and delete reference of objects attached to
cureent objet by a fetch group. So with this partial rollback, i readd at least five request
during a project build :-(

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=387954&r1=387953&r2=387954&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Wed Mar 22 13:58:03 2006
@@ -95,7 +95,7 @@
 
         try
         {
-            project = store.getProjectWithBuildDetails( projectId );
+            project = store.getProject( projectId );
 
             buildDefinition = store.getBuildDefinition( buildDefinitionId );
         }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=387954&r1=387953&r2=387954&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
Wed Mar 22 13:58:03 2006
@@ -49,6 +49,8 @@
     {
         Project project = getProject( context );
 
+        project = store.getProjectWithAllDetails( project.getId() );
+
         getLogger().info( "Updating project '" + project.getName() + "' from checkout." );
 
         BuildDefinition buildDefinition = store.getBuildDefinition( getBuildDefinitionId(
context ) );

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=387954&r1=387953&r2=387954&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
Wed Mar 22 13:58:03 2006
@@ -112,6 +112,12 @@
 
         try
         {
+            // TODO: remove re-reading?
+            // Here we need to get all the project details
+            //  - builds are used to detect if the state has changed (TODO: maybe previousState
field is better)
+            //  - notifiers are used to send the notification
+            project = store.getProjectWithAllDetails( project.getId() );
+
             context.put( CONTEXT_PROJECT, project );
 
             if ( build != null )
@@ -126,6 +132,12 @@
 
                 context.put( CONTEXT_UPDATE_SCM_RESULT, build.getScmResult() );
             }
+        }
+        catch ( ContinuumStoreException e )
+        {
+            getLogger().error( "Error while population the notification context.", e );
+
+            return;
         }
         catch ( ConfigurationException e )
         {



Mime
View raw message