continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r708096 - in /continuum/branches/continuum-transient-state: continuum-api/src/main/java/org/apache/continuum/purge/ continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/ continuum-core/src/main/java/org/apache/maven/conti...
Date Mon, 27 Oct 2008 06:58:16 GMT
Author: ctan
Date: Sun Oct 26 23:58:16 2008
New Revision: 708096

URL: http://svn.apache.org/viewvc?rev=708096&view=rev
Log:
- removed unused imports
- cleanup codes

Modified:
    continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/purge/ContinuumPurgeManager.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/MessageContext.java
    continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
    continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
    continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
    continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java

Modified: continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/purge/ContinuumPurgeManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/purge/ContinuumPurgeManager.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/purge/ContinuumPurgeManager.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-api/src/main/java/org/apache/continuum/purge/ContinuumPurgeManager.java
Sun Oct 26 23:58:16 2008
@@ -55,53 +55,4 @@
      */
     void purgeDirectory( DirectoryPurgeConfiguration dirPurgeConfig )
         throws ContinuumPurgeManagerException;
-    /*
-    /**
-     * Check if the repository is already in the purging queue
-     * 
-     * @param repositoryId the id of the repository purge configuration
-     * @return true if the repository is in the purging queue, otherwise false
-     * @throws ContinuumPurgeManagerException
-     */
-/*    boolean isRepositoryInPurgeQueue( int repositoryId )
-        throws ContinuumPurgeManagerException;
-    
-    /**
-     * Check if the repository is being used by a project that is currently building
-     * 
-     * @param repositoryId the id of the local repository
-     * @return true if the repository is in use, otherwise false
-     * @throws ContinuumPurgeManagerException
-     */
-/*    boolean isRepositoryInUse( int repositoryId )
-        throws ContinuumPurgeManagerException;
-
-    /**
-     * Remove local repository from the purge queue
-     * 
-     * @param repositoryId the id of the local repository
-     * @throws ContinuumPurgeManagerException
-     */
-/*    void removeRepositoryFromPurgeQueue( int repositoryId )
-        throws ContinuumPurgeManagerException;
-    
-    /**
-     * Remove local repository from the purge queue
-     * 
-     * @param purgeConfigId the id of the purge configuration
-     * @return true if the purge configuration was successfully removed from the purge queue,
otherwise false
-     * @throws ContinuumPurgeManagerException
-     */
-/*    boolean removeFromPurgeQueue( int purgeConfigId )
-        throws ContinuumPurgeManagerException;
-    
-    /**
-     * Remove local repositories from the purge queue
-     * 
-     * @param purgeConfigIds the ids of the purge configuration
-     * @return true if the purge configurations were successfully removed from the purge
queue, otherwise false
-     * @throws ContinuumPurgeManagerException
-     */
-/*    boolean removeFromPurgeQueue( int[] purgeConfigIds )
-        throws ContinuumPurgeManagerException;*/
 }

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Sun Oct 26 23:58:16 2008
@@ -136,28 +136,6 @@
 
         try
         {
-            // check if build definition requires smoking the existing checkout and rechecking
out project
-            //if ( context.getBuildDefinition().isBuildFresh() )
-            //{
-            //    getLogger().info( "Purging exiting working copy" );
-            //    cleanWorkingDirectory( context );
-            //}
-
-            // ----------------------------------------------------------------------
-            // TODO: Centralize the error handling from the SCM related actions.
-            // ContinuumScmResult should return a ContinuumScmResult from all
-            // methods, even in a case of failure.
-            // ----------------------------------------------------------------------
-            //getLogger().info( "Updating working dir" );
-            //updateWorkingDirectory( context );
-
-            //getLogger().info( "Merging SCM results" );
-            //CONTINUUM-1393
-            //if ( !context.getBuildDefinition().isBuildFresh() )
-            //{
-            //    mergeScmResults( context );
-            //}
-
             checkProjectDependencies( context );
 
             if ( !shouldBuild( context ) )
@@ -303,11 +281,6 @@
 
     private void updateBuildResult( BuildResult build, BuildContext context )
     {
-        //if ( build.getScmResult() == null && context.getScmResult() != null )
-        //{
-        //    build.setScmResult( context.getScmResult() );
-        //}
-
         if ( build.getModifiedDependencies() == null && context.getModifiedDependencies()
!= null )
         {
             build.setModifiedDependencies( context.getModifiedDependencies() );
@@ -371,11 +344,6 @@
             context.setOldBuildResult( oldBuildResult );
             
             context.setScmResult( project.getScmResult() );
-
-            //if ( oldBuildResult != null )
-            //{
-            //    context.setOldScmResult( getOldScmResult( projectId, oldBuildResult.getEndTime()
) );
-            //}
         }
         catch ( ContinuumStoreException e )
         {
@@ -403,46 +371,7 @@
         
         return context;
     }
