continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r170048 - /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket /maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc /maven/continuum/trunk/continuum-xmlrpc/src/main/resources/META-INF/plexus
Date Fri, 13 May 2005 16:11:17 GMT
Author: trygvis
Date: Fri May 13 09:11:16 2005
New Revision: 170048

URL: http://svn.apache.org/viewcvs?rev=170048&view=rev
Log:
o Splitting out generic core stuff from from Continuum into ContinuumCore.

Added:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
      - copied, changed from r170005, 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/core/DefaultContinuumCore.java
      - copied, changed from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.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/registration/AbstractContinuumRegistrar.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket/UrlSocketRegistrar.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelper.java
    maven/continuum/trunk/continuum-xmlrpc/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=170048&r1=170047&r2=170048&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 Fri May 13 09:11:16 2005
@@ -16,9 +16,7 @@
  * limitations under the License.
  */
 
-import java.net.URL;
 import java.util.Collection;
-import java.util.List;
 import java.util.Properties;
 
 import org.apache.maven.continuum.project.AntProject;
@@ -29,7 +27,6 @@
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 
 /**
  * This is the main entry point for Continuum. Projects are added to Continuum
@@ -48,20 +45,6 @@
 
     //TODO: an URL converter in OGNL would be nice.
 
-    List addProjectsFromUrl( String url, String projectBuilderId )
-        throws ContinuumException;
-
-    List addProjectsFromUrl( URL url, String projectBuilderId )
-        throws ContinuumException;
-
-    String addProjectFromScm( String scmUrl,
-                              String executorId,
-                              String projectName,
-                              String nagEmailAddress,
-                              String version,
-                              Properties configuration )
-        throws ContinuumException;
-
     void removeProject( String projectId )
         throws ContinuumException;
 
@@ -88,10 +71,10 @@
     // ----------------------------------------------------------------------
 
     Collection getProjects()
-        throws ContinuumStoreException;
+        throws ContinuumException;
 
     ContinuumBuild getLatestBuildForProject( String id )
-        throws ContinuumStoreException;
+        throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Build information
@@ -106,7 +89,7 @@
     ContinuumBuildResult getBuildResultForBuild( String buildId )
         throws ContinuumException;
 
-    public List getChangedFilesForBuild( String buildId )
+    Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------

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=170048&r1=170047&r2=170048&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 Fri May 13 09:11:16 2005
@@ -16,23 +16,11 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Properties;
 
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
+import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
@@ -43,26 +31,9 @@
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
-import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
-import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
-import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
-import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManagerException;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
-import org.apache.maven.continuum.scm.ContinuumScm;
-import org.apache.maven.continuum.scm.ContinuumScmException;
-import org.apache.maven.continuum.scm.queue.CheckOutTask;
-import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
-import org.codehaus.plexus.taskqueue.TaskQueue;
-import org.codehaus.plexus.taskqueue.TaskQueueException;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
-import org.codehaus.plexus.util.StringUtils;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -71,330 +42,71 @@
  */
 public class DefaultContinuum
     extends AbstractLogEnabled
