continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r709300 [3/3] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java/org/a...
Date Fri, 31 Oct 2008 00:01:41 GMT
Modified: continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java (original)
+++ continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java Thu Oct 30 17:01:38 2008
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.ContinuumException;
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.MessageContext;
 import org.apache.maven.continuum.notification.NotificationException;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
 import org.codehaus.plexus.util.StringUtils;
 import org.schwering.irc.lib.IRCConnection;
@@ -232,11 +231,21 @@
 
         BuildResult build = context.getBuildResult();
 
+        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
+
+        boolean isPrepareBuildComplete = 
+            messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_PREPARE_BUILD_COMPLETE );
+        
+        if ( projectScmRoot == null && isPrepareBuildComplete )
+        {
+            return;
+        }
+        
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
         // ----------------------------------------------------------------------
 
-        if ( build == null )
+        if ( build == null && !isPrepareBuildComplete )
         {
             return;
         }
@@ -245,38 +254,58 @@
         // Generate and send message
         // ----------------------------------------------------------------------
 
-        try
+        if ( messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
         {
-            if ( messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
+            for ( ProjectNotifier notifier : notifiers )
             {
-                for ( ProjectNotifier notifier : notifiers )
-                {
-                    buildComplete( project, notifier, build, buildDefinition );
-                }
+                buildComplete( project, notifier, build, buildDefinition );
             }
         }
-        catch ( ContinuumException e )
+        else if ( isPrepareBuildComplete )
         {
-            throw new NotificationException( "Error while notifiying.", e );
+            for ( ProjectNotifier notifier : notifiers )
+            {
+                prepareBuildComplete( projectScmRoot, notifier );
+            }
         }
     }
 
     private void buildComplete( Project project, ProjectNotifier projectNotifier, BuildResult build,
                                 BuildDefinition buildDef )
-        throws ContinuumException, NotificationException
+        throws NotificationException
     {
         // ----------------------------------------------------------------------
         // Check if the message should be sent at all
         // ----------------------------------------------------------------------
 
         BuildResult previousBuild = getPreviousBuild( project, buildDef, build );
-        Map<String, String> configuration = projectNotifier.getConfiguration();
 
         if ( !shouldNotify( build, previousBuild, projectNotifier ) )
         {
             return;
         }
 
+        sendMessage( projectNotifier.getConfiguration(), generateMessage( project, build, configurationService ) );
+    }
+
+    private void prepareBuildComplete( ProjectScmRoot projectScmRoot, ProjectNotifier projectNotifier )
+        throws NotificationException
+    {
+        // ----------------------------------------------------------------------
+        // Check if the message should be sent at all
+        // ----------------------------------------------------------------------
+
+        if ( !shouldNotify( projectScmRoot, projectNotifier ) )
+        {
+            return;
+        }
+        
+        sendMessage( projectNotifier.getConfiguration(), generateMessage( projectScmRoot, configurationService ) );
+    }    
+
+    private void sendMessage( Map<String, String> configuration, String message )
+        throws NotificationException
+    {
         // ----------------------------------------------------------------------
         // Gather configuration values
         // ----------------------------------------------------------------------
@@ -327,7 +356,7 @@
         {
             IRCConnection ircConnection = getIRConnection( host, port, password, nickName, alternateNickName, userName,
                                                            fullName, channel, isSsl );
-            ircConnection.doPrivmsg( channel, generateMessage( project, build ) );
+            ircConnection.doPrivmsg( channel, message );
         }
         catch ( IOException e )
         {
@@ -335,40 +364,6 @@
         }
     }
 
-    private String generateMessage( Project project, BuildResult build )
-        throws ContinuumException
-    {
-        int state = project.getState();
-
-        if ( build != null )
-        {
-            state = build.getState();
-        }
-
-        String message;
-
-        if ( state == ContinuumProjectState.OK )
-        {
-            message = "BUILD SUCCESSFUL: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.FAILED )
-        {
-            message = "BUILD FAILURE: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.ERROR )
-        {
-            message = "BUILD ERROR: " + project.getName();
-        }
-        else
-        {
-            log.warn( "Unknown build state " + state + " for project " + project.getId() );
-
-            message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
-        }
-
-        return message + " " + getReportUrl( project, build, configurationService );
-    }
-
     /**
      * Treats IRC events. The most of them are just printed.
      */

Modified: continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java (original)
+++ continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java Thu Oct 30 17:01:38 2008
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.ContinuumException;
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.MessageContext;
 import org.apache.maven.continuum.notification.NotificationException;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.jabber.JabberClient;
 import org.codehaus.plexus.jabber.JabberClientException;
 import org.codehaus.plexus.util.StringUtils;
@@ -114,11 +113,21 @@
         List<ProjectNotifier> notifiers = context.getNotifiers();
         BuildDefinition buildDefinition = context.getBuildDefinition();
         BuildResult build = context.getBuildResult();
+        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
+
+        boolean isPrepareBuildComplete = 
+            messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_PREPARE_BUILD_COMPLETE );
+
+        if ( projectScmRoot == null && isPrepareBuildComplete )
+        {
+            return;
+        }
+
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
         // ----------------------------------------------------------------------
 
-        if ( build == null )
+        if ( build == null && !isPrepareBuildComplete )
         {
             return;
         }
@@ -152,7 +161,14 @@
         {
             for ( ProjectNotifier notifier : notifiers )
             {
-                sendMessage( project, notifier, build, buildDefinition );
+                buildComplete( project, notifier, build, buildDefinition );
+            }
+        }
+        else if ( isPrepareBuildComplete )
+        {
+            for ( ProjectNotifier notifier : notifiers )
+            {
+                prepareBuildComplete( projectScmRoot, notifier );
             }
         }
     }
@@ -161,45 +177,9 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( Project project, BuildResult build )
-        throws ContinuumException
-    {
-        int state = project.getState();
-
-        if ( build != null )
-        {
-            state = build.getState();
-        }
-
-        String message;
-
-        if ( state == ContinuumProjectState.OK )
-        {
-            message = "BUILD SUCCESSFUL: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.FAILED )
-        {
-            message = "BUILD FAILURE: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.ERROR )
-        {
-            message = "BUILD ERROR: " + project.getName();
-        }
-        else
-        {
-            log.warn( "Unknown build state " + state + " for project " + project.getId() );
-
-            message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
-        }
-
-        return message + " " + getReportUrl( project, build, configurationService );
-    }
-
-    private void sendMessage( Project project, ProjectNotifier notifier, BuildResult build, BuildDefinition buildDef )
+    private void buildComplete( Project project, ProjectNotifier notifier, BuildResult build, BuildDefinition buildDef )
         throws NotificationException
     {
-        String message;
-
         // ----------------------------------------------------------------------
         // Check if the mail should be sent at all
         // ----------------------------------------------------------------------
@@ -211,26 +191,34 @@
             return;
         }
 
-        try
-        {
-            message = generateMessage( project, build );
-        }
-        catch ( ContinuumException e )
+        sendMessage( notifier.getConfiguration(), generateMessage( project, build, configurationService ) );
+    }
+
+    private void prepareBuildComplete( ProjectScmRoot projectScmRoot, ProjectNotifier notifier )
+        throws NotificationException
+    {
+        if ( !shouldNotify( projectScmRoot, notifier ) )
         {
-            throw new NotificationException( "Can't generate the message.", e );
+            return;
         }
 
-        jabberClient.setHost( getHost( notifier.getConfiguration() ) );
+        sendMessage( notifier.getConfiguration(), generateMessage( projectScmRoot, configurationService ) );
+    }
+    
+    private void sendMessage( Map<String, String> configuration, String message )
+        throws NotificationException
+    {
+        jabberClient.setHost( getHost( configuration ) );
 
-        jabberClient.setPort( getPort( notifier.getConfiguration() ) );
+        jabberClient.setPort( getPort( configuration ) );
 
-        jabberClient.setUser( getUsername( notifier.getConfiguration() ) );
+        jabberClient.setUser( getUsername( configuration ) );
 
-        jabberClient.setPassword( getPassword( notifier.getConfiguration() ) );
+        jabberClient.setPassword( getPassword( configuration ) );
 
-        jabberClient.setImDomainName( getImDomainName( notifier.getConfiguration() ) );
+        jabberClient.setImDomainName( getImDomainName( configuration ) );
 
-        jabberClient.setSslConnection( isSslConnection( notifier.getConfiguration() ) );
+        jabberClient.setSslConnection( isSslConnection( configuration ) );
 
         try
         {
@@ -238,14 +226,13 @@
 
             jabberClient.logon();
 
-            if ( notifier.getConfiguration() != null &&
-                StringUtils.isNotEmpty( (String) notifier.getConfiguration().get( ADDRESS_FIELD ) ) )
+            if ( configuration != null && StringUtils.isNotEmpty( (String) configuration.get( ADDRESS_FIELD ) ) )
             {
-                String address = (String) notifier.getConfiguration().get( ADDRESS_FIELD );
+                String address = (String) configuration.get( ADDRESS_FIELD );
                 String[] recipients = StringUtils.split( address, "," );
                 for ( String recipient : recipients )
                 {
-                    if ( isGroup( notifier.getConfiguration() ) )
+                    if ( isGroup( configuration ) )
                     {
                         jabberClient.sendMessageToGroup( recipient, message );
                     }

Modified: continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java (original)
+++ continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java Thu Oct 30 17:01:38 2008
@@ -19,7 +19,7 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.ContinuumException;
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.MessageContext;
 import org.apache.maven.continuum.notification.NotificationException;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.msn.MsnClient;
 import org.codehaus.plexus.msn.MsnException;
 import org.codehaus.plexus.util.StringUtils;
@@ -39,8 +38,6 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -103,11 +100,21 @@
 
         BuildResult build = context.getBuildResult();
 
+        ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
+
+        boolean isPrepareBuildComplete = 
+            messageId.equals( ContinuumNotificationDispatcher.MESSAGE_ID_PREPARE_BUILD_COMPLETE );
+
+        if ( projectScmRoot == null && isPrepareBuildComplete )
+        {
+            return;
+        }
+
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
         // ----------------------------------------------------------------------
 
-        if ( build == null )
+        if ( build == null && !isPrepareBuildComplete )
         {
             return;
         }
@@ -143,51 +150,22 @@
                 buildComplete( project, notifier, build, buildDefinition );
             }
         }
+        else if ( isPrepareBuildComplete )
+        {
+            for ( ProjectNotifier notifier : notifiers )
+            {
+                prepareBuildComplete( projectScmRoot, notifier );
+            }
+        }
     }
 
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( Project project, BuildResult build )
-        throws ContinuumException
-    {
-        int state = project.getState();
-
-        if ( build != null )
-        {
-            state = build.getState();
-        }
-
-        String message;
-
-        if ( state == ContinuumProjectState.OK )
-        {
-            message = "BUILD SUCCESSFUL: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.FAILED )
-        {
-            message = "BUILD FAILURE: " + project.getName();
-        }
-        else if ( state == ContinuumProjectState.ERROR )
-        {
-            message = "BUILD ERROR: " + project.getName();
-        }
-        else
-        {
-            log.warn( "Unknown build state " + state + " for project " + project.getId() );
-
-            message = "ERROR: Unknown build state " + state + " for " + project.getName() + " project";
-        }
-
-        return message + " " + getReportUrl( project, build, configurationService );
-    }
-
     private void buildComplete( Project project, ProjectNotifier notifier, BuildResult build, BuildDefinition buildDef )
         throws NotificationException
     {
-        String message;
-
         // ----------------------------------------------------------------------
         // Check if the message should be sent at all
         // ----------------------------------------------------------------------
@@ -199,27 +177,34 @@
             return;
         }
 
-        try
-        {
-            message = generateMessage( project, build );
-        }
-        catch ( ContinuumException e )
+        sendMessage( notifier.getConfiguration(), generateMessage( project, build, configurationService ) );
+    }
+
+    private void prepareBuildComplete( ProjectScmRoot projectScmRoot, ProjectNotifier notifier )
+        throws NotificationException
+    {
+        if ( !shouldNotify( projectScmRoot, notifier ) )
         {
-            throw new NotificationException( "Can't generate the message.", e );
+            return;
         }
 
-        msnClient.setLogin( getUsername( notifier.getConfiguration() ) );
+        sendMessage( notifier.getConfiguration(), generateMessage( projectScmRoot, configurationService ) );
+    }
+
+    private void sendMessage( Map<String, String> configuration, String message )
+        throws NotificationException
+    {
+        msnClient.setLogin( getUsername( configuration ) );
 
-        msnClient.setPassword( getPassword( notifier.getConfiguration() ) );
+        msnClient.setPassword( getPassword( configuration ) );
 
         try
         {
             msnClient.login();
 
-            if ( notifier.getConfiguration() != null &&
-                StringUtils.isNotEmpty( (String) notifier.getConfiguration().get( ADDRESS_FIELD ) ) )
+            if ( configuration != null && StringUtils.isNotEmpty( (String) configuration.get( ADDRESS_FIELD ) ) )
             {
-                String address = (String) notifier.getConfiguration().get( ADDRESS_FIELD );
+                String address = (String) configuration.get( ADDRESS_FIELD );
                 String[] recipients = StringUtils.split( address, "," );
                 for ( String recipient : recipients )
                 {

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java (original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java Thu Oct 30 17:01:38 2008
@@ -57,6 +57,8 @@
 
     protected static final String BUILD_TEMPLATE_BUILD_DEFINITIONS = "build-template-build-definitions";
 
+    protected static final String PROJECT_WITH_SCM_DETAILS_FETCH_GROUP = "project-with-scm-details";
+
     /**
      * @plexus.requirement
      */

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java (original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java Thu Oct 30 17:01:38 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.release.ContinuumReleaseResult;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.LocalRepository;
@@ -77,6 +78,7 @@
         PlexusJdoUtils.removeAll( getPersistenceManager(), BuildDefinitionTemplate.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), BuildResult.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), ContinuumReleaseResult.class );
+        PlexusJdoUtils.removeAll( getPersistenceManager(), ProjectScmRoot.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), ProjectGroup.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), Project.class );
         PlexusJdoUtils.removeAll( getPersistenceManager(), BuildDefinition.class );

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java (original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java Thu Oct 30 17:01:38 2008
@@ -183,6 +183,12 @@
         return (Project) getObjectById( Project.class, projectId, PROJECT_WITH_CHECKOUT_RESULT_FETCH_GROUP );
     }
 
+    public Project getProjectWithScmDetails( int projectId )
+        throws ContinuumStoreException
+    {
+        return (Project) getObjectById( Project.class, projectId, PROJECT_WITH_SCM_DETAILS_FETCH_GROUP );
+    }
+
     public List<Project> getProjectsInGroup( int projectGroupId )
         throws ContinuumStoreException
     {

Modified: continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java (original)
+++ continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java Thu Oct 30 17:01:38 2008
@@ -27,9 +27,11 @@
 import org.apache.continuum.dao.ProfileDao;
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.dao.ProjectGroupDao;
+import org.apache.continuum.dao.ProjectScmRootDao;
 import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
 import org.apache.continuum.dao.ScheduleDao;
 import org.apache.continuum.dao.SystemConfigurationDao;
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.release.ContinuumReleaseResult;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.LocalRepository;
@@ -85,6 +87,8 @@
 
     protected SystemConfigurationDao systemConfigurationDao;
 
+    protected ProjectScmRootDao projectScmRootDao;
+
     protected ContinuumReleaseResultDao releaseResultDao;
 
     protected ProjectGroup defaultProjectGroup;
@@ -135,6 +139,8 @@
 
     protected DirectoryPurgeConfiguration testDirectoryPurgeConfig;
 
+    protected ProjectScmRoot testProjectScmRoot;
+
     private SystemConfiguration systemConfiguration;
 
     @Override
@@ -165,6 +171,8 @@
 
         systemConfigurationDao = (SystemConfigurationDao) lookup( SystemConfigurationDao.class.getName() );
 
+        projectScmRootDao = (ProjectScmRootDao) lookup( ProjectScmRootDao.class.getName() );
+
         releaseResultDao = (ContinuumReleaseResultDao) lookup( ContinuumReleaseResultDao.class.getName() );
     }
 
@@ -569,7 +577,7 @@
 
         if ( addToStore )
         {
-            projectGroupDao.addProjectGroup( group );
+            group = projectGroupDao.addProjectGroup( group );
             testProjectGroup2.setId( group.getId() );
         }
         else
@@ -591,6 +599,13 @@
         {
             systemConfiguration = systemConfigurationDao.addSystemConfiguration( systemConfiguration );
         }
+        
+        testProjectScmRoot = createTestProjectScmRoot( "scmRootAddress1", 1, 0, "error1", group );
+        
+        if ( addToStore )
+        {
+            projectScmRootDao.addProjectScmRoot( testProjectScmRoot );
+        }
     }
 
     @Override
@@ -1367,6 +1382,30 @@
         assertEquals( "compare directory purge configuration - enabled", expectedConfig.isEnabled(),
                       actualConfig.isEnabled() );
     }
+    
+    protected static ProjectScmRoot createTestProjectScmRoot( String scmRootAddress, int state, int oldState,
+                                                              String error, ProjectGroup group )
+    {
+        ProjectScmRoot projectScmRoot = new ProjectScmRoot();
+        
+        projectScmRoot.setScmRootAddress( scmRootAddress );
+        projectScmRoot.setState( state );
+        projectScmRoot.setOldState( oldState );
+        projectScmRoot.setError( error );
+        projectScmRoot.setProjectGroup( group );
+        
+        return projectScmRoot;
+    }
+
+    protected static void assertProjectScmRootEquals( ProjectScmRoot expectedConfig, ProjectScmRoot actualConfig )
+    {
+        assertEquals( "compare project scm root - id", expectedConfig.getId(), actualConfig.getId() );
+        assertEquals( "compare project scm root - scmUrl", expectedConfig.getScmRootAddress(), 
+                                                           actualConfig.getScmRootAddress() );
+        assertEquals( "compare project scm root - state", expectedConfig.getState(), actualConfig.getState() );
+        assertEquals( "compare project scm root - oldState", expectedConfig.getOldState(), actualConfig.getOldState() );
+        assertEquals( "compare project scm root - error", expectedConfig.getError(), actualConfig.getError() );
+    }
 
     protected static ContinuumReleaseResult createTestContinuumReleaseResult( ProjectGroup group, Project project, 
                                                                               String releaseGoal, int resultCode,

Modified: continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java (original)
+++ continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java Thu Oct 30 17:01:38 2008
@@ -22,6 +22,7 @@
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildDefinitionTemplateDao;
 import org.apache.continuum.dao.BuildResultDao;
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.release.ContinuumReleaseResult;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.LocalRepository;
@@ -683,11 +684,11 @@
         BuildResult buildResult = (BuildResult) results.get( 0 );
         assertBuildResultEquals( testBuildResult2, buildResult );
         assertProjectEquals( testProject1, buildResult.getProject() );
-        checkBuildResultDefaultFetchGroup( buildResult );
+        //checkBuildResultDefaultFetchGroup( buildResult );
         buildResult = (BuildResult) results.get( 1 );
         assertBuildResultEquals( testBuildResult1, buildResult );
         assertProjectEquals( testProject1, buildResult.getProject() );
-        checkBuildResultDefaultFetchGroup( buildResult );
+        //checkBuildResultDefaultFetchGroup( buildResult );
     }
 
     public void testGetBuildResult()
@@ -695,7 +696,7 @@
     {
         BuildResult buildResult = buildResultDao.getBuildResult( testBuildResult3.getId() );
         assertBuildResultEquals( testBuildResult3, buildResult );
-        assertScmResultEquals( testBuildResult3.getScmResult(), buildResult.getScmResult() );
+        //assertScmResultEquals( testBuildResult3.getScmResult(), buildResult.getScmResult() );
         assertProjectEquals( testProject2, buildResult.getProject() );
         // TODO: reports, artifacts, data
     }
@@ -1249,8 +1250,47 @@
         assertRepositoryPurgeConfigurationEquals( testRepoPurgeConfiguration3, repoPurgeList.get( 1 ) );
         assertDirectoryPurgeConfigurationEquals( testDirectoryPurgeConfig, dirPurgeList.get( 0 ) );
     }
-    
-    public void testRemoveProjectWithReleaseResult()
+
+    public void testAddProjectScmRoot()
+        throws Exception
+    {
+        ProjectGroup projectGroup = projectGroupDao.getProjectGroup( testProjectGroup2.getId() );
+        ProjectScmRoot projectScmRoot = createTestProjectScmRoot( "scmRootAddress", 1, 0, "", projectGroup );
+        
+        projectScmRoot = projectScmRootDao.addProjectScmRoot( projectScmRoot );
+        
+        List<ProjectScmRoot> projectScmRoots = 
+            projectScmRootDao.getProjectScmRootByProjectGroup( projectGroup.getId() );
+        
+        assertEquals( "check # of project scm root", 2, projectScmRoots.size() );
+        
+        ProjectScmRoot retrievedProjectScmRoot = 
+            projectScmRootDao.getProjectScmRootByProjectGroupAndScmRootAddress( projectGroup.getId(), "scmRootAddress" );
+        
+        assertProjectScmRootEquals( projectScmRoot, retrievedProjectScmRoot );
+        assertProjectGroupEquals( projectScmRoot.getProjectGroup(), retrievedProjectScmRoot.getProjectGroup() );
+    }
+
+    public void testRemoveProjectScmRoot()
+        throws Exception
+    {
+        ProjectGroup projectGroup = projectGroupDao.getProjectGroup( testProjectGroup2.getId() );
+        
+        List<ProjectScmRoot> projectScmRoots = 
+            projectScmRootDao.getProjectScmRootByProjectGroup( projectGroup.getId() );
+        
+        assertEquals( "check # of project scm root", 1, projectScmRoots.size() );
+        
+        ProjectScmRoot projectScmRoot = projectScmRoots.get( 0 );
+        projectScmRootDao.removeProjectScmRoot( projectScmRoot );
+        
+        projectScmRoots = 
+            projectScmRootDao.getProjectScmRootByProjectGroup( projectGroup.getId() );
+        
+        assertEquals( "check # of project scm root", 0, projectScmRoots.size() );
+    }
+
+	public void testRemoveProjectWithReleaseResult()
         throws Exception
     {
         Project project = projectDao.getProject( testProject1.getId() );
@@ -1274,7 +1314,6 @@
         releaseResults = releaseResultDao.getAllContinuumReleaseResults();
         assertEquals( "check size of continuum release results", 0, releaseResults.size() );
     }
-
     // ----------------------------------------------------------------------
     //  HELPER METHODS
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java (original)
+++ continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java Thu Oct 30 17:01:38 2008
@@ -134,6 +134,8 @@
         
         configurationService.setReleaseOutputDirectory( getTestFile( "target/release-outpur" ) );
 
+        configurationService.setReleaseOutputDirectory( getTestFile( "target/release-outpur" ) );
+
         configurationService.store();
     }
 
@@ -422,8 +424,33 @@
 
         projectGroup.setName( name );
 
+        projectGroup.setGroupId( name );
+
         projectGroup.setDescription( description );
 
         return projectGroup;
     }
