continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r224676 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/core/ continuum-core/src/main/java...
Date Sun, 24 Jul 2005 23:40:24 GMT
Author: jvanzyl
Date: Sun Jul 24 16:40:08 2005
New Revision: 224676

URL: http://svn.apache.org/viewcvs?rev=224676&view=rev
Log:
o collapse of continuum core back into the continuum application component

Removed:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractValidationContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProjectGroup.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Sun Jul 24 16:40:08 2005
@@ -32,6 +32,8 @@
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
 /**

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=224676&r1=224675&r2=224676&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 Sun Jul 24 16:40:08 2005
@@ -18,10 +18,10 @@
 
 import org.apache.maven.continuum.build.settings.BuildSettingsActivationException;
 import org.apache.maven.continuum.build.settings.BuildSettingsActivator;
+import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
-import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
 import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
@@ -51,15 +51,23 @@
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ProjectSorter;
+import org.codehaus.plexus.action.Action;
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.action.ActionNotFoundException;
-import org.codehaus.plexus.action.Action;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
+import org.codehaus.plexus.taskqueue.TaskQueue;
+import org.codehaus.plexus.taskqueue.TaskQueueException;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -75,12 +83,12 @@
  */
 public class DefaultContinuum
     extends AbstractLogEnabled