-    implements Continuum, Initializable, Startable
+    implements Continuum
 {
-    private final static String DATABASE_INITIALIZED = "database.initialized";
-
-    private final static String CONTINUUM_VERSION = "1.0-alpha-2-SNAPSHOT";
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    // TODO: look up these requiremetns in start() to have better control of the
-    //       application initialization sequence. The application should make sure
-    //       that the database is properly initialized before starting the store.
-
-    /** @requirement */
-    private BuildExecutorManager buildExecutorManager;
-
-    /** @requirement */
-    private ContinuumProjectBuilderManager projectBuilderManager;
-
-    /** @requirement */
-    private TaskQueue buildQueue;
-
-    /** @requirement */
-    private TaskQueue checkOutQueue;
-
-    /** @requirement */
-    private ContinuumStore store;
-
-    /** @requirement */
-    private ContinuumScm scm;
-
     /** @requirement */
-    private String appHome;
-
-    /** @configuration */
-    private String workingDirectory;
+    private ContinuumCore core;
 
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
     public Collection getProjects()
-        throws ContinuumStoreException
+        throws ContinuumException
     {
-        return store.getAllProjects();
+        return core.getProjects();
     }
 
     public ContinuumBuild getLatestBuildForProject( String id )
-        throws ContinuumStoreException
+        throws ContinuumException
     {
-        return store.getLatestBuildForProject( id );
+        return core.getLatestBuildForProject( id );
     }
 
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    // ----------------------------------------------------------------------
-    // Here it would probably be possible to tell from looking at the meta
-    // data what type of project handler would be required. We could
-    // definitely tell if we were looking at a Maven POM, So for the various
-    // POM versions we would know what builder to use, and for an arbitrary
-    // ----------------------------------------------------------------------
-
-    // add project meta data
-    // create continuum project from project metadata
-    // add continuum project to the store
-    // setup the project
-    // -> check out from scm
-    // -> update the project metadata
-
-    public List addProjectsFromUrl( String url, String executorId )
-        throws ContinuumException
-    {
-        URL u;
-
-        try
-        {
-            u = new URL( url );
-        }
-        catch ( MalformedURLException e )
-        {
-            throw new ContinuumException( "Invalid URL.", e );
-        }
-
-        return addProjectsFromUrl( u, executorId );
-    }
-
-    public List addProjectsFromUrl( URL url, String executorId )
-        throws ContinuumException
-    {
-        File pomFile;
-
-        try
-        {
-            String pom = IOUtil.toString( url.openStream() );
-
-            pomFile = File.createTempFile( "continuum-", "-pom-download" );
-
-            pomFile.deleteOnExit();
-
-            FileUtils.fileWrite( pomFile.getAbsolutePath(), pom );
-        }
-        catch ( IOException ex )
-        {
-            throw new ContinuumException( "Error while downloading the pom.", ex );
-        }
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        ContinuumProjectBuilder projectBuilder = getProjectBuilder( executorId );
-
-        ContinuumProjectBuildingResult result;
-
-        try
-        {
-            result = projectBuilder.createProjectsFromMetadata( url );
-        }
-        catch ( ContinuumProjectBuilderException e )
-        {
-            throw new ContinuumException( "Error while creating projects from URL.", e );
-        }
-
-        // TODO: Update from metadata in the initial checkout?
-
-        List ids = new ArrayList( result.getProjects().size() );
-
-        for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
-        {
-            ContinuumProject project = ( ContinuumProject ) it.next();
-
-            project = addProjectAndCheckOutSources( project, project.getExecutorId() );
-
-            ids.add( project.getId() );
-        }
-
-        return ids;
-    }
-
-    public String addProjectFromScm( String scmUrl,
-                                     String executorId,
-                                     String projectName,
-                                     String nagEmailAddress,
-                                     String version,
-                                     Properties configuration )
-        throws ContinuumException
-    {
-        // ----------------------------------------------------------------------
-        // Create the stub project
-        // ----------------------------------------------------------------------
-
-        ContinuumProject project = new ContinuumProject();
-
-        project.setScmUrl( scmUrl );
-
-        project.setExecutorId( executorId );
-
-        project.setName( projectName );
-
-        project.setNagEmailAddress( nagEmailAddress );
-
-        project.setVersion( version );
-
-        project.setConfiguration( configuration );
-
-        // ----------------------------------------------------------------------
-        // Make sure that the builder id is correct before starting to check
-        // stuff out
-        // ----------------------------------------------------------------------
-
-        if ( !buildExecutorManager.hasBuilder( executorId ) )
-        {
-            throw new ContinuumException( "No such executor with id '" + executorId + "'." );
-        }
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        doTempCheckOut( project );
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        project = addProjectAndCheckOutSources( project, executorId );
-
-        updateProjectFromCheckOut( project );
-
-        return project.getId();
-    }
-
     public void updateProjectFromScm( String projectId )
         throws ContinuumException
     {
-        ContinuumProject project;
-
-        try
-        {
-            project = store.getProject( projectId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while updating project from SCM.", ex );
-        }
-
-        File workingDirectory = new File( project.getWorkingDirectory() );
-
-        if ( !workingDirectory.exists() )
-        {
-            getLogger().warn( "Creating missing working directory for project '" + project.getName() + "'." );
-
-            if ( !workingDirectory.exists() )
-            {
-                throw new ContinuumException( "Could not make missing working directory for " +
-                                              "project '" + project.getName() + "'." );
-            }
-        }
-
-        // ----------------------------------------------------------------------
-        // Update the source code
-        // ----------------------------------------------------------------------
-
-        try
-        {
-            scm.updateProject( project );
-        }
-        catch ( ContinuumScmException e )
-        {
-            throw new ContinuumException( "Error while updating project.", e );
-        }
-
-        updateProjectFromCheckOut( project );
+        core.updateProjectFromScm( projectId );
     }
 
     public void updateProjectConfiguration( String projectId, Properties configuration )
         throws ContinuumException
     {
-        try
-        {
-            store.updateProjectConfiguration( projectId, configuration );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Error while updating project configuration.", ex );
-        }
+        core.updateProjectConfiguration( projectId, configuration );
     }
 
     public void removeProject( String projectId )
         throws ContinuumException
     {
-        try
-        {
-            store.removeProject( projectId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            logAndCreateException( "Error while removing project.", ex );
-        }
+        core.removeProject( projectId );
     }
 
     public ContinuumProject getProject( String projectId )
         throws ContinuumException
     {
-        try
-        {
-            ContinuumProject project = store.getProject( projectId );
-
-            return project;
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting all projects.", ex );
-        }
+        return core.getProject( projectId );
     }
 
     public Collection getAllProjects( int start, int end )
         throws ContinuumException
     {
-        try
-        {
-            return store.getAllProjects();
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting all projects.", ex );
-        }
+        return core.getAllProjects( start, end );
     }
 
     public CheckOutScmResult getCheckOutScmResultForProject( String projectId )
         throws ContinuumException
     {
-        try
-        {
-            return store.getCheckOutScmResultForProject( projectId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting check out scm result for project.", ex );
-        }
+        return core.getCheckOutScmResultForProject( projectId );
     }
 
     public void buildProject( String projectId, boolean force )
         throws ContinuumException
     {
-        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 );
-        }
+        core.buildProject( projectId, force );
     }
 
     // ----------------------------------------------------------------------
@@ -404,53 +116,25 @@
     public ContinuumBuild getBuild( String buildId )
         throws ContinuumException
     {
-        try
-        {
-            return store.getBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Unable to retrieve build with id = " + buildId, e );
-        }
+        return core.getBuild( buildId );
     }
 
     public Collection getBuildsForProject( String projectId )
         throws ContinuumException
     {
-        try
-        {
-            return store.getBuildsForProject( projectId, 0, 0 );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve builds for project with id = " + projectId, e );
-        }
+        return core.getBuildsForProject( projectId );
     }
 
     public ContinuumBuildResult getBuildResultForBuild( String buildId )
         throws ContinuumException
     {
-        try
-        {
-            return store.getBuildResultForBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
-        }
+        return core.getBuildResultForBuild( buildId );
     }
 
-    public List getChangedFilesForBuild( String buildId )
+    public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException
     {
-        try
-        {
-            return store.getChangedFilesForBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
-        }
+        return core.getChangedFilesForBuild( buildId );
     }
 
     // ----------------------------------------------------------------------
@@ -466,12 +150,12 @@
 
         configuration.setProperty( AntBuildExecutor.CONFIGURATION_TARGETS, project.getTargets() );
 
-        addProjectFromScm( project.getScmUrl(),
-                           AntBuildExecutor.ID,
-                           project.getName(),
-                           project.getNagEmailAddress(),
-                           project.getVersion(),
-                           configuration );
+        core.addProjectFromScm( project.getScmUrl(),
+                                AntBuildExecutor.ID,
+                                project.getName(),
+                                project.getNagEmailAddress(),
+                                project.getVersion(),
+                                configuration );
     }
 
     public AntProject getAntProject( String id )
@@ -517,12 +201,12 @@
 
         configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
 
-        addProjectFromScm( project.getScmUrl(),
-                           MavenOneBuildExecutor.ID,
-                           project.getName(),
-                           project.getNagEmailAddress(),
-                           project.getVersion(),
-                           configuration );
+        core.addProjectFromScm( project.getScmUrl(),
+                                MavenOneBuildExecutor.ID,
+                                project.getName(),
+                                project.getNagEmailAddress(),
+                                project.getVersion(),
+                                configuration );
     }
 
     public MavenOneProject getMavenOneProject( String id )