+
+    public Project addProject( String name, ProjectGroup group )
+        throws Exception
+    {
+        Project project = makeStubProject( name );
+
+        project.setGroupId( group.getGroupId() );
+
+        group.addProject( project );
+
+        try
+        {
+            projectGroupDao.getProjectGroup( group.getId() );
+
+            projectGroupDao.updateProjectGroup( group );
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            projectGroupDao.addProjectGroup( group );
+        }
+
+        return projectDao.getProject( project.getId() );
+    }
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/LocalRepositoryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/LocalRepositoryAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/LocalRepositoryAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/LocalRepositoryAction.java Thu Oct 30 17:01:38 2008
@@ -29,6 +29,7 @@
 import org.apache.continuum.purge.ContinuumPurgeManager;
 import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.repository.RepositoryService;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.action.ContinuumConfirmAction;
@@ -185,8 +186,8 @@
         else
         {
             // check if repository is in use
-            ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
-            if ( purgeManager.isRepositoryInUse( repository.getId() ) )
+            TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
+            if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
             {
                 addActionError( "repository.error.save.in.use" );
                 return ERROR;
@@ -207,8 +208,8 @@
     public String remove()
         throws Exception
     {
-        ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
-        if ( purgeManager.isRepositoryInUse( repository.getId() ) )
+        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
+        if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
         {
             message = "repository.error.remove.in.use";
             return ERROR;
@@ -238,9 +239,10 @@
         throws Exception
     {
         ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
-    
+        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
+
         // check if repository is in use
-        if ( purgeManager.isRepositoryInUse( repository.getId() ) )
+        if ( taskQueueManager.isRepositoryInUse( repository.getId() ) )
         {
             message = "repository.error.purge.in.use";
             return ERROR;

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java Thu Oct 30 17:01:38 2008
@@ -32,6 +32,7 @@
 import org.apache.continuum.purge.ContinuumPurgeManager;
 import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.repository.RepositoryService;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
@@ -273,6 +274,7 @@
         throws Exception
     {
         ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
+        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
         
         if ( purgeConfigId > 0 )
         {
@@ -283,7 +285,7 @@
                 RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;
                 
                 // check if repository is in use
-                if ( purgeManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
+                if ( taskQueueManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
                 {
                     message = "repository.error.purge.in.use";
                     return ERROR;

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/startup/ContinuumStartup.java Thu Oct 30 17:01:38 2008
@@ -78,6 +78,9 @@
         
         TaskQueueExecutor purge = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
             .buildSpringId( TaskQueueExecutor.class, "purge" ) );
+
+        TaskQueueExecutor prepareBuildProject = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
+            .buildSpringId( TaskQueueExecutor.class, "prepare-build-project" ) );
     }
 
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java Thu Oct 30 17:01:38 2008
@@ -27,11 +27,9 @@
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.apache.maven.continuum.web.util.StateGenerator;
 import org.codehaus.plexus.util.FileUtils;
@@ -92,7 +90,7 @@
         {
             hasSurefireResults = files.length > 0;
         }
-        changeSet = getContinuum().getChangesSinceLastSuccess( getProjectId(), getBuildId() );
+        changeSet = getContinuum().getChangesSinceLastUpdate( getProjectId() );
 
         buildOutput = getBuildOutputText();
         

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java Thu Oct 30 17:01:38 2008
@@ -22,6 +22,8 @@
 import java.util.List;
 
 import org.apache.commons.lang.ArrayUtils;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.web.action.admin.AbstractBuildQueueAction;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
@@ -74,7 +76,16 @@
             int projectId = Integer.parseInt( selectedProjectId );
             projectsId = ArrayUtils.add( projectsId, projectId );
         }
-        getContinuum().removeProjectsFromBuildingQueue( projectsId );
+
+        TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
+        try
+        {
+            taskQueueManager.removeProjectsFromBuildingQueue( projectsId );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( "Unable to remove projects from building queue", e );
+        }
         // now we must check if the current build is one of this
         int index = ArrayUtils.indexOf( projectsId, getCurrentProjectIdBuilding() );
         if ( index > 0 )

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java Thu Oct 30 17:01:38 2008
@@ -19,7 +19,10 @@
  * under the License.
  */
 
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -78,6 +81,11 @@
      */
     private RoleManager roleManager;
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+
     private int projectGroupId;
 
     private ProjectGroup projectGroup;
@@ -124,6 +132,8 @@
 
     private boolean disabledRepositories = true;
 
+    private List<ProjectScmRoot> projectScmRoots;
+
     public String summary()
         throws ContinuumException
     {
@@ -138,7 +148,7 @@
         }
 
         projectGroup = getContinuum().getProjectGroupWithProjects( projectGroupId );
-       
+
         List<BuildDefinition> projectGroupBuildDefs =
             getContinuum().getBuildDefinitionsForProjectGroup( projectGroupId );
 
@@ -224,6 +234,8 @@
                     preferredExecutor = "shell";
                 }
             }
+
+            projectScmRoots = getContinuum().getProjectScmRootByProjectGroup( projectGroup.getId() );
         }
 
         return SUCCESS;
@@ -323,7 +335,7 @@
         name = projectGroup.getName();
 
         description = projectGroup.getDescription();
-       
+
         projectList = projectGroup.getProjects();
 
         if ( projectList != null )
@@ -333,9 +345,16 @@
             while ( proj.hasNext() )
             {
                 Project p = (Project) proj.next();
-                if ( getContinuum().isInCheckoutQueue( p.getId() ) )
+                try
+                {
+                    if ( taskQueueManager.isInCheckoutQueue( p.getId() ) )
+                    {
+                        projectInCOQueue = true;
+                    }
+                }
+                catch ( TaskQueueManagerException e )
                 {
-                    projectInCOQueue = true;
+                    throw new ContinuumException( e.getMessage(), e );
                 }
                 projects.put( p, new Integer( p.getProjectGroup().getId() ) );
             }
@@ -996,6 +1015,16 @@
         this.disabledRepositories = disabledRepositories;
     }
 
+    public List<ProjectScmRoot> getProjectScmRoots()
+    {
+        return projectScmRoots;
+    }
+
+    public void setProjectScmRoots( List<ProjectScmRoot> projectScmRoots )
+    {
+        this.projectScmRoots = projectScmRoots;
+    }
+
     private boolean isAuthorized( String projectGroupName )
     {
         try

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java Thu Oct 30 17:01:38 2008
@@ -20,8 +20,10 @@
  */
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -147,7 +149,7 @@
                 projectsList.add( p );
             }
 
-            List sortedProjects;
+            List<Project> sortedProjects;
             try
             {
                 sortedProjects = getContinuum().getProjectsInBuildOrder( projectsList );
@@ -157,65 +159,37 @@
                 sortedProjects = projectsList;
             }
 
-            //TODO : Change this part because it's a duplicate of DefaultContinuum.buildProjectGroup*
-            List<BuildDefinition> groupDefaultBDs = null;
+            Collection<Map<Integer, Integer>> projectsBuildDefs = getProjectsBuildDefsMap( sortedProjects );
 
-            if ( getBuildDefinitionId() <= 0 )
-            {
-                groupDefaultBDs = getContinuum().getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
-            }
-            for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
-            {
-                Project project = (Project) i.next();
-                if ( this.getBuildDefinitionId() <= 0 )
-                {
-                    int buildDefId = -1;
+            getContinuum().prepareBuildProjects( projectsBuildDefs, ContinuumProjectState.TRIGGER_FORCED );
+        }
 
-                    if ( groupDefaultBDs != null )
-                    {
-                        for ( BuildDefinition bd : groupDefaultBDs )
-                        {
-                            if ( project.getExecutorId().equals( bd.getType() ) )
-                            {
-                                buildDefId = bd.getId();
-                                break;
-                            }
-                        }
-                    }
-
-                    BuildDefinition projectDefaultBD = null;
-                    if ( this.getBuildDefinitionId() == -1 )
-                    {
-                        try
-                        {
-                            projectDefaultBD = getContinuum().getDefaultBuildDefinition( project.getId() );
-                        }
-                        catch ( ContinuumException e )
-                        {
-                            // here skip ObjectNotException
-                            getLogger().debug( e.getMessage() );
-                        }
-
-                        if ( projectDefaultBD != null )
-                        {
-                            buildDefId = projectDefaultBD.getId();
-                            getLogger().debug( "Project " + project.getId() +
-                                " has own default build definition, will use it instead of group's." );
-                        }
-                    }
+        return SUCCESS;
+    }
 
-                    getContinuum().buildProject( project.getId(), buildDefId, ContinuumProjectState.TRIGGER_FORCED );
-                }
-                else
-                {
-                    getContinuum().buildProject( project.getId(), this.getBuildDefinitionId(),
-                                                 ContinuumProjectState.TRIGGER_FORCED );
-                }
+    private Collection<Map<Integer, Integer>> getProjectsBuildDefsMap( List<Project> projects )
+        throws ContinuumException
+    {
+        if ( this.getBuildDefinitionId() <= 0 )
+        {
+            boolean checkDefaultBuildDefinitionForProject = false;
+
+            if ( this.getBuildDefinitionId() == -1 )
+            {
+                checkDefaultBuildDefinitionForProject = true;
             }
 
-        }
+            List<BuildDefinition> groupDefaultBDs = getContinuum().getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
 
-        return SUCCESS;
+            return getContinuum().getProjectsAndBuildDefinitions( projects, 
+                                                                  groupDefaultBDs, 
+                                                                  checkDefaultBuildDefinitionForProject );
+        }
+        else
+        {
+            return getContinuum().getProjectsAndBuildDefinitions( projects,
+                                                                  this.getBuildDefinitionId() );
+        }
     }
 
     public String getProjectGroupName()

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java Thu Oct 30 17:01:38 2008
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -53,6 +55,11 @@
 
     private GroupSummary groupSummary = new GroupSummary();
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+
     public String execute()
         throws ContinuumException
     {
@@ -101,19 +108,26 @@
             model.setProjectGroupName( project.getProjectGroup().getName() );
 
             model.setProjectType( project.getExecutorId() );
-            
-            if ( getContinuum().isInBuildingQueue( project.getId() ) )
-            {
-                model.setInBuildingQueue( true );
-            }
-            else if ( getContinuum().isInCheckoutQueue( project.getId() ) )
+
+            try
             {
-                model.setInCheckoutQueue( true );
+                if ( taskQueueManager.isInBuildingQueue( project.getId() ) )
+                {
+                    model.setInBuildingQueue( true );
+                }
+                else if ( taskQueueManager.isInCheckoutQueue( project.getId() ) )
+                {
+                    model.setInCheckoutQueue( true );
+                }
+                else
+                {
+                    model.setInBuildingQueue( false );
+                    model.setInCheckoutQueue( false );
+                }
             }
-            else
+            catch ( TaskQueueManagerException e )
             {
-                model.setInBuildingQueue( false );
-                model.setInCheckoutQueue( false );
+                throw new ContinuumException( e.getMessage(), e );
             }
 
             model.setState( project.getState() );

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java Thu Oct 30 17:01:38 2008
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.apache.commons.lang.ArrayUtils;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
@@ -77,6 +78,11 @@
 
     private String projectName;
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+
     // -----------------------------------------------------
     //  webwork
     // -----------------------------------------------------     
@@ -121,7 +127,7 @@
             return REQUIRES_AUTHENTICATION;
         }
             
-        getContinuum().removeProjectFromCheckoutQueue( projectId );
+        taskQueueManager.removeProjectFromCheckoutQueue( projectId );
         return SUCCESS;
     }
 