-    implements Continuum, Startable
+    implements Continuum, Initializable,Startable
 {
     /**
      * @plexus.requirement
      */
-    private ContinuumCore core;
+    //private ContinuumCore core;
 
     /**
      * @plexus.requirement
@@ -113,6 +121,25 @@
     private BuildSettingsActivator buildSettingsActivator;
 
     // ----------------------------------------------------------------------
+    // Moved from core
+    // ----------------------------------------------------------------------
+
+    /**
+     * @plexus.requirement
+     */
+    private TaskQueue buildQueue;
+
+    /**
+     * @plexus.configuration
+     */
+    private String workingDirectory;
+
+    /**
+     * @plexus.configuration
+     */
+    private String appHome;
+
+    // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
@@ -125,13 +152,27 @@
     public Collection getProjects()
         throws ContinuumException
     {
-        return core.getProjects();
+        try
+        {
+            return store.getAllProjects();
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while getting all projects.", e );
+        }
     }
 
     public ContinuumBuild getLatestBuildForProject( String id )
         throws ContinuumException
     {
-        return core.getLatestBuildForProject( id );
+        try
+        {
+            return store.getLatestBuildForProject( id );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while getting the last build for project '" + id + "'.", e );
+        }
     }
 
     // ----------------------------------------------------------------------
@@ -141,7 +182,28 @@
     public boolean isInBuildingQueue( String id )
         throws ContinuumException
     {
-        return core.isBuilding( id );
+        List queue;
+
+        try
+        {
+            queue = buildQueue.getQueueSnapshot();
+        }
+        catch ( TaskQueueException e )
+        {
+            throw new ContinuumException( "Error while getting the queue snapshot.", e );
+        }
+
+        for ( Iterator it = queue.iterator(); it.hasNext(); )
+        {
+            BuildProjectTask task = (BuildProjectTask) it.next();
+
+            if ( task.getProjectId().equals( id ) )
+            {
+                return true;
+            }
+        }
+
+        return false;
     }
 
     // ----------------------------------------------------------------------
@@ -151,7 +213,14 @@
     public void removeProject( String projectId )
         throws ContinuumException
     {
-        core.removeProject( projectId );
+        try
+        {
+            store.removeProject( projectId );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Error while removing project.", ex );
+        }
     }
 
     public void checkoutProject( String id )
@@ -167,19 +236,40 @@
     public ContinuumProject getProject( String projectId )
         throws ContinuumException
     {
-        return core.getProject( projectId );
+        try
+        {
+            return store.getProject( projectId );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Exception while getting project '" + projectId + "'.", ex );
+        }
     }
 
     public Collection getAllProjects( int start, int end )
         throws ContinuumException
     {
-        return core.getAllProjects( start, end );
+        try
+        {
+            return store.getAllProjects();
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Exception while getting projects.", ex );
+        }
     }
 
     public ScmResult getScmResultForProject( String projectId )
         throws ContinuumException
     {
-        return core.getScmResultForProject( projectId );
+        try
+        {
+            return store.getScmResultForProject( projectId );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Exception while getting check out scm result for project.", ex );
+        }
     }
 
     // ----------------------------------------------------------------------
@@ -229,13 +319,28 @@
     public void buildProject( String projectId )
         throws ContinuumException
     {
-        core.buildProject( projectId, true );
+        buildProject( projectId, true );
     }
 
     public void buildProject( String projectId, boolean force )
         throws ContinuumException
     {
-        core.buildProject( projectId, force );
+        try
+        {
+            ContinuumProject project = store.getProject( projectId );
+
+            getLogger().info( "Enqueuing '" + project.getName() + "'." );
+
+            buildQueue.put( new BuildProjectTask( projectId, force ) );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while creating build object.", e );
+        }
+        catch ( TaskQueueException e )
+        {
+            throw logAndCreateException( "Error while creating enqueuing object.", e );
+        }
     }
 
     public void buildProjectGroup( ContinuumProjectGroup projectGroup, ContinuumBuildSettings buildSettings )
@@ -275,19 +380,40 @@
     public ContinuumBuild getBuild( String buildId )
         throws ContinuumException
     {
-        return core.getBuild( buildId );
+        try
+        {
+            return store.getBuild( buildId );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Unable to retrieve build with id = " + buildId, e );
+        }
     }
 
     public Collection getBuildsForProject( String projectId )
         throws ContinuumException
     {
-        return core.getBuildsForProject( projectId );
+        try
+        {
+            return store.getBuildsForProject( projectId, 0, 0 );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Cannot retrieve builds for project with id = " + projectId, e );
+        }
     }
 
     public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException
     {
-        return core.getChangedFilesForBuild( buildId );
+        try
+        {
+            return store.getChangedFilesForBuild( buildId );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
+        }
     }
 
     // ----------------------------------------------------------------------
@@ -305,7 +431,7 @@
     public AntProject getAntProject( String projectId )
         throws ContinuumException
     {
-        return (AntProject) core.getProject( projectId );
+        return (AntProject) getProject( projectId );
     }
 
     public void updateAntProject( AntProject project )
@@ -337,7 +463,7 @@
     public MavenOneProject getMavenOneProject( String projectId )
         throws ContinuumException
     {
-        return (MavenOneProject) core.getProject( projectId );
+        return (MavenOneProject) getProject( projectId );
     }
 
     public void updateMavenOneProject( MavenOneProject project )
@@ -369,7 +495,7 @@
     public MavenTwoProject getMavenTwoProject( String projectId )
         throws ContinuumException
     {
-        return (MavenTwoProject) core.getProject( projectId );
+        return (MavenTwoProject) getProject( projectId );
     }
 
     public void updateMavenTwoProject( MavenTwoProject project )
@@ -393,7 +519,7 @@
     public ShellProject getShellProject( String projectId )
         throws ContinuumException
     {
-        return (ShellProject) core.getProject( projectId );
+        return (ShellProject) getProject( projectId );
     }
 
     public void updateShellProject( ShellProject project )
@@ -409,7 +535,7 @@
     private void executeUpdateProjectActivity( ContinuumProject project )
         throws ContinuumException
     {
-        core.updateProject( project );
+        updateProject( project );
     }
 
     private String executeAddProjectFromScmActivity( ContinuumProject project )
@@ -421,6 +547,8 @@
         //
         // ----------------------------------------------------------------------
 
+        context.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, getWorkingDirectory() );
+
         context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
 
         executeAction( "validate-project", context );
@@ -443,7 +571,7 @@
 
         context.put( CreateProjectsFromMetadata.KEY_URL, metadataUrl );
 
-        context.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, core.getWorkingDirectory() );
+        context.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, getWorkingDirectory() );
 
         // ----------------------------------------------------------------------
         // Create the projects from the URL
@@ -484,6 +612,8 @@
                 {
                     Map pgContext = new HashMap();
 
+                    pgContext.put( CreateProjectsFromMetadata.KEY_WORKING_DIRECTORY, getWorkingDirectory() );                    
+
                     pgContext.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT_GROUP, projectGroup );
 
                     executeAction( "validate-project-group", pgContext );