@@ -558,12 +242,12 @@
 
         configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, project.getGoals() );
 
-        addProjectFromScm( project.getScmUrl(),
-                           MavenTwoBuildExecutor.ID,
-                           project.getName(),
-                           project.getNagEmailAddress(),
-                           project.getVersion(),
-                           configuration );
+        core.addProjectFromScm( project.getScmUrl(),
+                                MavenTwoBuildExecutor.ID,
+                                project.getName(),
+                                project.getNagEmailAddress(),
+                                project.getVersion(),
+                                configuration );
     }
 
     public MavenTwoProject getMavenTwoProject( String id )
@@ -604,12 +288,12 @@
             configuration.setProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS, project.getArguments() );
         }
 
-        addProjectFromScm( project.getScmUrl(),
-                           ShellBuildExecutor.ID,
-                           project.getName(),
-                           project.getNagEmailAddress(),
-                           project.getVersion(),
-                           configuration );
+        core.addProjectFromScm( project.getScmUrl(),
+                                ShellBuildExecutor.ID,
+                                project.getName(),
+                                project.getNagEmailAddress(),
+                                project.getVersion(),
+                                configuration );
     }
 
     public ShellProject getShellProject( String id )
@@ -645,21 +329,18 @@
         updateProjectConfiguration( project.getId(), configuration );
     }
 
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     private void updateProject( ContinuumProject project )
         throws ContinuumException
     {
-        try
-        {
-            store.updateProject( project.getId(),
-                                 project.getName(),
-                                 project.getScmUrl(),
-                                 project.getNagEmailAddress(),
-                                 project.getVersion() );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while updating the project.", e );
-        }
+        core.updateProject( project.getId(),
+                            project.getName(),
+                            project.getScmUrl(),
+                            project.getNagEmailAddress(),
+                            project.getVersion() );
     }
 
     private void copyProject( ContinuumProject p1, ContinuumProject p2 )