@@ -150,9 +156,9 @@
         throws Exception
     {
         this.setCurrentBuildProjectTask( (BuildProjectTask) taskQueueExecutor.getCurrentTask() );        
-        this.setBuildProjectTasks( getContinuum().getProjectsInBuildQueue() );
+        this.setBuildProjectTasks( taskQueueManager.getProjectsInBuildQueue() );
         this.setCurrentCheckOutTask( (CheckOutTask) checkoutTaskQueueExecutor.getCurrentTask() );
-        this.setCurrentCheckOutTasks( getContinuum().getCheckOutTasksInQueue() );
+        this.setCurrentCheckOutTasks( taskQueueManager.getCheckOutTasksInQueue() );
         return SUCCESS;
     }
 
@@ -174,7 +180,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum().removeFromBuildingQueue( projectId, buildDefinitionId, trigger, projectName );
+        taskQueueManager.removeFromBuildingQueue( projectId, buildDefinitionId, trigger, projectName );
         Project project = getContinuum().getProject( projectId );
         project.setState( project.getOldState() );
         getContinuum().updateProject( project );
@@ -200,7 +206,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum().removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes()) );
+        taskQueueManager.removeProjectsFromBuildingQueueWithHashCodes( listToIntArray(this.getSelectedBuildTaskHashCodes()) );
         return SUCCESS;
     }
 
