continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r208828 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java...
Date Sat, 02 Jul 2005 11:58:20 GMT
Author: trygvis
Date: Sat Jul  2 04:58:17 2005
New Revision: 208828

URL: http://svn.apache.org/viewcvs?rev=208828&view=rev
Log:
o Removing old commented out code.

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.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/ContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.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/notification/DefaultContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.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/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

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=208828&r1=208827&r2=208828&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 Sat Jul  2 04:58:17 2005
@@ -90,9 +90,6 @@
     Collection getBuildsForProject( String projectId )
         throws ContinuumException;
 
-//    ContinuumBuildResult getBuildResultForBuild( String buildId )
-//        throws ContinuumException;
-
     Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;
 

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java Sat Jul  2 04:58:17 2005
@@ -43,21 +43,9 @@
     void removeProject( String projectId )
         throws ContinuumStoreException;
 
-//    /** @deprecated Use updateProject */
-//    void setWorkingDirectory( String projectId, String workingDirectory )
-//        throws ContinuumStoreException;
-
     void updateProject( ContinuumProject project )
         throws ContinuumStoreException;
 
-//    void updateProject( String projectId,
-//                        String name,
-//                        String scmUrl,
-//                        List notifiers,
-//                        String version,
-//                        String commandLineArguments )
-//        throws ContinuumStoreException;
-
     // ----------------------------------------------------------------------
     // ContinuumProject Queries
     // ----------------------------------------------------------------------
@@ -81,28 +69,12 @@
     // Build
     // ----------------------------------------------------------------------
 
-//    /**
-//     * @deprecated use store build
-//     */
-//    String createBuild( String projectId, boolean forced )
-//        throws ContinuumStoreException;
-
     String addBuild( String projectId, ContinuumBuild build )
         throws ContinuumStoreException;
 
     void updateBuild( ContinuumBuild build )
         throws ContinuumStoreException;
 
-//    /**
-//     * @deprecated use update build
-//     */
-//    void setBuildResult( String buildId,
-//                         int state,
-//                         ContinuumBuildExecutionResult result,
-//                         UpdateScmResult scmResult,
-//                         Throwable error )
-//        throws ContinuumStoreException;
-
     ContinuumBuild getBuild( String buildId )
         throws ContinuumStoreException;
 
@@ -112,47 +84,6 @@
     Collection getBuildsForProject( String projectId, int start, int end )
         throws ContinuumStoreException;
 
-//    ContinuumBuildResult getBuildResultForBuild( String buildId )
-//        throws ContinuumStoreException;
-
     List getChangedFilesForBuild( String buildId )
         throws ContinuumStoreException;
-
-    // ----------------------------------------------------------------------
-    // Project Transitions
-    // ----------------------------------------------------------------------
-
-//    void setCheckoutDone( String projectId,
-//                          CheckOutScmResult scmResult,
-//                          String errorMessage,
-//                          Throwable exception )
-//        throws ContinuumStoreException;
-
-//    void setIsUpdating( String projectId )
-//        throws ContinuumStoreException;
-
-//    void setUpdateDone( String projectId )
-//        throws ContinuumStoreException;
-
-    // ----------------------------------------------------------------------
-    // Build Transitions
-    // ----------------------------------------------------------------------
-
-//    String buildingProject( String projectId,
-//                            boolean forced,
-//                            UpdateScmResult scmResult )
-//        throws ContinuumStoreException;
-
-//    void setBuildNotExecuted( String projectId )
-//        throws ContinuumStoreException;
-
-//    void setBuildComplete( String buildId,
-//                           UpdateScmResult scmResult,
-//                           ContinuumBuildExecutionResult result )
-//        throws ContinuumStoreException;
-
-//    void setBuildError( String buildId,
-//                        UpdateScmResult scmResult,
-//                        Throwable throwable )
-//        throws ContinuumStoreException;
 }

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=208828&r1=208827&r2=208828&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 Sat Jul  2 04:58:17 2005
@@ -197,12 +197,6 @@
         return core.getBuildsForProject( projectId );
     }
 