-/*
-    private void cleanWorkingDirectory( BuildContext context )
-        throws TaskExecutionException
-    {
-        performAction( "clean-working-directory", context );
-    }
-
-    private void updateWorkingDirectory( BuildContext context )
-        throws TaskExecutionException
-    {
-        Map actionContext = context.getActionContext();
-
-        performAction( "check-working-directory", context );
-
-        boolean workingDirectoryExists =
-            AbstractContinuumAction.getBoolean( actionContext, AbstractContinuumAction.KEY_WORKING_DIRECTORY_EXISTS
);
-
-        ScmResult scmResult;
 
-        if ( workingDirectoryExists )
-        {
-            performAction( "update-working-directory-from-scm", context );
-
-            scmResult = AbstractContinuumAction.getUpdateScmResult( actionContext, null );
-        }
-        else
-        {
-            Project project = (Project) actionContext.get( AbstractContinuumAction.KEY_PROJECT
);
-
-            actionContext.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY,
-                               workingDirectoryService.getWorkingDirectory( project ).getAbsolutePath()
);
-
-            performAction( "checkout-project", context );
-
-            scmResult = AbstractContinuumAction.getCheckoutResult( actionContext, null );
-        }
-
-        context.setScmResult( scmResult );
-    }
-*/
     private void performAction( String actionName, BuildContext context )
         throws TaskExecutionException
     {
@@ -708,49 +637,6 @@
         }
     }
 
-    /*
-    private String convertScmResultToError( ScmResult result )
-    {
-        String error = "";
-
-        if ( result == null )
-        {
-            error = "Scm result is null.";
-        }
-        else
-        {
-            if ( result.getCommandLine() != null )
-            {
-                error = "Command line: " + StringUtils.clean( result.getCommandLine() ) +
-                    System.getProperty( "line.separator" );
-            }
-
-            if ( result.getProviderMessage() != null )
-            {
-                error = "Provider message: " + StringUtils.clean( result.getProviderMessage()
) +
-                    System.getProperty( "line.separator" );
-            }
-
-            if ( result.getCommandOutput() != null )
-            {
-                error += "Command output: " + System.getProperty( "line.separator" );
-                error += "-------------------------------------------------------------------------------"
+
-                    System.getProperty( "line.separator" );
-                error += StringUtils.clean( result.getCommandOutput() ) + System.getProperty(
"line.separator" );
-                error += "-------------------------------------------------------------------------------"
+
-                    System.getProperty( "line.separator" );
-            }
-
-            if ( result.getException() != null )
-            {
-                error += "Exception:" + System.getProperty( "line.separator" );
-                error += result.getException();
-            }
-        }
-
-        return error;
-    }
-*/
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -773,8 +659,6 @@
 
         updateBuildResult( build, context );
 
-        //build.setScmResult( context.getScmResult() );
-
         build.setBuildDefinition( context.getBuildDefinition() );
 
         if ( error != null )
@@ -797,81 +681,8 @@
             throw new TaskExecutionException( "Error storing build result", e );
         }
     }