@@ -222,7 +228,7 @@
             return REQUIRES_AUTHENTICATION;
         }
         
-        getContinuum()
+        taskQueueManager
             .removeTasksFromCheckoutQueueWithHashCodes( listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
         return SUCCESS;
     }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/NotifierSummaryAction.java Thu Oct 30 17:01:38 2008
@@ -320,6 +320,14 @@
             }
             sb.append( "Warning" );
         }
+        if ( notifier.isSendOnScmFailure() )
+        {
+            if ( sb.length() > 0 )
+            {
+                sb.append( '/' );
+            }
+            sb.append( "SCM Failure" );
+        }
         ns.setEvents( sb.toString() );
 
         ns.setEnabled( notifier.isEnabled() );

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java Thu Oct 30 17:01:38 2008
@@ -75,6 +75,13 @@
     private boolean sendOnWarning;
 
     /**
+     * Detemines if the notifier should fire when prepare build resulted in any error(s).<p>
+     * <code>true</code> implies notifier executes when any error(s) is/are detected
+     * for the build.
+     */
+    private boolean sendOnScmFailure;
+
+    /**
      * Detemines if the save operation returns to the project group notifier page or not.<p>
      * <code>true</code> implies return to the project group notifier page.
      */
@@ -137,6 +144,8 @@
 
         notifier.setSendOnWarning( isSendOnWarning() );
 