@@ -536,7 +666,7 @@
     public ContinuumNotifier getNotifier( String projectId, String notifierType )
         throws ContinuumException
     {
-        ContinuumProject project = core.getProject( projectId );
+        ContinuumProject project = getProject( projectId );
 
         List notifiers = project.getNotifiers();
 
@@ -564,7 +694,7 @@
 
         notifier.setConfiguration( notifierProperties );
 
-        core.storeNotifier( notifier );
+        storeNotifier( notifier );
     }
 
     private Properties createNotifierProperties( Map configuration )
@@ -601,11 +731,11 @@
 
         notifier.setConfiguration( notifierProperties );
 
-        ContinuumProject project = core.getProject( projectId );
+        ContinuumProject project = getProject( projectId );
 
         project.addNotifier( notifier );
 
-        core.updateProject( project );
+        updateProject( project );
     }
 
     public void removeNotifier( String projectId, String notifierType )
@@ -615,7 +745,7 @@
 
         if ( n != null )
         {
-            core.removeNotifier( n );
+            removeNotifier( n );
         }
     }
 
@@ -623,9 +753,52 @@
     // Lifecylce Management
     // ----------------------------------------------------------------------
 
+    public void initialize()
+        throws InitializationException
+    {
+        getLogger().info( "Initializing Continuum." );
+
+        File wdFile = new File( workingDirectory );
+
+        if ( wdFile.exists() )
+        {
+            if ( !wdFile.isDirectory() )
+            {
+                throw new InitializationException( "The specified working directory isn't a directory: " +
+                                                   "'" + wdFile.getAbsolutePath() + "'." );
+            }
+        }
+        else
+        {
+            if ( !wdFile.mkdirs() )
+            {
+                throw new InitializationException( "Could not making the working directory: " +
+                                                   "'" + wdFile.getAbsolutePath() + "'." );
+            }
+        }
+
+        getLogger().info( "Showing all projects: " );
+
+        try
+        {
+            for ( Iterator it = store.getAllProjects().iterator(); it.hasNext(); )
+            {
+                ContinuumProject project = (ContinuumProject) it.next();
+
+                getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getExecutorId() );
+            }
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new InitializationException( "Couldn't load projects.", e );
+        }
+    }
+
     public void start()
         throws StartingException
     {
+        startMessage();
+
         try
         {
             configurationService.load();
@@ -672,6 +845,8 @@
         {
             throw new StoppingException( "Error storing the Continuum configuration.", e );
         }
+
+        stopMessage();
     }
 
     // ----------------------------------------------------------------------
@@ -819,4 +994,108 @@
     // ----------------------------------------------------------------------
     // Build settings
     // ----------------------------------------------------------------------
+
+    // core
+
+    public ContinuumProject updateProject( ContinuumProject project )
+        throws ContinuumException
+    {
+        try
+        {
+            project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
+
+            return store.updateProject( project );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Error while removing project.", ex );
+        }
+    }
+
+    public void removeNotifier( ContinuumNotifier notifier )
+        throws ContinuumException
+    {
+        try
+        {
+            store.removeNotifier( notifier );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Error while removing notifier.", ex );
+        }
+    }
+
+    public ContinuumNotifier storeNotifier( ContinuumNotifier notifier )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.storeNotifier( notifier );
+        }
+        catch ( ContinuumStoreException ex )
+        {
+            throw logAndCreateException( "Error while removing notifier.", ex );
+        }
+    }
+
+    public String getWorkingDirectory()
+    {
+        return workingDirectory;
+    }
+
+    private void startMessage()
+        throws StartingException
+    {
+        getLogger().info( "Starting Continuum." );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        String banner = StringUtils.repeat( "-", getVersion().length() );
+
+        getLogger().info( "" );
+        getLogger().info( "" );
+        getLogger().info( "< Continuum " + getVersion() + " started! >" );
+        getLogger().info( "-----------------------" + banner );
+        getLogger().info( "       \\   ^__^" );
+        getLogger().info( "        \\  (oo)\\_______" );
+        getLogger().info( "           (__)\\       )\\/\\" );
+        getLogger().info( "               ||----w |" );
+        getLogger().info( "               ||     ||" );
+        getLogger().info( "" );
+        getLogger().info( "" );
+    }
+
+    private void stopMessage()
+    {
+        getLogger().info( "Stopping Continuum." );
+
+        getLogger().info( "Continuum stopped." );
+    }
+
+    private String getVersion()
+    {
+        try
+        {
+            Properties properties = new Properties();
+
+            String name = "META-INF/maven/org.apache.maven.continuum/continuum-core/pom.properties";
+
+            InputStream resourceAsStream = getClass().getClassLoader().getResourceAsStream( name );
+
+            if ( resourceAsStream == null )
+            {
+                return "unknown";
+            }
+
+            properties.load( resourceAsStream );
+
+            return properties.getProperty( "version", "unknown" );
+        }
+        catch ( IOException e )
+        {
+            return "unknown";
+        }
+    }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -16,19 +16,10 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.core.ContinuumCore;
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectGroup;
-import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
-import org.apache.maven.continuum.scm.ContinuumScm;
 import org.apache.maven.continuum.scm.ScmResult;