-/*
-    private ScmResult getOldScmResult( int projectId, long fromDate )
-    {
-        List<BuildResult> results = buildResultDao.getBuildResultsForProject( projectId,
fromDate );
-
-        ScmResult res = new ScmResult();
-
-        if ( results != null )
-        {
-            for ( BuildResult result : results )
-            {
-                ScmResult scmResult = result.getScmResult();
-
-                if ( scmResult != null )
-                {
-                    List<ChangeSet> changes = scmResult.getChanges();
-
-                    if ( changes != null )
-                    {
-                        for ( ChangeSet changeSet : changes )
-                        {
-                            if ( changeSet.getDate() < fromDate )
-                            {
-                                continue;
-                            }
-
-                            if ( !res.getChanges().contains( changeSet ) )
-                            {
-                                res.addChange( changeSet );
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        return res;
-    }
 
     /**
-     * Merges scm results so we'll have all changes since last execution of current build
definition
-     *
-     * @param context The build context
-     */
-/*    private void mergeScmResults( BuildContext context )
-    {
-        ScmResult oldScmResult = context.getOldScmResult();
-        ScmResult newScmResult = context.getScmResult();
-
-        if ( oldScmResult != null )
-        {
-            if ( newScmResult == null )
-            {
-                context.setScmResult( oldScmResult );
-            }
-            else
-            {
-                List<ChangeSet> oldChanges = oldScmResult.getChanges();
-
-                List<ChangeSet> newChanges = newScmResult.getChanges();
-
-                for ( ChangeSet change : newChanges )
-                {
-                    if ( !oldChanges.contains( change ) )
-                    {
-                        oldChanges.add( change );
-                    }
-                }
-
-                newScmResult.setChanges( oldChanges );
-            }
-        }
-    }
-*/
-    /**
      * Check to see if there was a error while checking out/updating the project
      *
      * @param context The build context
@@ -901,36 +712,6 @@
         }
         
         return false;
-        
-        
-        /*
-        ScmResult scmResult = context.getScmResult();
-
-        if ( scmResult == null || !scmResult.isSuccess() )
-        {
-            // scmResult must be converted before storing it because jpox modifies values
of all fields to null
-            String error = convertScmResultToError( scmResult );
-
-            BuildResult build = makeAndStoreBuildResult( context, error );
-
-            try
-            {
-                Project project = context.getProject();
-
-                project.setState( build.getState() );
-
-                projectDao.updateProject( project );
-
-                return false;
-            }
-            catch ( ContinuumStoreException e )
-            {
-                throw new TaskExecutionException( "Error storing project", e );
-            }
-        }
-        
-        context.getActionContext().put( AbstractContinuumAction.KEY_UPDATE_SCM_RESULT, scmResult
);
-*/
     }
 
 }

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
Sun Oct 26 23:58:16 2008
@@ -24,7 +24,6 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
-import org.codehaus.plexus.taskqueue.TaskQueue;
 
 import java.util.Map;
 
@@ -41,11 +40,6 @@
      * @plexus.requirement
      */
     private WorkingDirectoryService workingDirectoryService;
-/*
-    /**
-     * @plexus.requirement role-hint="check-out-project"
-     */
-//    private TaskQueue checkOutQueue;
 
     /**
      * @plexus.requirement

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
Sun Oct 26 23:58:16 2008
@@ -86,8 +86,6 @@
 
         int trigger = getTrigger( context );
 
-        //ScmResult scmResult = getUpdateScmResult( context );
-
         List updatedDependencies = getUpdatedDependencies( context );
 
         ContinuumBuildExecutor buildExecutor = buildExecutorManager.getBuildExecutor( project.getExecutorId()
);
@@ -104,8 +102,6 @@
 
         buildResult.setTrigger( trigger );
 
-        //buildResult.setScmResult( scmResult );
-
         buildResult.setModifiedDependencies( updatedDependencies );
 
         buildResult.setBuildDefinition( getBuildDefinition( context ) );

Modified: continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/MessageContext.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/MessageContext.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/MessageContext.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/MessageContext.java
Sun Oct 26 23:58:16 2008
@@ -23,7 +23,6 @@
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 
 import java.util.List;

Modified: continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
Sun Oct 26 23:58:16 2008
@@ -20,7 +20,6 @@
  */
 
 import org.apache.continuum.model.project.ProjectScmRoot;
-import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -30,7 +29,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.MessageContext;
 import org.apache.maven.continuum.notification.NotificationException;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.msn.MsnClient;
 import org.codehaus.plexus.msn.MsnException;
 import org.codehaus.plexus.util.StringUtils;
@@ -40,8 +38,6 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Sun Oct 26 23:58:16 2008
@@ -27,11 +27,9 @@
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.apache.maven.continuum.web.util.StateGenerator;
 import org.codehaus.plexus.util.FileUtils;

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
Sun Oct 26 23:58:16 2008
@@ -21,7 +21,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;

Modified: continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java?rev=708096&r1=708095&r2=708096&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/AbstractBuildQueueAction.java
Sun Oct 26 23:58:16 2008
@@ -20,8 +20,6 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
-import org.apache.maven.continuum.model.project.BuildResult;
-import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.taskqueue.Task;



Mime
View raw message