+        notifier.setSendOnScmFailure( isSendOnScmFailure() );
+
         setNotifierConfiguration( notifier );
 
         saveNotifier( notifier );
@@ -186,6 +195,8 @@
 
         setSendOnWarning( notifier.isSendOnWarning() );
 
+        setSendOnScmFailure( notifier.isSendOnScmFailure() );
+
         initConfiguration( notifier.getConfiguration() );
 
         return SUCCESS;
@@ -276,6 +287,16 @@
         this.sendOnWarning = sendOnWarning;
     }
 
+    public boolean isSendOnScmFailure()
+    {
+        return sendOnScmFailure;
+    }
+
+    public void setSendOnScmFailure( boolean sendOnScmFailure )
+    {
+        this.sendOnScmFailure = sendOnScmFailure;
+    }
+
     /**
      * @param notifierId the notifierId to set
      */

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/util/StateGenerator.java Thu Oct 30 17:01:38 2008
@@ -49,7 +49,7 @@
         {
             return NEW;
         }
-        else if ( state == ContinuumProjectState.OK )
+        else if ( state == ContinuumProjectState.OK || state == ContinuumProjectState.UPDATED )
         {
             return "<img src=\"" + contextPath + "/images/icon_success_sml.gif\" alt=\"" + SUCCESS + "\" title=\"" +
                 SUCCESS + "\" border=\"0\" />";

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java (original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/StateCell.java Thu Oct 30 17:01:38 2008
@@ -22,6 +22,8 @@
 import com.opensymphony.webwork.ServletActionContext;
 import com.opensymphony.webwork.views.util.UrlHelper;
 import com.opensymphony.xwork.ActionContext;
+
+import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.model.ProjectSummary;
@@ -52,40 +54,81 @@
 {
     protected String getCellValue( TableModel tableModel, Column column )
     {
-        ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
-
-        switch ( project.getState() )
+        if ( tableModel.getCurrentRowBean() instanceof ProjectSummary )
         {
-            case ContinuumProjectState.NEW:
-            case ContinuumProjectState.OK:
-            case ContinuumProjectState.FAILED:
-            case ContinuumProjectState.ERROR:
-            case ContinuumProjectState.BUILDING:
-            case ContinuumProjectState.UPDATING:
-            case ContinuumProjectState.CHECKING_OUT:
-            {
-                String state = StateGenerator.generate( project.getState(), tableModel.getContext().getContextPath() );
+            ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
 
-                if ( project.getLatestBuildId() != -1 && !StateGenerator.NEW.equals( state ) )
+            switch ( project.getState() )
+            {
+                case ContinuumProjectState.NEW:
+                case ContinuumProjectState.OK:
+                case ContinuumProjectState.FAILED:
+                case ContinuumProjectState.ERROR:
+                case ContinuumProjectState.BUILDING:
+                case ContinuumProjectState.UPDATING:
+                case ContinuumProjectState.CHECKING_OUT:
                 {
-                    if ( isAuthorized( project ) )
+                    String state = StateGenerator.generate( project.getState(), tableModel.getContext().getContextPath() );
+
+                    if ( project.getLatestBuildId() != -1 && !StateGenerator.NEW.equals( state ) 
+                         && project.getState() != ContinuumProjectState.UPDATING )
                     {
-                        return createActionLink( "buildResult", project, state );
+                        if ( isAuthorized( project.getProjectGroupName() ) )
+                        {
+                            return createActionLink( "buildResult", project, state );
+                        }
+                        else
+                        {
+                            return state;
+                        }
                     }
                     else
                     {
                         return state;
                     }
                 }
-                else
+
+                default:
                 {
-                    return state;
+                    return "&nbsp;";
                 }
             }
+        }
+        else 
+        {
+            ProjectScmRoot projectScmRoot = (ProjectScmRoot) tableModel.getCurrentRowBean();
 
-            default:
+            switch ( projectScmRoot.getState() )
             {
-                return "&nbsp;";
+                case ContinuumProjectState.UPDATING:
+                case ContinuumProjectState.UPDATED:
+                case ContinuumProjectState.ERROR:
+                {
+                    String state = StateGenerator.generate( projectScmRoot.getState(), 
+                                                            tableModel.getContext().getContextPath() );
+                    
+                    if ( !StateGenerator.NEW.equals( state ) )
+                    {
+                        if ( isAuthorized( projectScmRoot.getProjectGroup().getName() ) &&
+                             projectScmRoot.getState() == ContinuumProjectState.ERROR )
+                        {
+                            return createActionLink( "scmResult", projectScmRoot, state );
+                        }
+                        else
+                        {
+                            return state;
+                        }
+                    }
+                    else
+                    {
+                        return state;
+                    }
+                }
+
+                default:
+                {
+                    return "&nbsp;";
+                }
             }
         }
     }
@@ -107,8 +150,22 @@
 
         return "<a href=\"" + url + "\">" + state + "</a>";
     }
+    
+    private static String createActionLink( String action, ProjectScmRoot scmRoot, String state )
+    {
+        HashMap params = new HashMap();
+
+        params.put( "projectGroupId", new Integer( scmRoot.getProjectGroup().getId() ) );
+
+        params.put( "projectScmRootId", new Integer( scmRoot.getId() ) );
+
+        String url = UrlHelper.buildUrl( "/" + action + ".action", ServletActionContext.getRequest(), 
+                                         ServletActionContext.getResponse(), params );
+
+        return "<a href=\"" + url + "\">" + state + "</a>";
+    }
 
-    private boolean isAuthorized( ProjectSummary project )
+    private boolean isAuthorized( String projectGroupName )
     {
         // do the authz bit
         ActionContext context = ActionContext.getContext();
@@ -122,7 +179,7 @@
             SecuritySystem securitySystem = (SecuritySystem) container.lookup( SecuritySystem.ROLE );
 
             if ( !securitySystem.isAuthorized( securitySession, ContinuumRoleConstants.CONTINUUM_VIEW_GROUP_OPERATION,
-                                               project.getProjectGroupName() ) )
+                                               projectGroupName ) )
             {
                 return false;
             }

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Thu Oct 30 17:01:38 2008
@@ -183,6 +183,8 @@
 projectGroup.releaseNow = Release Group
 projectGroup.repository.label = Local Repository
 projectGroup.tab.releaseResults = Release Results
+projectGroup.scmRoot.title = Project Group Scm Root
+projectGroup.scmRoot.label = Scm Root URL
 
 # ----------------------------------------------------------------------
 # Page: Project Group - Members
@@ -484,6 +486,7 @@
 notifier.event.sendOnFailure = Send on Failure
 notifier.event.sendOnError = Send on Error
 notifier.event.sendOnWarning = Send on Warning
+notifier.event.sendOnScmFailure = Send On SCM Failure
 
 # ----------------------------------------------------------------------
 # Page: BuildResults
@@ -935,3 +938,13 @@
 deleteReleaseResults.page.title = Continuum - Delete Release Results
 deleteReleaseResults.section.title = Delete Release Results
 deleteReleaseResults.confirmation.message = Are you sure you want to delete {0} release results ?
+
+# ----------------------------------------------------------------------
+# Page: ScmResult
+# ----------------------------------------------------------------------
+scmResult.page.title = Continuum - SCM result
+scmResult.section.title = SCM result
+scmResult.state = State
+scmResult.projectGroupName = Project Group Name
+scmResult.scmRootAddress = SCM Root URL
+scmResult.scmError = SCM Error
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Oct 30 17:01:38 2008
@@ -409,6 +409,10 @@
       </result>
     </action>
 
+    <action name="scmResult" class="scmResult">
+      <result name="success">/WEB-INF/jsp/scmResult.jsp</result>
+    </action>
+
     <!--
     * schedule actions
     -->
@@ -432,7 +436,10 @@
     </action>
 
     <action name="cancelBuild" class="cancelBuild">
-      <result name="success" type="chain">buildResults</result>
+      <result name="success" type="redirect-action">
+        <param name="actionName">projectGroupSummary</param>
+        <param name="projectGroupId">${projectGroupId}</param>
+      </result>
     </action>
     
     <action name="cancelBuilds" class="cancelBuild" method="cancelBuilds">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp Thu Oct 30 17:01:38 2008
@@ -120,6 +120,7 @@
                 <c:otherwise>
                   <ww:url id="cancelBuildProjectUrl" action="cancelBuild" namespace="/" includeParams="none">
                     <ww:param name="projectId" value="${project.id}"/>
+                    <ww:param name="projectGroupId" value="${project.projectGroupId}"/>
                   </ww:url>
                   <c:choose>
                     <c:when test="${project.state != 8}">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp Thu Oct 30 17:01:38 2008
@@ -64,6 +64,7 @@
                 <ww:checkbox label="%{getText('notifier.event.sendOnFailure')}" name="sendOnFailure" value="sendOnFailure" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnError')}" name="sendOnError" value="sendOnError" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnWarning')}" name="sendOnWarning" value="sendOnWarning" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnScmFailure')}" name="sendOnScmFailure" value="sendOnScmFailure" fieldValue="true"/>
               </tbody>
             </table>
             <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp Thu Oct 30 17:01:38 2008