-//    public ContinuumBuildResult getBuildResultForBuild( String buildId )
-//        throws ContinuumException
-//    {
-//        return core.getBuildResultForBuild( buildId );
-//    }
-
     public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException
     {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java Sat Jul  2 04:58:17 2005
@@ -39,32 +39,12 @@
 {
     String ROLE = ContinuumCore.class.getName();
 
-//    Collection addProjectsFromUrl( String url, String projectBuilderId )
-//        throws ContinuumException;
-//
-//    Collection addProjectsFromUrl( URL url, String projectBuilderId )
-//        throws ContinuumException;
-//
-//    String addProjectFromScm( ContinuumProject project )
-//        throws ContinuumException;
-
     void removeProject( String projectId )
         throws ContinuumException;
 
-//    void updateProjectFromScm( String projectId )
-//        throws ContinuumException;
-
     void updateProject( ContinuumProject project )
         throws ContinuumException;
 
-//    void updateProject( String projectId,
-//                        String name,
-//                        String scmUrl,
-//                        List notifiers,
-//                        String version,
-//                        String commandLineArguments )
-//        throws ContinuumException;
-
     ContinuumProject getProject( String projectId )
         throws ContinuumException;
 
@@ -96,9 +76,6 @@
 
     Collection getBuildsForProject( String projectId )
         throws ContinuumException;
-
-//    ContinuumBuildResult getBuildResultForBuild( String buildId )
-//        throws ContinuumException;
 
     Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java Sat Jul  2 04:58:17 2005
@@ -289,31 +289,6 @@
         }
     }
 
-//    public void updateProject( String projectId,
-//                               String name,
-//                               String scmUrl,
-//                               List notifiers,
-//                               String version,
-//                               String commandLineArguments )
-//        throws ContinuumException
-//    {
-//        try
-//        {
-//            commandLineArguments = StringUtils.clean( commandLineArguments );
-//
-//            store.updateProject( projectId,
-//                                 name,
-//                                 scmUrl,
-//                                 notifiers,
-//                                 version,
-//                                 commandLineArguments );
-//        }
-//        catch ( ContinuumStoreException e )
-//        {
-//            throw logAndCreateException( "Error while updating the project.", e );
-//        }
-//    }
-
     public ContinuumProject getProject( String projectId )
         throws ContinuumException
     {
@@ -408,19 +383,6 @@
         }
     }
 
-//    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 );
-//        }
-//    }
-
     public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException
     {
@@ -445,193 +407,6 @@
     }
 
     // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-/*
-    private ContinuumProjectBuilder getProjectBuilder( String projectBuilderId )
-        throws ContinuumException
-    {
-        try
-        {
-            return projectBuilderManager.getProjectBuilder( projectBuilderId );
-        }
-        catch ( ContinuumProjectBuilderManagerException e )
-        {
-            throw logAndCreateException( "Error while getting project builder '" + projectBuilderId + "'.", e );
-        }
-    }
-*/
-/*
-    private void validateProject( ContinuumProject project )
-        throws ContinuumException
-    {
-        // ----------------------------------------------------------------------
-        // Make sure that the builder id is correct before starting to check
-        // stuff out
-        // ----------------------------------------------------------------------
-
-        if ( !buildExecutorManager.hasBuildExecutor( project.getExecutorId() ) )
-        {
-            throw logAndCreateException( "No such executor with id '" + project.getExecutorId() + "'." );
-        }
-
-        try
-        {
-            if ( store.getProjectByName( project.getName() ) != null )
-            {
-                throw new ContinuumException( "A project with the name '" + project.getName() + "' already exist." );
-            }
-
-//            if ( getProjectByScmUrl( scmUrl ) != null )
-//            {
-//                throw new ContinuumStoreException( "A project with the scm url '" + scmUrl + "' already exist." );
-//            }
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw new ContinuumException( "Error while validating the project.", e );
-        }
-
-        // ----------------------------------------------------------------------
-        // Validate each field
-        // ----------------------------------------------------------------------
-
-        project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
-    }
-*/
-/*
-    private ContinuumProject addProjectAndCheckOutSources( ContinuumProject project  )
-        throws ContinuumException
-    {
-        String projectId;
-
-        File projectWorkingDirectory;
-
-        try
-        {
-            // ----------------------------------------------------------------------
-            // Store the project
-            // ----------------------------------------------------------------------
-
-            projectId = store.addProject( project );
-
-            // ----------------------------------------------------------------------
-            // Set the working directory
-            // ----------------------------------------------------------------------
-
-            project = store.getProject( projectId );
-
-            projectWorkingDirectory = new File( workingDirectory, projectId );
-
-            if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
-            {
-                throw logAndCreateException( "Could not make the working directory for the project " +
-                                             "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
-            }
-
-            project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
-
-            // ----------------------------------------------------------------------
-            // Check out the project
-            // ----------------------------------------------------------------------
-
-            store.updateProject( 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.getBuildExecutor( project.getExecutorId() );
-
-        try
-        {
-            builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
-        }
-        catch ( ContinuumBuildExecutorException e )
-        {
-            throw logAndCreateException( "Error while updating project from check out.", e );
-        }
-
-        // ----------------------------------------------------------------------
-        // Store the new descriptor
-        // ----------------------------------------------------------------------
-
-        try
-        {
-            store.updateProject( project );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while storing the updated project.", e );
-        }
-    }
-*/
-    // ----------------------------------------------------------------------
     // Lifecylce Management
     // ----------------------------------------------------------------------
 