@@ -675,281 +356,5 @@
         p2.setVersion( p1.getVersion() );
 
         p2.setExecutorId( p1.getExecutorId() );
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    private ContinuumProjectBuilder getProjectBuilder( String projectBuilderId )
-        throws ContinuumException
-    {
-        try
-        {
-            return projectBuilderManager.getProjectCreator( projectBuilderId );
-        }
-        catch ( ContinuumProjectBuilderManagerException e )
-        {
-            throw new ContinuumException( "Error while getting project builder '" + projectBuilderId + "'.", e );
-        }
-    }
-
-    private ContinuumProject addProjectAndCheckOutSources( ContinuumProject project, String executorId )
-        throws ContinuumException
-    {
-        String projectId;
-
-        File projectWorkingDirectory;
-
-        try
-        {
-            // ----------------------------------------------------------------------
-            // Store the project
-            // ----------------------------------------------------------------------
-
-            projectId = store.addProject( project.getName(),
-                                          project.getScmUrl(),
-                                          project.getNagEmailAddress(),
-                                          project.getVersion(),
-                                          executorId,
-                                          null,
-                                          project.getConfiguration() );
-
-            // ----------------------------------------------------------------------
-            // Set the working directory
-            // ----------------------------------------------------------------------
-
-            projectWorkingDirectory = new File( workingDirectory, projectId );
-
-            if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
-            {
-                throw new ContinuumException( "Could not make the working directory for the project " +
-                                              "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
-            }
-
-            project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
-
-            // ----------------------------------------------------------------------
-            // Check out the project
-            // ----------------------------------------------------------------------
-
-            store.setWorkingDirectory( projectId, projectWorkingDirectory.getAbsolutePath() );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while adding project.", ex );
-        }
-
-        try
-        {
-            CheckOutTask checkOutTask = new CheckOutTask( projectId, projectWorkingDirectory );
-
-            checkOutQueue.put( checkOutTask );
-        }
-        catch ( TaskQueueException e )
-        {
-            throw logAndCreateException( "Exception while adding the project to the check out queue.", e );
-        }
-
-        return getProject( projectId );
-    }
-
-    private void doTempCheckOut( ContinuumProject project )
-        throws ContinuumException
-    {
-        File checkoutDirectory = new File( workingDirectory, "temp-project" );
-
-        if ( checkoutDirectory.exists() )
-        {
-            try
-            {
-                FileUtils.cleanDirectory( checkoutDirectory );
-            }
-            catch ( IOException ex )
-            {
-                throw logAndCreateException( "Error while cleaning out " + checkoutDirectory.getAbsolutePath() );
-            }
-        }
-        else
-        {
-            if ( !checkoutDirectory.mkdirs() )
-            {
-                throw logAndCreateException( "Could not make the check out directory " +
-                                             "'" + checkoutDirectory.getAbsolutePath() + "'." );
-            }
-        }
-
-        // TODO: Get the list of files to check out from the builder.
-        // Maven 2: pom.xml, Maven 1: project.xml, Ant: all? build.xml?
-
-        try
-        {
-            scm.checkOut( project, checkoutDirectory );
-        }
-        catch ( ContinuumScmException e )
-        {
-            throw logAndCreateException( "Error while checking out the project.", e );
-        }
-    }
-
-    private void updateProjectFromCheckOut( ContinuumProject project )
-        throws ContinuumException
-    {
-        getLogger().info( "Updating project '" + project.getName() + "'.");
-
-        // ----------------------------------------------------------------------
-        // Make a new descriptor
-        // ----------------------------------------------------------------------
-
-        ContinuumBuildExecutor builder = buildExecutorManager.getBuilder( project.getExecutorId() );
-
-        try
-        {
-            builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
-        }
-        catch ( ContinuumBuildExecutorException e )
-        {
-            throw new ContinuumException( "Error while updating project from check out.", e);
-        }
-
-        // ----------------------------------------------------------------------
-        // Store the new descriptor
-        // ----------------------------------------------------------------------
-
-        try
-        {
-            String id = project.getId();
-
-            store.updateProject( id,
-                                 project.getName(),
-                                 project.getScmUrl(),
-                                 project.getNagEmailAddress(),
-                                 project.getVersion() );
-
-            store.updateProjectConfiguration( id, project.getConfiguration() );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while storing the updated project.", e );
-        }
-    }
-
-    // ----------------------------------------------------------------------
-    // Lifecylce Management
-    // ----------------------------------------------------------------------
-
-    public void initialize()
-        throws Exception
-    {
-        getLogger().info( "Initializing Continuum." );
-
-        File wdFile = new File( workingDirectory );
-
-        if ( wdFile.exists() )
-        {
-            if ( !wdFile.isDirectory() )
-            {
-                throw logAndCreateException( "The specified working directory isn't a directory: " +
-                                             "'" + wdFile.getAbsolutePath() + "'." );
-            }
-        }
-        else
-        {
-            if ( !wdFile.mkdirs() )
-            {
-                throw logAndCreateException( "Could not making the working directory: " +
-                                             "'" + wdFile.getAbsolutePath() + "'." );
-            }
-        }
-
-        getLogger().info( "Showing all projects: " );
-
-        for ( Iterator it = store.getAllProjects().iterator(); it.hasNext(); )
-        {
-            ContinuumProject project = (ContinuumProject) it.next();
-
-            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getExecutorId() );
-        }
-    }
-
-    public void start()
-        throws Exception
-    {
-        getLogger().info( "Starting Continuum." );
-
-        // check to see if the tables exists or not.
-        File file = new File( appHome, "continuum.properties" );
-
-        Properties properties = new Properties();
-
-        if ( !file.exists() )
-        {
-            initializeStore( file );
-        }
-        else
-        {
-            properties.load( new FileInputStream( file ) );
-
-            String state = properties.getProperty( DATABASE_INITIALIZED );
-
-            if ( !state.equals( "true" ) )
-            {
-                initializeStore( file );
-            }
-        }
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        String banner = StringUtils.repeat( "-", CONTINUUM_VERSION.length() );
-
-        getLogger().info( "" );
-        getLogger().info( "" );
-        getLogger().info( "< Continuum " + CONTINUUM_VERSION + " started! >" );
-        getLogger().info( "-----------------------" + banner );
-        getLogger().info( "       \\   ^__^" );
-        getLogger().info( "        \\  (oo)\\_______" );
-        getLogger().info( "           (__)\\       )\\/\\" );
-        getLogger().info( "               ||----w |" );
-        getLogger().info( "               ||     ||" );
-        getLogger().info( "" );
-        getLogger().info( "" );
-    }
-
-    public void stop()
-        throws Exception
-    {
-        getLogger().info( "Stopping Continuum." );
-
-        getLogger().info( "Continuum stopped." );
-    }
-
-    private void initializeStore( File file )
-        throws Exception
-    {
-        Properties properties = new Properties();
-
-        getLogger().warn( "This system isn't configured. Configuring." );
-
-        store.createDatabase();
-
-        properties.setProperty( DATABASE_INITIALIZED, "true" );
-
-        properties.store( new FileOutputStream( file ), null );
-    }
-
-    private ContinuumException logAndCreateException( String message )
-    {
-        getLogger().error( message );
-
-        return new ContinuumException( message );
-    }
-
-    private ContinuumException logAndCreateException( String message, Throwable cause )
-    {
-        getLogger().error( message, cause );
-
-        return new ContinuumException( message, cause );
     }
 }

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java (from r170005, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java&p1=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java&r1=170005&r2=170048&rev=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java Fri May 13 09:11:16 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum;
+package org.apache.maven.continuum.core;
 
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
@@ -18,40 +18,24 @@
 
 import java.net.URL;
 import java.util.Collection;
-import java.util.List;
 import java.util.Properties;
 
-import org.apache.maven.continuum.project.AntProject;
+import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.MavenOneProject;
-import org.apache.maven.continuum.project.MavenTwoProject;
-import org.apache.maven.continuum.project.ShellProject;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 
-/**
- * This is the main entry point for Continuum. Projects are added to Continuum
- * by providing an URL to the metadata for project. The metadata for a project
- * must contain the following information:
- * <p/>
- * o project name
- * o project id
- * o SCM information
- * o email notification list
- * o project developers
- */
-public interface Continuum
+public interface ContinuumCore
 {
-    String ROLE = Continuum.class.getName();
+    String ROLE = ContinuumCore.class.getName();
 
     //TODO: an URL converter in OGNL would be nice.
 
-    List addProjectsFromUrl( String url, String projectBuilderId )
+    Collection addProjectsFromUrl( String url, String projectBuilderId )
         throws ContinuumException;
 
-    List addProjectsFromUrl( URL url, String projectBuilderId )
+    Collection addProjectsFromUrl( URL url, String projectBuilderId )
         throws ContinuumException;
 
     String addProjectFromScm( String scmUrl,
@@ -68,6 +52,13 @@
     void updateProjectFromScm( String projectId )
         throws ContinuumException;
 
+    void updateProject( String projectId,
+                        String name,
+                        String scmUrl,
+                        String nagEmailAddress,
+                        String version )
+        throws ContinuumException;
+
     void updateProjectConfiguration( String projectId, Properties configuration )
         throws ContinuumException;
 
@@ -88,10 +79,10 @@
     // ----------------------------------------------------------------------
 
     Collection getProjects()
-        throws ContinuumStoreException;
+        throws ContinuumException;
 
     ContinuumBuild getLatestBuildForProject( String id )
-        throws ContinuumStoreException;
+        throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Build information
@@ -106,52 +97,6 @@
     ContinuumBuildResult getBuildResultForBuild( String buildId )
         throws ContinuumException;
 
-    public List getChangedFilesForBuild( String buildId )
-        throws ContinuumException;
-
-    // ----------------------------------------------------------------------
-    // Different project types
-    // ----------------------------------------------------------------------
-
-    void addAntProject( AntProject project )
-        throws ContinuumException;
-
-    AntProject getAntProject( String id )
-        throws ContinuumException;
-
-    void updateAntProject( AntProject project )
-        throws ContinuumException;
-
-    // Maven 1
-
-    void addMavenOneProject( MavenOneProject project )
-        throws ContinuumException;
-
-    MavenOneProject getMavenOneProject( String id )
-        throws ContinuumException;
-
-    void updateMavenOneProject( MavenOneProject project )
-        throws ContinuumException;
-
-    // Maven 2
-
-    void addMavenTwoProject( MavenTwoProject project )
-        throws ContinuumException;
-
-    MavenTwoProject getMavenTwoProject( String id )
-        throws ContinuumException;
-
-    void updateMavenTwoProject( MavenTwoProject project )
-        throws ContinuumException;
-
-    // Shell
-
-    void addShellProject( ShellProject project )
-        throws ContinuumException;
-
-    ShellProject getShellProject( String id )
-        throws ContinuumException;
-
-    void updateShellProject( ShellProject project )
+    Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;
 }

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java (from r169796, 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/core/DefaultContinuumCore.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java&r1=169796&r2=170048&rev=170048&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/core/DefaultContinuumCore.java Fri May 13 09:11:16 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum;
+package org.apache.maven.continuum.core;
 
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
@@ -28,6 +28,7 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
@@ -69,9 +70,9 @@
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l </a>
  * @version $Id: DefaultContinuum.java,v 1.7 2005/04/08 12:47:56 trygvis Exp $
  */
-public class DefaultContinuum
+public class DefaultContinuumCore
     extends AbstractLogEnabled
-    implements Continuum, Initializable, Startable
+    implements ContinuumCore, Initializable, Startable
 {
     private final static String DATABASE_INITIALIZED = "database.initialized";
 
@@ -114,15 +115,29 @@
     // ----------------------------------------------------------------------
 
     public Collection getProjects()
-        throws ContinuumStoreException
+        throws ContinuumException
     {
-        return store.getAllProjects();
+        try
+        {
+            return store.getAllProjects();
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while getting all projects.", e );
+        }
     }
 
     public ContinuumBuild getLatestBuildForProject( String id )
-        throws ContinuumStoreException
+        throws ContinuumException
     {
-        return store.getLatestBuildForProject( id );
+        try
+        {
+            return store.getLatestBuildForProject( id );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while getting the last build for project '" + id + "'.", e );
+        }
     }
 
     // ----------------------------------------------------------------------
@@ -143,7 +158,7 @@
     // -> check out from scm
     // -> update the project metadata
 
-    public List addProjectsFromUrl( String url, String executorId )
+    public Collection addProjectsFromUrl( String url, String executorId )
         throws ContinuumException
     {
         URL u;
@@ -154,13 +169,13 @@
         }
         catch ( MalformedURLException e )
         {
-            throw new ContinuumException( "Invalid URL.", e );
+            throw logAndCreateException( "Invalid URL.", e );
         }
 
         return addProjectsFromUrl( u, executorId );
     }
 
-    public List addProjectsFromUrl( URL url, String executorId )
+    public Collection addProjectsFromUrl( URL url, String executorId )
         throws ContinuumException
     {
         File pomFile;
@@ -177,7 +192,7 @@
         }
         catch ( IOException ex )
         {
-            throw new ContinuumException( "Error while downloading the pom.", ex );
+            logAndCreateException( "Error while downloading the pom.", ex );
         }
 
         // ----------------------------------------------------------------------
@@ -194,7 +209,7 @@
         }
         catch ( ContinuumProjectBuilderException e )
         {
-            throw new ContinuumException( "Error while creating projects from URL.", e );
+            throw logAndCreateException( "Error while creating projects from URL.", e );
         }
 
         // TODO: Update from metadata in the initial checkout?
@@ -246,7 +261,7 @@
 
         if ( !buildExecutorManager.hasBuilder( executorId ) )
         {
-            throw new ContinuumException( "No such executor with id '" + executorId + "'." );
+            logAndCreateException( "No such executor with id '" + executorId + "'." );
         }
 
         // ----------------------------------------------------------------------
@@ -288,8 +303,8 @@
 
             if ( !workingDirectory.exists() )
             {
-                throw new ContinuumException( "Could not make missing working directory for " +
-                                              "project '" + project.getName() + "'." );
+                logAndCreateException( "Could not make missing working directory for " +
+                                       "project '" + project.getName() + "'." );
             }
         }
 
@@ -303,12 +318,29 @@
         }
         catch ( ContinuumScmException e )
         {
-            throw new ContinuumException( "Error while updating project.", e );
+            logAndCreateException( "Error while updating project.", e );
         }
 
         updateProjectFromCheckOut( project );
     }
 