@@ -63,6 +63,7 @@
                 <ww:checkbox label="%{getText('notifier.event.sendOnFailure')}" name="sendOnFailure" value="sendOnFailure" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnError')}" name="sendOnError" value="sendOnError" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnWarning')}" name="sendOnWarning" value="sendOnWarning" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnScmFailure')}" name="sendOnScmFailure" value="sendOnScmFailure" fieldValue="true"/>
               </tbody>
             </table>
             <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp Thu Oct 30 17:01:38 2008
@@ -58,6 +58,7 @@
                 <ww:checkbox label="%{getText('notifier.event.sendOnFailure')}" name="sendOnFailure" value="sendOnFailure" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnError')}" name="sendOnError" value="sendOnError" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnWarning')}" name="sendOnWarning" value="sendOnWarning" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnScmFailure')}" name="sendOnScmFailure" value="sendOnScmFailure" fieldValue="true"/>
               </tbody>
             </table>
             <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp Thu Oct 30 17:01:38 2008
@@ -58,6 +58,7 @@
                 <ww:checkbox label="%{getText('notifier.event.sendOnFailure')}" name="sendOnFailure" value="sendOnFailure" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnError')}" name="sendOnError" value="sendOnError" fieldValue="true"/>
                 <ww:checkbox label="%{getText('notifier.event.sendOnWarning')}" name="sendOnWarning" value="sendOnWarning" fieldValue="true"/>