@@ -682,43 +457,6 @@
         getLogger().info( "Starting Continuum." );
 
         // ----------------------------------------------------------------------
-        // Check for projects that's in the "checking out" state and enqueue
-        // them to ensure that they're always checked out.
-        // ----------------------------------------------------------------------
-
-//        getLogger().info( "Checking for projects that has to be checked out." );
-//
-//        try
-//        {
-//            for ( Iterator it = store.getAllProjects().iterator(); it.hasNext(); )
-//            {
-//                ContinuumProject project = (ContinuumProject) it.next();
-//
-//                if ( project.getState() != ContinuumProjectState.CHECKING_OUT )
-//                {
-//                    continue;
-//                }
-//
-//                getLogger().info( "Adding '" + project.getName() + "' to the check out queue." );
-//
-//                CheckOutTask checkOutTask = new CheckOutTask( project.getId(),
-//                                                              new File( project.getWorkingDirectory() ) );
-//
-//                checkOutQueue.put( checkOutTask );
-//            }
-//        }
-//        catch ( ContinuumStoreException e )
-//        {
-//            throw new StartingException( "Error while enqueuing all projects in the 'checking out' state to " +
-//                                         "the check out queue.", e );
-//        }
-//        catch ( TaskQueueException e )
-//        {
-//            throw new StartingException( "Error while enqueuing all projects in the 'checking out' state to " +
-//                                         "the check out queue.", e );
-//        }
-
-        // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
 
@@ -743,14 +481,7 @@
 
         getLogger().info( "Continuum stopped." );
     }