-import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.action.AbstractAction;
-import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
@@ -70,20 +61,6 @@
     public static final String KEY_FORCED = "forced";
 
     // ----------------------------------------------------------------------
-    // Requirements
-    // ----------------------------------------------------------------------
-
-    /**
-     * @plexus.requirement
-     */
-    private ContinuumCore core;
-
-    /**
-     * @plexus.requirement
-     */
-    private ContinuumNotificationDispatcher notificationDispatcher;
-
-    // ----------------------------------------------------------------------
     // Utils
     // ----------------------------------------------------------------------
 
@@ -101,50 +78,6 @@
     //
     // ----------------------------------------------------------------------
 
-    protected ContinuumCore getCore()
-    {
-        return core;
-    }
-
-    protected ContinuumStore getStore()
-    {
-        return core.getStore();
-    }
-
-    protected ContinuumScm getScm()
-    {
-        return core.getScm();
-    }
-
-    protected ContinuumNotificationDispatcher getNotifier()
-    {
-        return notificationDispatcher;
-    }
-
-    protected ContinuumProjectBuilderManager getProjectBuilderManager()
-    {
-        return core.getProjectBuilderManager();
-    }
-
-    protected TaskQueue getBuildQueue()
-    {
-        return core.getBuildQueue();
-    }
-
-    protected TaskQueue getCheckOutQueue()
-    {
-        return core.getCheckOutQueue();
-    }
-
-    protected BuildExecutorManager getBuildExecutorManager()
-    {
-        return core.getBuildExecutorManager();
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
     public static String getProjectId( Map context )
     {
         return getString( context, KEY_PROJECT_ID );
@@ -160,12 +93,6 @@
         return getBoolean( context, KEY_FORCED );
     }
 
-    protected ContinuumProject getProject( Map context )
-        throws ContinuumStoreException
-    {
-        return getStore().getProject( getProjectId( context ) );
-    }
-
     public static ContinuumProject getUnvalidatedProject( Map context )
     {
         return (ContinuumProject) getObject( context, KEY_UNVALIDATED_PROJECT );
@@ -174,12 +101,6 @@
     public static ContinuumProjectGroup getUnvalidatedProjectGroup( Map context )
     {
         return (ContinuumProjectGroup) getObject( context, KEY_UNVALIDATED_PROJECT_GROUP );
-    }
-
-    protected ContinuumBuild getBuild( Map context )
-        throws ContinuumStoreException
-    {
-        return getStore().getBuild( getBuildId( context ) );
     }
 
     public static File getWorkingDirectory( Map context )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractValidationContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractValidationContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractValidationContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractValidationContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -1,40 +1,7 @@
 package org.apache.maven.continuum.core.action;
 
-/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.maven.continuum.core.ContinuumCore;
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumProjectGroup;
-import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
-import org.apache.maven.continuum.scm.ContinuumScm;
-import org.apache.maven.continuum.scm.ScmResult;
-import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.ContinuumException;
-
-import org.codehaus.plexus.action.AbstractAction;
-import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.util.StringUtils;
-
-import java.io.File;
-import java.util.Map;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Sun Jul 24 16:40:08 2005
@@ -18,6 +18,8 @@
 
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.codehaus.plexus.taskqueue.TaskQueue;
 
 import java.io.File;
 import java.util.Map;
@@ -29,13 +31,17 @@
 public class AddProjectToCheckOutQueueAction
     extends AbstractContinuumAction
 {
+    private TaskQueue checkOutQueue;
+
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         CheckOutTask checkOutTask = new CheckOutTask( project.getId(), new File( project.getWorkingDirectory() ) );
 
-        getCheckOutQueue().put( checkOutTask );
+        checkOutQueue.put( checkOutTask );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Sun Jul 24 16:40:08 2005
@@ -17,6 +17,7 @@
  */
 
 import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.io.File;
 import java.util.Map;
@@ -28,10 +29,12 @@
 public class CheckWorkingDirectoryAction
     extends AbstractContinuumAction
 {
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -19,7 +19,9 @@
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.ContinuumScmException;
 import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.scm.ContinuumScm;
 import org.apache.maven.continuum.utils.ContinuumUtils;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.scm.NoSuchScmProviderException;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -33,10 +35,14 @@
 public class CheckoutProjectContinuumAction
     extends AbstractContinuumAction
 {
+    private ContinuumScm scm;
+
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         File workingDirectory = getWorkingDirectory( context );
 
@@ -46,7 +52,7 @@
 
         try
         {
-            ScmResult result = getScm().checkOut( project, workingDirectory );
+            ScmResult result = scm.checkOut( project, workingDirectory );
 
             context.put( KEY_CHECKOUT_SCM_RESULT, result );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java Sun Jul 24 16:40:08 2005
@@ -8,6 +8,7 @@
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManagerException;
+import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -20,6 +21,8 @@
 public class CreateProjectsFromMetadata
     extends AbstractContinuumAction
 {
+    private ContinuumProjectBuilderManager projectBuilderManager;
+
     public static final String KEY_URL = "url";
 
     public static final String KEY_PROJECT_BUILDER_ID = "builderId";
@@ -46,7 +49,7 @@
             throw new ContinuumException( "'" + u + "' is not a valid URL.", e );
         }
 
-        ContinuumProjectBuilder projectBuilder = getProjectBuilderManager().getProjectBuilder( projectBuilderId );
+        ContinuumProjectBuilder projectBuilder = projectBuilderManager.getProjectBuilder( projectBuilderId );
 
         ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( url );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -16,13 +16,16 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
+import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ContinuumUtils;
 
 import java.util.Collection;
@@ -36,6 +39,12 @@
 public class ExecuteBuilderContinuumAction
     extends AbstractContinuumAction
 {
+    private BuildExecutorManager buildExecutorManager;
+
+    private ContinuumStore store;
+
+    private ContinuumNotificationDispatcher notifier;
+
     public void execute( Map context )
         throws Exception
     {
@@ -43,13 +52,13 @@
         // Get parameters from the context
         // ----------------------------------------------------------------------
 
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         boolean forced = isForced( context );
 
         ScmResult scmResult = getUpdateScmResult( context );
 
-        ContinuumBuildExecutor buildExecutor = getCore().getBuildExecutor( project.getExecutorId() );
+        ContinuumBuildExecutor buildExecutor = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
 
         // ----------------------------------------------------------------------
         // This is really a precondition for this action to execute
@@ -78,7 +87,7 @@
 
         build.setScmResult( scmResult );
 
-        String buildId = getStore().addBuild( project.getId(), build ).getId();
+        String buildId = store.addBuild( project.getId(), build ).getId();
 
         context.put( KEY_BUILD_ID, buildId );
 
@@ -86,13 +95,13 @@
         //
         // ----------------------------------------------------------------------
 
-        build = getStore().getBuild( buildId );
+        build = store.getBuild( buildId );
 
         String output = null;
 
         try
         {
-            getNotifier().runningGoals( project, getBuild( context ) );
+            notifier.runningGoals( project, build );
 
             ContinuumBuildExecutionResult result = buildExecutor.build( project );
 
@@ -117,11 +126,11 @@
             // Copy over the build result
             // ----------------------------------------------------------------------
 
-            getStore().setBuildOutput( buildId, output );
+            store.setBuildOutput( buildId, output );
 
-            build = getStore().updateBuild( build );
+            build = store.updateBuild( build );
 
-            getNotifier().goalsCompleted( project, build );
+            notifier.goalsCompleted( project, build );
         }
     }
 
@@ -130,9 +139,9 @@
     // ----------------------------------------------------------------------
 
     private boolean isNew( ContinuumProject project )
-        throws ContinuumException
+        throws ContinuumStoreException
     {
-        Collection builds = getCore().getBuildsForProject( project.getId() );
+        Collection builds = store.getBuildsForProject( project.getId(), 0, 0 );
 
         return builds.size() == 0;
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java Sun Jul 24 16:40:08 2005
@@ -19,6 +19,8 @@
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.ScmResult;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.ContinuumException;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 
 import java.util.Map;
@@ -30,6 +32,8 @@
 public class StoreCheckOutScmResultAction
     extends AbstractContinuumAction
 {
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws TaskExecutionException
     {
@@ -49,7 +53,7 @@
             //
             // ----------------------------------------------------------------------
 
-            ContinuumProject project = getProject( context );
+            ContinuumProject project = store.getProject( getProjectId( context ) );
 
             project.setScmResult( scmResult );
 
@@ -57,7 +61,7 @@
 
             project.setCheckOutErrorException( checkoutErrorException );
 
-            getStore().updateProject( project );
+            store.updateProject( project );
         }
         catch ( ContinuumStoreException e )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java Sun Jul 24 16:40:08 2005
@@ -19,6 +19,7 @@
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
@@ -31,6 +32,8 @@
 public class StoreProjectAction
     extends AbstractContinuumAction
 {
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws ContinuumException, ContinuumStoreException
     {
@@ -40,7 +43,7 @@
         //
         // ----------------------------------------------------------------------
 
-        project = getStore().addProject( project );
+        project = store.addProject( project );
 
         context.put( KEY_PROJECT_ID, project.getId() );
 
@@ -48,7 +51,7 @@
         // Set the working directory
         // ----------------------------------------------------------------------
 
-        File projectWorkingDirectory = new File( getCore().getWorkingDirectory(), project.getId() );
+        File projectWorkingDirectory = new File( getWorkingDirectory( context ), project.getId() );
 
         if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
         {
@@ -63,8 +66,6 @@
 
         project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
 
-        project = getStore().updateProject( project );
-
-        context.put( KEY_UNVALIDATED_PROJECT, project );
+        project = store.updateProject( project );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java Sun Jul 24 16:40:08 2005
@@ -1,24 +1,9 @@
 package org.apache.maven.continuum.core.action;
 
-/*
- * Copyright 2004-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.project.ContinuumProjectGroup;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.io.File;
 import java.util.Map;
@@ -30,6 +15,8 @@
 public class StoreProjectGroupAction
     extends AbstractContinuumAction
 {
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws ContinuumException, ContinuumStoreException
     {
@@ -39,7 +26,7 @@
         //
         // ----------------------------------------------------------------------
 
-        projectGroup = getStore().addProjectGroup( projectGroup );
+        projectGroup = store.addProjectGroup( projectGroup );
 
         context.put( KEY_PROJECT_GROUP_ID, projectGroup.getId() );
 
@@ -47,8 +34,7 @@
         // Set the working directory
         // ----------------------------------------------------------------------
 
-        File projectWorkingDirectory = new File( getCore().getWorkingDirectory(),
-                                                 projectGroup.getId() );
+        File projectWorkingDirectory = new File( getWorkingDirectory( context ), projectGroup.getId() );
 
         if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
         {
@@ -61,7 +47,7 @@
 
         projectGroup.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
 
-        projectGroup = getStore().updateProjectGroup( projectGroup );
+        projectGroup = store.updateProjectGroup( projectGroup );
 
         context.put( KEY_UNVALIDATED_PROJECT_GROUP, projectGroup );
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -19,8 +19,10 @@
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.io.File;
 import java.util.Map;
@@ -32,10 +34,14 @@
 public class UpdateProjectFromWorkingDirectoryContinuumAction
     extends AbstractContinuumAction
 {
+    private BuildExecutorManager buildExecutorManager;
+
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws ContinuumStoreException, ContinuumException, ContinuumBuildExecutorException
     {
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         getLogger().info( "Updating project '" + project.getName() + "' from checkout." );
 
@@ -43,7 +49,7 @@
         // Make a new descriptor
         // ----------------------------------------------------------------------
 
-        ContinuumBuildExecutor builder = getBuildExecutorManager().getBuildExecutor( project.getExecutorId() );
+        ContinuumBuildExecutor builder = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
 
         builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
 
@@ -51,6 +57,6 @@
         // Store the new descriptor
         // ----------------------------------------------------------------------
 
-        getStore().updateProject( project );
+        store.updateProject( project );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java Sun Jul 24 16:40:08 2005
@@ -18,6 +18,9 @@
 
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.ScmResult;
+import org.apache.maven.continuum.scm.ContinuumScm;
+import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
+import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.util.Map;
 
@@ -28,24 +31,30 @@
 public class UpdateWorkingDirectoryFromScmContinuumAction
     extends AbstractContinuumAction
 {
+    private ContinuumNotificationDispatcher notifier;
+
+    private ContinuumScm scm;
+
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = getProject( context );
+        ContinuumProject project = store.getProject( getProjectId( context ) );
 
         ScmResult scmResult = null;
 
         try
         {
-            getNotifier().checkoutStarted( project );
+            notifier.checkoutStarted( project );
 
-            scmResult = getScm().updateProject( project );
+            scmResult = scm.updateProject( project );
 
             context.put( KEY_UPDATE_SCM_RESULT, scmResult );
         }
         finally
         {
-            getNotifier().checkoutComplete( project );
+            notifier.checkoutComplete( project );
         }
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java Sun Jul 24 16:40:08 2005
@@ -17,6 +17,8 @@
  */
 
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -29,6 +31,10 @@
 public class ValidateProject
     extends AbstractValidationContinuumAction
 {
+    private BuildExecutorManager buildExecutorManager;
+
+    private ContinuumStore store;
+
     public void execute( Map context )
         throws Exception
     {
@@ -39,12 +45,12 @@
         // stuff out
         // ----------------------------------------------------------------------
 
-        if ( !getBuildExecutorManager().hasBuildExecutor( project.getExecutorId() ) )
+        if ( !buildExecutorManager.hasBuildExecutor( project.getExecutorId() ) )
         {
             throw new ContinuumException( "No such executor with id '" + project.getExecutorId() + "'." );
         }
 
-        if ( getStore().getProjectByName( project.getName() ) != null )
+        if ( store.getProjectByName( project.getName() ) != null )
         {
             throw new ContinuumException( "A project with the name '" + project.getName() + "' already exist." );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProjectGroup.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProjectGroup.java?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProjectGroup.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProjectGroup.java Sun Jul 24 16:40:08 2005
@@ -1,20 +1,7 @@
-package org.apache.maven.continuum.core.action;
-
 /*
- * Copyright 2004-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2005 Your Corporation. All Rights Reserved.
  */
+package org.apache.maven.continuum.core.action;
 
 import org.apache.maven.continuum.project.ContinuumProjectGroup;
 

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=224676&r1=224675&r2=224676&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Sun Jul 24 16:40:08 2005
@@ -1,30 +1,32 @@
 <component-set>
   <components>
     <component>
-      <role>org.apache.maven.continuum.core.ContinuumCore</role>
-      <implementation>org.apache.maven.continuum.core.DefaultContinuumCore</implementation>
+      <role>org.apache.maven.continuum.Continuum</role>
+      <implementation>org.apache.maven.continuum.DefaultContinuum</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
+          <role>org.codehaus.plexus.action.ActionManager</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager</role>
+          <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
         </requirement>
         <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>build-project</role-hint>
-          <field-name>buildQueue</field-name>
+          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
         </requirement>
         <requirement>
-          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
-          <role-hint>check-out-project</role-hint>
-          <field-name>checkOutQueue</field-name>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+          <role>org.apache.maven.continuum.initialization.ContinuumInitializer</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.scm.ContinuumScm</role>
+          <role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
+        </requirement>
+        <!-- from core -->
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>build-project</role-hint>
+          <field-name>buildQueue</field-name>
         </requirement>
       </requirements>
       <configuration>
@@ -66,34 +68,6 @@
     </component>
 
     <component>
-      <role>org.apache.maven.continuum.Continuum</role>
-      <implementation>org.apache.maven.continuum.DefaultContinuum</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.action.ActionManager</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.scheduler.ContinuumScheduler</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.store.ContinuumStore</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.initialization.ContinuumInitializer</role>
-        </requirement>
-        <requirement>
-          <role>org.apache.maven.continuum.build.settings.BuildSettingsActivator</role>
-        </requirement>
-      </requirements>
-    </component>
-
-    <component>
       <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
       <implementation>org.apache.maven.continuum.execution.manager.DefaultBuildExecutorManager</implementation>
       <requirements>
@@ -106,7 +80,8 @@
 
     <component>
       <role>org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager</role>
-      <implementation>org.apache.maven.continuum.project.builder.manager.DefaultContinuumProjectBuilderManager</implementation>
+      <implementation>
+        org.apache.maven.continuum.project.builder.manager.DefaultContinuumProjectBuilderManager</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.project.builder.ContinuumProjectBuilder</role>
@@ -416,7 +391,8 @@
     <component>
       <role>org.codehaus.plexus.taskqueue.TaskViabilityEvaluator</role>
       <role-hint>build-project</role-hint>
-      <implementation>org.apache.maven.continuum.buildqueue.evaluator.BuildProjectTaskViabilityEvaluator</implementation>
+      <implementation>
+        org.apache.maven.continuum.buildqueue.evaluator.BuildProjectTaskViabilityEvaluator</implementation>
       <configuration>
         <required-buildInterval>1000</required-buildInterval>
       </configuration>
@@ -596,37 +572,45 @@
       <implementation>org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>check-out-project</role-hint>
+          <field-name>checkOutQueue</field-name>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
-      <role-hint>create-projects-from-metadata</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.CreateProjectsFromMetadata</implementation>
+      <role-hint>checkout-project</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.CheckoutProjectContinuumAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.scm.ContinuumScm</role>
         </requirement>
       </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
-      <role-hint>checkout-project</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.CheckoutProjectContinuumAction</implementation>
+      <role-hint>check-working-directory</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.CheckWorkingDirectoryAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
-      <role-hint>store-checkout-scm-result</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.StoreCheckOutScmResultAction</implementation>
+      <role-hint>create-projects-from-metadata</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.CreateProjectsFromMetadata</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager</role>
         </requirement>
       </requirements>
     </component>
@@ -636,11 +620,24 @@
       <implementation>org.apache.maven.continuum.core.action.ExecuteBuilderContinuumAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
         </requirement>
         <requirement>
           <role>org.apache.maven.continuum.notification.ContinuumNotificationDispatcher</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.action.Action</role>
+      <role-hint>store-checkout-scm-result</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.StoreCheckOutScmResultAction</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
       </requirements>
     </component>
     <component>
@@ -649,7 +646,7 @@
       <implementation>org.apache.maven.continuum.core.action.StoreProjectAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
@@ -659,17 +656,21 @@
       <implementation>org.apache.maven.continuum.core.action.StoreProjectGroupAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
+
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>validate-project</role-hint>
       <implementation>org.apache.maven.continuum.core.action.ValidateProject</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
         </requirement>
       </requirements>
     </component>
@@ -677,42 +678,48 @@
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>validate-project-group</role-hint>
       <implementation>org.apache.maven.continuum.core.action.ValidateProjectGroup</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
-        </requirement>
-      </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-working-directory-from-scm</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.UpdateWorkingDirectoryFromScmContinuumAction</implementation>
+      <implementation>
+        org.apache.maven.continuum.core.action.UpdateWorkingDirectoryFromScmContinuumAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.notification.ContinuumNotificationDispatcher</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.continuum.notification.ContinuumNotificationDispatcher</role>
+          <role>org.apache.maven.continuum.scm.ContinuumScm</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-project-from-working-directory</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
+      <implementation>
+        org.apache.maven.continuum.core.action.UpdateProjectFromWorkingDirectoryContinuumAction</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
-      <role-hint>check-working-directory</role-hint>
-      <implementation>org.apache.maven.continuum.core.action.CheckWorkingDirectoryAction</implementation>
+      <role-hint>validate-project</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.ValidateProject</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+          <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>



Mime
View raw message