+                <ww:checkbox label="%{getText('notifier.event.sendOnScmFailure')}" name="sendOnScmFailure" value="sendOnScmFailure" fieldValue="true"/>
               </tbody>
             </table>
             <div class="functnbar3">

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp Thu Oct 30 17:01:38 2008
@@ -96,6 +96,20 @@
       </table>
     </div>
 
+    <h3><ww:text name="projectGroup.scmRoot.title"/></h3>
+    <ec:table items="projectScmRoots"
+              var="projectScmRoot"
+              showExports="false"
+              showPagination="false"
+              showStatusBar="false"
+              sortable="false"
+              filterable="false">
+      <ec:row highlightRow="true">
+        <ec:column property="state" title="&nbsp;" width="1%" cell="org.apache.maven.continuum.web.view.StateCell"/>
+        <ec:column property="scmRootAddress" title="projectGroup.scmRoot.label"/>  
+      </ec:row>
+    </ec:table>
+
     <redback:ifAnyAuthorized permissions="continuum-build-group,continuum-remove-group" resource="${projectGroup.name}">
       <h3><ww:text name="projectGroup.actions.title"/></h3>
 

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=709300&r1=709299&r2=709300&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java Thu Oct 30 17:01:38 2008
@@ -25,6 +25,8 @@
 import org.apache.continuum.purge.ContinuumPurgeManagerException;
 import org.apache.continuum.purge.PurgeConfigurationServiceException;
 import org.apache.continuum.repository.RepositoryServiceException;