-/*
-    private ContinuumException logAndCreateException( String message )
-    {
-        getLogger().error( message );
 
-        return new ContinuumException( message );
-    }
-*/
     private ContinuumException logAndCreateException( String message, Throwable cause )
     {
         getLogger().error( message, cause );

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=208828&r1=208827&r2=208828&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 Sat Jul  2 04:58:17 2005
@@ -49,7 +49,5 @@
         project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
 
         getStore().updateProject( project );
-
-//        getStore().setWorkingDirectory( projectId, projectWorkingDirectory.getAbsolutePath() );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java Sat Jul  2 04:58:17 2005
@@ -115,8 +115,6 @@
             if ( build != null )
             {
                 context.put( CONTEXT_BUILD, store.getBuild( build.getId() ) );
-
-//                context.put( CONTEXT_BUILD_RESULT, store.getBuildResultForBuild( build.getId() ) );
             }
 
             if ( scmResult != null )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java Sat Jul  2 04:58:17 2005
@@ -18,7 +18,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
@@ -26,14 +25,11 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
 
-import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumJPoxStore;
 import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.ScmFile;
-import org.apache.maven.continuum.scm.UpdateScmResult;
 
 import org.codehaus.plexus.jdo.JdoFactory;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -46,10 +42,8 @@
  * should not be present in the store. We have to move toward being able to generate more of
  * these methods automatically so any app customizatoins would prevent this from working.
  *
- * @todo remove the state guard code
  * @todo we could create the necessary ContinuumProject else where and use the addContinuumProject that is present in the store class generated by modello.
  * @todo how to build in some basic query methods so we can describe what we want and have it be generated
- * @todo cascading delete
  */
 public class ModelloJPoxContinuumStore
     extends AbstractContinuumStore
@@ -82,8 +76,6 @@
     {
         try
         {
-//            project.setState( ContinuumProjectState.CHECKING_OUT );
-
             Object id = store.addContinuumProject( project );
 
             project = store.getContinuumProjectByJdoId( id, true );
@@ -110,22 +102,6 @@
 
             List builds = project.getBuilds();
 
-//            for ( Iterator it = builds.iterator(); it.hasNext(); )
-//            {
-//                ContinuumBuild build = (ContinuumBuild) it.next();
-//
-//                ContinuumBuildResult result = build.getBuildResult();
-//
-//                if ( result == null )
-//                {
-//                    continue;
-//                }
-//
-//                result.setBuild( null );
-//
-//                pm.deletePersistent( result );
-//            }
-
             for ( Iterator it = builds.iterator(); it.hasNext(); )
             {
                 ContinuumBuild build = (ContinuumBuild) it.next();
@@ -149,27 +125,6 @@
         }
     }
 
-//    public void setWorkingDirectory( String projectId, String workingDirectory )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            project.setWorkingDirectory( workingDirectory );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting the working directory.", e );
-//        }
-//    }
-
     public void updateProject( ContinuumProject project )
         throws ContinuumStoreException
     {
@@ -180,25 +135,6 @@
             store.storeContinuumProject( project );
 
             project = store.getContinuumProject( project.getId(), true );
-
-//            pm.attachCopyAll( project.getDevelopers(), true );
-//
-//            Collection notifiers = project.getNotifiers();
-
-//            System.err.println( "updating " + notifiers.size() );
-//
-//            for ( Iterator it = notifiers.iterator(); it.hasNext(); )
-//            {
-//                ContinuumNotifier notifier = (ContinuumNotifier) it.next();
-//
-//                System.err.println( "type: " + notifier.getType() );
-//                System.err.println( "config:" + notifier.getConfiguration() );
-//                System.err.println( "id: " + JDOHelper.getObjectId( notifier ) );
-//
-//                pm.attachCopy( notifier, true );
-//            }
-
-//            pm.attachCopyAll( notifiers, true );
         }
         catch ( Exception e )
         {
@@ -206,36 +142,6 @@
         }
     }
 
-//    public void updateProject( String projectId,
-//                               String name,
-//                               String scmUrl,
-//                               List notifiers,
-//                               String version,
-//                               String commandLineArguments )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            project.setName( name );
-//            project.setScmUrl( scmUrl );
-//            project.setNotifiers( notifiers );
-//            project.setVersion( version );
-//            project.setCommandLineArguments( commandLineArguments );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while updating project.", e );
-//        }
-//    }
-
     public Collection getAllProjects()
         throws ContinuumStoreException
     {
@@ -354,41 +260,6 @@
     // Build
     // ----------------------------------------------------------------------
 
-//    public String createBuild( String projectId, boolean forced )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            ContinuumBuild build = new ContinuumBuild();
-//
-//            build.setStartTime( System.currentTimeMillis() );
-//
-//            build.setState( ContinuumProjectState.BUILDING );
-//
-//            build.setProject( project );
-//
-//            build.setForced( forced );
-//
-//            Object id = store.addContinuumBuild( build );
-//
-//            store.commit();
-//
-//            build = store.getContinuumBuildByJdoId( id, true );
-//
-//            return build.getId();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while creating continuum build for project: '" + projectId + "'.", e );
-//        }
-//    }
-
     public String addBuild( String projectId, ContinuumBuild build )
         throws ContinuumStoreException
     {
@@ -400,10 +271,6 @@
 
             build.setProject( project );
 
-//            build.setStartTime( System.currentTimeMillis() );
-//            build.setState( ContinuumProjectState.BUILDING );
-//            build.setForced( forced );
-
             Object id = store.addContinuumBuild( build );
 
             store.commit();
@@ -433,55 +300,6 @@
         }
     }
 
-//    public void setBuildResult( String buildId,
-//                                int state,
-//                                ContinuumBuildExecutionResult result,
-//                                UpdateScmResult scmResult,
-//                                Throwable error )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumBuild build = store.getContinuumBuild( buildId, false );
-//
-//            // TODO: as build.getProject() should be removed replace this with
-//            //       a search for the project
-//            ContinuumProject project = build.getProject();
-//
-//            project.setState( state );
-//
-//            build.setState( state );
-//
-//            build.setEndTime( new Date().getTime() );
-//
-//            build.setError( throwableToString( error ) );
-//
-//            build.setUpdateScmResult( scmResult );
-//
-//            // ----------------------------------------------------------------------
-//            // Copy over the build result
-//            // ----------------------------------------------------------------------
-//
-//            build.setSuccess( result.isSuccess() );
-//
-//            build.setStandardOutput( result.getStandardOutput() );
-//
-//            build.setStandardError( result.getStandardError() );
-//
-//            build.setExitCode( result.getExitCode() );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting build result for build: '" + buildId + "'.", e );
-//        }
-//    }
-
     public ContinuumBuild getBuild( String buildId )
         throws ContinuumStoreException
     {
@@ -550,38 +368,6 @@
         }
     }
 