+    public void updateProject( String projectId, String name, String scmUrl, String nagEmailAddress, String version )
+        throws ContinuumException
+    {
+        try
+        {
+            store.updateProject( projectId,
+                                 name,
+                                 scmUrl,
+                                 nagEmailAddress,
+                                 version );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while updating the project.", e );
+        }
+    }
+
     public void updateProjectConfiguration( String projectId, Properties configuration )
         throws ContinuumException
     {
@@ -440,7 +472,7 @@
         }
     }
 
-    public List getChangedFilesForBuild( String buildId )
+    public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException
     {
         try
@@ -690,7 +722,7 @@
         }
         catch ( ContinuumProjectBuilderManagerException e )
         {
-            throw new ContinuumException( "Error while getting project builder '" + projectBuilderId + "'.", e );
+            throw logAndCreateException( "Error while getting project builder '" + projectBuilderId + "'.", e );
         }
     }
 
@@ -723,8 +755,8 @@
 
             if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
             {
-                throw new ContinuumException( "Could not make the working directory for the project " +
-                                              "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
+                logAndCreateException( "Could not make the working directory for the project " +
+                                       "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
             }
 
             project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
@@ -809,7 +841,7 @@
         }
         catch ( ContinuumBuildExecutorException e )
         {
-            throw new ContinuumException( "Error while updating project from check out.", e);
+            logAndCreateException( "Error while updating project from check out.", e);
         }
 
         // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/AbstractContinuumRegistrar.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/AbstractContinuumRegistrar.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/AbstractContinuumRegistrar.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/AbstractContinuumRegistrar.java Fri May 13 09:11:16 2005
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.Continuum;
-
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 /**
@@ -28,11 +26,4 @@
     extends AbstractLogEnabled
     implements ContinuumRegistrar
 {
-    /** @requirement */
-    private Continuum continuum;
-
-    public Continuum getContinuum()
-    {
-        return continuum;
-    }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket/UrlSocketRegistrar.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket/UrlSocketRegistrar.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket/UrlSocketRegistrar.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/registration/socket/UrlSocketRegistrar.java Fri May 13 09:11:16 2005
@@ -19,12 +19,13 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.StringWriter;
 import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.net.URL;
+import java.util.Collection;
 import java.util.Iterator;
-import java.util.List;
 
+import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.network.ConnectionConsumer;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
 import org.apache.maven.continuum.registration.AbstractContinuumRegistrar;
@@ -38,6 +39,9 @@
     extends AbstractContinuumRegistrar
     implements ConnectionConsumer
 {
+    /** @requirement */
+    private ContinuumCore core;
+
     // ----------------------------------------------------------------------
     // ConnectionConsumer Implementation
     // ----------------------------------------------------------------------
@@ -53,7 +57,7 @@
 
             URL u = new URL( url );
 
-            List ids = getContinuum().addProjectsFromUrl( u, MavenTwoContinuumProjectBuilder.ID );
+            Collection ids = core.addProjectsFromUrl( u, MavenTwoContinuumProjectBuilder.ID );
 
             for ( Iterator it = ids.iterator(); it.hasNext(); )
             {

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=170048&r1=170047&r2=170048&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 Fri May 13 09:11:16 2005
@@ -1,8 +1,8 @@
 <component-set>
   <components>
     <component>
-      <role>org.apache.maven.continuum.Continuum</role>
-      <implementation>org.apache.maven.continuum.DefaultContinuum</implementation>
+      <role>org.apache.maven.continuum.core.ContinuumCore</role>
+      <implementation>org.apache.maven.continuum.core.DefaultContinuumCore</implementation>
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
@@ -34,6 +34,16 @@
     </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>
+      </requirements>
+    </component>
+
+    <component>
       <role>org.apache.maven.continuum.execution.manager.BuildExecutorManager</role>
       <implementation>org.apache.maven.continuum.execution.manager.DefaultBuildExecutorManager</implementation>
       <requirements>
@@ -156,7 +166,7 @@
       <implementation>org.apache.maven.continuum.registration.socket.UrlSocketRegistrar</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.Continuum</role>
+          <role>org.apache.maven.continuum.core.ContinuumCore</role>
         </requirement>
       </requirements>
     </component>

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java Fri May 13 09:11:16 2005
@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-
 import org.codehaus.plexus.PlexusTestCase;
 
 /**

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java Fri May 13 09:11:16 2005
@@ -22,12 +22,12 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.execution.shell.ShellBuildResult;
 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.execution.maven.m2.MavenTwoBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellBuildResult;
 
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.mailsender.MailMessage;

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java Fri May 13 09:11:16 2005
@@ -18,10 +18,10 @@
 
 import java.util.Properties;
 
+import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 
 import org.codehaus.plexus.PlexusTestCase;
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Fri May 13 09:11:16 2005
@@ -19,13 +19,13 @@
 import java.io.File;
 import java.net.URL;
 import java.util.HashMap;
-import java.util.Map;
 import java.util.Iterator;
+import java.util.Map;
 
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 
 import org.codehaus.plexus.PlexusTestCase;
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java Fri May 13 09:11:16 2005
@@ -24,6 +24,7 @@
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.maven.continuum.execution.shell.ShellBuildResult;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumJPoxStore;
@@ -32,7 +33,6 @@
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.ScmFile;
 import org.apache.maven.continuum.scm.UpdateScmResult;
-import org.apache.maven.continuum.execution.shell.ShellBuildResult;
 
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.jdo.JdoFactory;

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java Fri May 13 09:11:16 2005
@@ -18,16 +18,17 @@
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.Vector;
 
 import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.core.ContinuumCore;
 import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
 import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
 import org.apache.maven.continuum.project.ContinuumBuild;
@@ -52,6 +53,9 @@
     private Continuum continuum;
 
     /** @requirement */
+    private ContinuumCore core;
+
+    /** @requirement */
     private XmlRpcHelper xmlRpcHelper;
 
     // ----------------------------------------------------------------------
@@ -62,7 +66,7 @@
     {
         try
         {
-            List projectIds = continuum.addProjectsFromUrl( url, MavenOneContinuumProjectBuilder.ID );
+            Collection projectIds = core.addProjectsFromUrl( url, MavenOneContinuumProjectBuilder.ID );
 
             return makeHashtable( "projectIds", xmlRpcHelper.collectionToVector( projectIds, false ) );
         }
@@ -80,7 +84,7 @@
     {
         try
         {
-            List projectIds = continuum.addProjectsFromUrl( url, MavenTwoContinuumProjectBuilder.ID );
+            Collection projectIds = core.addProjectsFromUrl( url, MavenTwoContinuumProjectBuilder.ID );
 
             return makeHashtable( "projectIds", xmlRpcHelper.collectionToVector( projectIds, false ) );
         }
@@ -138,12 +142,12 @@
                 configurationProperties.put( entry.getKey().toString(), entry.getValue().toString() );
             }
 
-            String projectId = continuum.addProjectFromScm( scmUrl,
-                                                            executorId,
-                                                            projectName,
-                                                            nagEmailAddress,
-                                                            version,
-                                                            configurationProperties );
+            String projectId = core.addProjectFromScm( scmUrl,
+                                                       executorId,
+                                                       projectName,
+                                                       nagEmailAddress,
+                                                       version,
+                                                       configurationProperties );
 
             return makeHashtable( "projectId", projectId );
         }

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.java Fri May 13 09:11:16 2005
@@ -19,13 +19,13 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.Set;
-import java.util.Collection;
 import java.util.Vector;
-import java.util.Iterator;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelper.java?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelper.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/XmlRpcHelper.java Fri May 13 09:11:16 2005
@@ -17,10 +17,10 @@
  */
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Set;
 import java.util.Vector;
-import java.util.Collection;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/resources/META-INF/plexus/components.xml?rev=170048&r1=170047&r2=170048&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/resources/META-INF/plexus/components.xml Fri May 13 09:11:16 2005
@@ -9,6 +9,9 @@
           <role>org.apache.maven.continuum.Continuum</role>
         </requirement>
         <requirement>
+          <role>org.apache.maven.continuum.core.ContinuumCore</role>
+        </requirement>
+        <requirement>
           <role>org.apache.maven.continuum.xmlrpc.XmlRpcHelper</role>
         </requirement>
       </requirements>



Mime
View raw message