+import org.apache.continuum.taskqueue.manager.TaskQueueManager;
+import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
 import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.xmlrpc.repository.LocalRepository;
@@ -92,6 +94,11 @@
      */
     private RoleManager roleManager;
 
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueueManager taskQueueManager;
+
     public boolean ping()
         throws ContinuumException
     {
@@ -1036,20 +1043,41 @@
     public boolean isProjectInBuildingQueue( int projectId )
         throws ContinuumException
     {
-        return continuum.isInBuildingQueue( projectId );
+        try
+        {
+            return taskQueueManager.isInBuildingQueue( projectId );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
     }
 
     public List<BuildProjectTask> getProjectsInBuildQueue()
         throws ContinuumException
     {
-        return populateBuildProjectTaskList( continuum.getProjectsInBuildQueue() );
+        try
+        {
+            return populateBuildProjectTaskList( taskQueueManager.getProjectsInBuildQueue() );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
     }
 
     public int removeProjectsFromBuildingQueue( int[] projectsId )
         throws ContinuumException
     {
         checkManageQueuesAuthorization();
-        continuum.removeProjectsFromBuildingQueue( projectsId );
+        try
+        {
+            taskQueueManager.removeProjectsFromBuildingQueue( projectsId );
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
         return 0;
     }
 
@@ -1057,7 +1085,14 @@
         throws ContinuumException
     {
         checkManageQueuesAuthorization();
-        return continuum.cancelCurrentBuild();
+        try
+        {
+            return taskQueueManager.cancelCurrentBuild();
+        }
+        catch ( TaskQueueManagerException e )
+        {
+            throw new ContinuumException( e.getMessage(), e );
+        }
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message