-//    public ContinuumBuildResult getBuildResultForBuild( String buildId )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumBuild build = store.getContinuumBuild( buildId, false );
-//
-//            if ( build.getBuildResult() == null )
-//            {
-//                store.commit();
-//
-//                return null;
-//            }
-//
-//            Object id = JDOHelper.getObjectId( build.getBuildResult() );
-//
-//            store.commit();
-//
-//            ContinuumBuildResult result = store.getContinuumBuildResultByJdoId( id, true );
-//
-//            return result;
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while getting build result.", e );
-//        }
-//    }
-
     public List getChangedFilesForBuild( String buildId )
         throws ContinuumStoreException
     {
@@ -591,13 +377,6 @@
 
             ContinuumBuild build = store.getContinuumBuild( buildId, false );
 
-//            if ( build.getBuildResult() == null )
-//            {
-//                store.commit();
-//
-//                return null;
-//            }
-
             // TODO: Having to copy the objects feels a /bit/ strange.
 
             List changedFiles = new ArrayList();
@@ -629,252 +408,10 @@
     //
     // ----------------------------------------------------------------------
 
-//    public void setCheckoutDone( String projectId,
-//                                 CheckOutScmResult scmResult,
-//                                 String errorMessage,
-//                                 Throwable exception )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            int state;
-//
-//            if ( scmResult != null &&
-//                 scmResult.isSuccess() &&
-//                 StringUtils.isEmpty( errorMessage ) &&
-//                 exception == null )
-//            {
-//                state = ContinuumProjectState.NEW;
-//            }
-//            else
-//            {
-//                state = ContinuumProjectState.ERROR;
-//            }
-//
-//            project.setState( state );
-//
-//            project.setCheckOutScmResult( scmResult );
-//
-//            project.setCheckOutErrorMessage( errorMessage );
-//
-//            project.setCheckOutErrorException( throwableToString( exception ) );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting check out scm result.", e );
-//        }
-//    }
-
-//    public void setIsUpdating( String projectId )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            project.setState( ContinuumProjectState.UPDATING );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting build state.", e );
-//        }
-//    }
-
-//    public void setUpdateDone( String projectId )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            project.setState( ContinuumProjectState.BUILDING );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting update scm result.", e );
-//        }
-//    }
-
-//    public void setBuildNotExecuted( String projectId )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            int state;
-//
-//            ContinuumBuild latestBuild = getLatestBuildForProject( projectId );
-//
-//            if ( latestBuild == null )
-//            {
-//                state = ContinuumProjectState.NEW;
-//            }
-//            else
-//            {
-//                state = latestBuild.getState();
-//            }
-//
-//            project.setState( state );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting update scm result.", e );
-//        }
-//    }
-
-//    public String buildingProject( String projectId,
-//                                   boolean forced,
-//                                   UpdateScmResult scmResult )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            ContinuumProject project = store.getContinuumProject( projectId, false );
-//
-//            ContinuumBuild build = new ContinuumBuild();
-//
-//            build.setStartTime( new Date().getTime() );
-//
-//            build.setState( ContinuumProjectState.BUILDING );
-//
-//            project.setState( ContinuumProjectState.BUILDING );
-//
-//            build.setProject( project );
-//
-//            build.setForced( forced );
-//
-//            build.setUpdateScmResult( scmResult );
-//
-//            Object id = store.addContinuumBuild( build );
-//
-//            build = store.getContinuumBuildByJdoId( id, false );
-//
-//            store.commit();
-//
-//            return build.getId();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while creating continuum build for project: '" + projectId + "'.", e );
-//        }
-//    }
-
-//    public void setBuildComplete( String buildId,
-//                                  UpdateScmResult scmResult,
-//                                  ContinuumBuildExecutionResult result )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            int state = result.isSuccess() ?
-//                        ContinuumProjectState.OK : ContinuumProjectState.FAILED;
-//
-//            ContinuumBuild build = store.getContinuumBuild( buildId, false );
-//
-//            build.setState( state );
-//
-//            ContinuumProject project = build.getProject();
-//
-//            project.setState( state );
-//
-//            // ----------------------------------------------------------------------
-//            // Copy over the build result
-//            // ----------------------------------------------------------------------
-//
-//            build.setSuccess( result.isSuccess() );
-//
-//            build.setStandardOutput( result.getStandardOutput() );
-//
-//            build.setStandardError( result.getStandardError() );
-//
-//            build.setExitCode( result.getExitCode() );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting build result for build: '" + buildId + "'.", e );
-//        }
-//    }
-
-//    public void setBuildError( String buildId,
-//                               UpdateScmResult scmResult,
-//                               Throwable throwable )
-//        throws ContinuumStoreException
-//    {
-//        try
-//        {
-//            store.begin();
-//
-//            int state = ContinuumProjectState.ERROR;
-//
-//            ContinuumBuild build = store.getContinuumBuild( buildId, false );
-//
-//            build.setState( state );
-//
-//            ContinuumProject project = build.getProject();
-//
-//            project.setState( state );
-//
-//            build.setError( throwableToString( throwable ) );
-//
-//            store.commit();
-//        }
-//        catch ( Exception e )
-//        {
-//            rollback( store );
-//
-//            throw new ContinuumStoreException( "Error while setting build result for build: '" + buildId + "'.", e );
-//        }
-//    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
     public ContinuumJPoxStore getStore()
     {
         return store;
     }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
 
     private void rollback( ContinuumJPoxStore store )
     {

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Sat Jul  2 04:58:17 2005
@@ -42,11 +42,6 @@
                                                                      "Notification Dispatcher Test Project",
                                                                      "scm:notification/dispatcher" );
 
-//        store.setIsUpdating( projectId );
-
-//        store.setUpdateDone( projectId );
-
-//        String buildId = store.createBuild( projectId, false );
         ContinuumBuild build = new ContinuumBuild();
         build.setStartTime( System.currentTimeMillis() );
         build.setState( ContinuumProjectState.BUILDING );

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=208828&r1=208827&r2=208828&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 Sat Jul  2 04:58:17 2005
@@ -236,8 +236,6 @@
 
         assertNotNull( project );
 
-//        assertEquals( ContinuumProjectState.CHECKING_OUT, project.getState() );
-
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -246,15 +244,12 @@
 
         checkOutScmResult.setSuccess( true );
 
-//        store.setCheckoutDone( projectId, checkOutScmResult, null, null );
         setCheckoutDone( store, projectId, checkOutScmResult, null, null );
 
         project = store.getProject( projectId );
 
         assertNotNull( project );
 
-//        assertEquals( ContinuumProjectState.NEW, project.getState() );
-
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -400,10 +395,6 @@
 
         String projectId = addMavenTwoProject( "Remove Test Project", "scm:remove-project" );
 
-//        store.setIsUpdating( projectId );
-
-//        store.setUpdateDone( projectId );
-
         String buildId = createBuild( store, projectId, false );
 
         UpdateScmResult scmResult = new UpdateScmResult();
@@ -509,10 +500,6 @@
 
         String projectId = addMavenTwoProject( "Build Test Project", "scm:build" );
 
-//        store.setIsUpdating( projectId );
-
-//        store.setUpdateDone( projectId );
-
         // ----------------------------------------------------------------------
         // Construct a build object
         // ----------------------------------------------------------------------
@@ -589,22 +576,10 @@
 
         String projectId = addMavenTwoProject( "Association Test Project", "scm:association" );
 
-//        store.setIsUpdating( projectId );
-//
-//        store.setUpdateDone( projectId );
-
         String projectIdFoo = addMavenTwoProject( "Foo Project", "scm:association-foo" );
 
-//        store.setIsUpdating( projectIdFoo );
-//
-//        store.setUpdateDone( projectIdFoo );
-
         String projectIdBar = addMavenTwoProject( "Bar Project", "scm:association-bar" );
 
-//        store.setIsUpdating( projectIdBar );
-//
-//        store.setUpdateDone( projectIdBar );
-
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -655,10 +630,6 @@
     {
         String projectId = addMavenTwoProject( "Association Test Project", "scm:association" );
 
-//        store.setIsUpdating( projectId );
-//
-//        store.setUpdateDone( projectId );
-
         List expectedBuilds = new ArrayList();
 
         for ( int i = 0; i < 10; i++ )
@@ -694,20 +665,10 @@
 
         String projectId = addMavenTwoProject( "Build Result Project", "scm:build/result" );
 
-//        store.setIsUpdating( projectId );
-//
-//        assertInState( projectId, ContinuumProjectState.UPDATING );
-//
-//        store.setUpdateDone( projectId );
-//
-//        assertInState( projectId, ContinuumProjectState.BUILDING );
-
         long now = System.currentTimeMillis();
 
         String buildId = createBuild( store, projectId, false );
 
-//        assertInState( projectId, ContinuumProjectState.BUILDING );
-
         assertIsCommitted( store );
 
         assertNotNull( buildId );
@@ -716,12 +677,8 @@
         // Check that the project's state has been updated
         // ----------------------------------------------------------------------
 
-//        ContinuumProject project = store.getProject( projectId );
-
         assertIsCommitted( store );
 
-//        assertEquals( ContinuumProjectState.BUILDING, project.getState() );
-
         // ----------------------------------------------------------------------
         // Check the build
         // ----------------------------------------------------------------------
@@ -744,12 +701,8 @@
         // Check the build result
         // ----------------------------------------------------------------------
 
-//        ContinuumBuildResult result = store.getBuildResultForBuild( buildId );
-
         assertIsCommitted( store );
 
-//        assertNull( result );
-
         UpdateScmResult scmResult = new UpdateScmResult();
 
         setBuildResult( store,
@@ -817,8 +770,6 @@
 
         assertNotNull( project );
 
-//        assertEquals( ContinuumProjectState.NEW, project.getState() );
-
         return projectId;
     }
 
@@ -922,25 +873,11 @@
         build.setExitCode( result.getExitCode() );
 
         store.updateBuild( build );
-//
-//        ContinuumProject project = store.getProject( build.getProject().getId() );
-//
-//        project.setState( state );
-//
-//        store.updateProject( project );
     }
 
     // ----------------------------------------------------------------------
     // Assertions
     // ----------------------------------------------------------------------
-
-//    private void assertInState( String projectId, int state )
-//        throws ContinuumStoreException
-//    {
-//        ContinuumProject project = store.getProject( projectId );
-//
-//        assertEquals( state, project.getState() );
-//    }
 
     private void assertIsCommitted( ContinuumStore store )
     {

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=208828&r1=208827&r2=208828&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java Sat Jul  2 04:58:17 2005
@@ -62,8 +62,6 @@
                                    int start,
                                    int end );
 
-//    Hashtable getBuildResultForBuild( String buildId );
-
     Hashtable getChangedFilesForBuild( String buildId );
 
     // ----------------------------------------------------------------------

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=208828&r1=208827&r2=208828&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 Sat Jul  2 04:58:17 2005
@@ -213,21 +213,6 @@
         }
     }
 
-//    public Hashtable getBuildResultForBuild( String buildId )
-//    {
-//        try
-//        {
-//            ContinuumBuildResult result = continuum.getBuildResultForBuild( buildId );
-//
-//            return makeHashtable( "buildResult", convertContinuumBuildResult( result ) );
-//        }
-//        catch ( Throwable e )
-//        {
-//            return handleException( "ContinuumXmlRpc.getBuildResultForProject()",
-//                                    "Build id: '" + buildId + "'.", e );
-//        }
-//    }
-
     public Hashtable getChangedFilesForBuild( String buildId )
     {
         try
@@ -481,7 +466,7 @@
             ShellProject project = continuum.getShellProject( id );
 
             xmlRpcHelper.hashtableToObject( shellProject, project );
-    
+
             continuum.updateShellProject( project );
 
             return makeHashtable();



Mime
View raw message