continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r233212 [1/3] - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/execution/ continuum-api/src/main/java/org/apache/maven/continuum/notification/ contin...
Date Wed, 17 Aug 2005 17:36:17 GMT
Author: brett
Date: Wed Aug 17 10:34:49 2005
New Revision: 233212

URL: http://svn.apache.org/viewcvs?rev=233212&view=rev
Log:
rename ContinuumProject to Project

Removed:
    maven/continuum/trunk/continuum-core-it/src/test/resources/
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/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.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/buildcontroller/BuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.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/notification/console/ConsoleNotifier.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/ContinuumScm.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/ProjectSorter.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.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/resources/log4j.properties
    maven/continuum/trunk/continuum-model/pom.xml
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
    maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
    maven/continuum/trunk/continuum-plexus-application/src/conf/application.xml
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/AbstractContinuumStore.java
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
    maven/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
    maven/continuum/trunk/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenOneProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/mavenTwoProject.xml
    maven/continuum/trunk/continuum-web/src/main/resources/forms/shellProject.xml
    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
    maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.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=233212&r1=233211&r2=233212&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 Wed Aug 17 10:34:49 2005
@@ -17,9 +17,8 @@
  */
 
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
@@ -40,32 +39,29 @@
     // Project
     // ----------------------------------------------------------------------
 
-    void removeProject( String projectId )
+    void removeProject( int projectId )
         throws ContinuumException;
 
-    void checkoutProject( String id )
+    void checkoutProject( int projectId )
         throws ContinuumException;
 
-    ContinuumProject getProject( String projectId )
+    Project getProject( int projectId )
         throws ContinuumException;
 
     Collection getAllProjects( int start, int end )
         throws ContinuumException;
 
-    ScmResult getScmResultForProject( String projectId )
-        throws ContinuumException;
-
     Collection getProjects()
         throws ContinuumException;
 
-    BuildResult getLatestBuildResultForProject( String projectId )
+    BuildResult getLatestBuildResultForProject( int projectId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Queues
     // ----------------------------------------------------------------------
 
-    boolean isInBuildingQueue( String id )
+    boolean isInBuildingQueue( int projectId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
@@ -81,10 +77,10 @@
     void buildProjects( boolean force )
         throws ContinuumException;
 
-    void buildProject( String projectId )
+    void buildProject( int projectId )
         throws ContinuumException;
 
-    void buildProject( String projectId, boolean force )
+    void buildProject( int projectId, boolean force )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
@@ -94,46 +90,47 @@
     BuildResult getBuildResult( int buildId )
         throws ContinuumException;
 
-    // ----------------------------------------------------------------------
-    // Maven 2.x projects.
-    // ----------------------------------------------------------------------
-
-    ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl )
+    Collection getBuildResultsForProject( int projectId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
-    // Maven 1.x projects
+    // Projects
     // ----------------------------------------------------------------------
 
-    ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl )
+    int addProject( Project project, String executorId )
         throws ContinuumException;
 
-    // ----------------------------------------------------------------------
-    // Projects
-    // ----------------------------------------------------------------------
+    ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl )
+        throws ContinuumException;
 
-    String addProject( ContinuumProject project, String executorId )
+    ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl )
         throws ContinuumException;
 
-    void updateProject( ContinuumProject project )
+    void updateProject( Project project )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
     // Notification
     // ----------------------------------------------------------------------
 
-    ProjectNotifier getNotifier( String projectId, String notifierType )
+    ProjectNotifier getNotifier( int projectId, String notifierType )
+        throws ContinuumException;
+
+    void updateNotifier( int projectId, String notifierType, Map configuration )
+        throws ContinuumException;
+
+    void addNotifier( int projectId, String notifierType, Map configuration )
         throws ContinuumException;
 
-    void updateNotifier( String projectId, String notifierType, Map configuration )
+    void removeNotifier( int projectId, String notifierType )
         throws ContinuumException;
 
-    void addNotifier( String projectId, String notifierType, Map configuration )
+    Project getProjectWithCheckoutResult( int projectId )
         throws ContinuumException;
 
-    void removeNotifier( String projectId, String notifierType )
+    Project getProjectWithAllDetails( int projectId )
         throws ContinuumException;
 
-    Collection getBuildResultsForProject( String projectId )
+    Project getProjectWithBuilds( int projectId )
         throws ContinuumException;
 }

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -17,7 +17,7 @@
  */
 
 import org.apache.maven.continuum.model.project.BuildDefinition;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 
 import java.io.File;
 
@@ -39,15 +39,9 @@
 
     String SHELL_EXECUTOR_ID = "shell";
 
-    /**
-     * @deprecated you need to give a build definition
-     */
-    ContinuumBuildExecutionResult build( ContinuumProject project, File buildOutput )
+    ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput )
         throws ContinuumBuildExecutorException;
 
-    ContinuumBuildExecutionResult build( ContinuumProject project, BuildDefinition buildDefinition, File buildOutput )
-        throws ContinuumBuildExecutorException;
-
-    void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    void updateProjectFromCheckOut( File workingDirectory, Project project )
         throws ContinuumBuildExecutorException;
 }

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcher.java Wed Aug 17 10:34:49 2005
@@ -17,7 +17,7 @@
  */
 
 import org.apache.maven.continuum.model.project.BuildResult;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -58,15 +58,15 @@
     //
     // ----------------------------------------------------------------------
 
-    void buildStarted( ContinuumProject project );
+    void buildStarted( Project project );
 
-    void checkoutStarted( ContinuumProject project );
+    void checkoutStarted( Project project );
 
-    void checkoutComplete( ContinuumProject project );
+    void checkoutComplete( Project project );
 
-    void runningGoals( ContinuumProject project, BuildResult build );
+    void runningGoals( Project project, BuildResult build );
 
-    void goalsCompleted( ContinuumProject project, BuildResult build );
+    void goalsCompleted( Project project, BuildResult build );
 
-    void buildComplete( ContinuumProject project, BuildResult build );
+    void buildComplete( Project project, BuildResult build );
 }

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java Wed Aug 17 10:34:49 2005
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
-import org.apache.maven.continuum.project.ContinuumProject;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -34,7 +34,7 @@
 
     private List warnings = new ArrayList();
 
-    public void addProject( ContinuumProject project )
+    public void addProject( Project project )
     {
         projects.add( project );
     }
@@ -44,7 +44,7 @@
         projectGroups.add( projectGroup );
     }
 
-    public void addProject( ContinuumProject project, String executorId )
+    public void addProject( Project project, String executorId )
     {
         project.setExecutorId( executorId );
 

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=233212&r1=233211&r2=233212&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 Wed Aug 17 10:34:49 2005
@@ -22,9 +22,7 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.project.Schedule;
-import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.model.system.Installation;
-import org.apache.maven.continuum.project.ContinuumProject;
 
 import java.io.File;
 import java.util.Collection;
@@ -39,31 +37,13 @@
 {
     String ROLE = ContinuumStore.class.getName();
 
-    ContinuumProject addProject( ContinuumProject project )
+    Project getProjectByName( String name )
         throws ContinuumStoreException;
 
-    void removeProject( String projectId )
+    String getBuildOutput( int buildId, int projectId )
         throws ContinuumStoreException;
 
-    ContinuumProject updateProject( ContinuumProject project )
-        throws ContinuumStoreException;
-
-    Collection getAllProjects()
-        throws ContinuumStoreException;
-
-    ContinuumProject getProjectByName( String name )
-        throws ContinuumStoreException;
-
-    ContinuumProject getProject( String projectId )
-        throws ContinuumStoreException;
-
-    ScmResult getScmResultForProject( String projectId )
-        throws ContinuumStoreException;
-
-    String getBuildOutput( int buildId, String projectId )
-        throws ContinuumStoreException;
-
-    File getBuildOutputFile( int buildId, String projectId )
+    File getBuildOutputFile( int buildId, int projectId )
         throws ContinuumStoreException;
 
     void removeNotifier( ProjectNotifier notifier )
@@ -75,7 +55,7 @@
     ProjectGroup addProjectGroup( ProjectGroup group );
 
     ProjectGroup getProjectGroup( int projectGroupId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
     void updateProjectGroup( ProjectGroup group )
         throws ContinuumStoreException;
@@ -99,7 +79,7 @@
     List getAllBuildsForAProjectByDate( int projectId );
 
     Project getProject( int projectId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
     void updateProject( Project project )
         throws ContinuumStoreException;
@@ -111,45 +91,50 @@
         throws ContinuumStoreException;
 
     Project getProjectWithBuilds( int projectId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
     void removeProfile( Profile profile );
 
     void removeSchedule( Schedule schedule );
 
     Project getProjectWithCheckoutResult( int projectId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     BuildResult getBuildResult( int buildId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     void removeProject( Project project );
 
     void removeProjectGroup( ProjectGroup projectGroup );
 
     ProjectGroup getProjectGroupWithBuildDetails( int projectGroupId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     List getAllProjectGroupsWithBuildDetails();
 
     Project getProjectWithAllDetails( int projectId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     Schedule getSchedule( int scheduleId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     Profile getProfile( int profileId )
-        throws ContinuumObjectNotFoundException;
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     ProjectGroup getProjectGroupByGroupId( String groupId )
-        throws ContinuumStoreException;
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
-    BuildResult getLatestBuildResultForProject( String projectId )
+    BuildResult getLatestBuildResultForProject( int projectId )
         throws ContinuumStoreException;
 
-    BuildResult addBuildResult( ContinuumProject project, BuildResult build )
-        throws ContinuumStoreException;
+    void addBuildResult( Project project, BuildResult build )
+        throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
     void updateBuildResult( BuildResult build )
         throws ContinuumStoreException;
+
+    Project addProject( Project project );
+
+    Project getProjectWithBuildDetails( int projectId )
+        throws ContinuumObjectNotFoundException, ContinuumStoreException;
 }

Modified: maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java (original)
+++ maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java Wed Aug 17 10:34:49 2005
@@ -18,8 +18,8 @@
 
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -68,7 +68,7 @@
         {
             Xpp3Dom project = projects[i];
 
-            ContinuumProject continuumProject = findProject( project.getChild( "schedule" ) );
+            Project continuumProject = findProject( project.getChild( "schedule" ) );
 
             // ----------------------------------------------------------------------
             // Create the project
@@ -140,7 +140,7 @@
         return result;
     }
 
-    private ContinuumProject findProject( Xpp3Dom schedule )
+    private Project findProject( Xpp3Dom schedule )
         throws ContinuumProjectBuilderException
     {
         if ( schedule == null )
@@ -148,7 +148,7 @@
             throw new ContinuumProjectBuilderException( "The configuration has to include a 'schedule' element." );
         }
 
-        ContinuumProject project = null;
+        Project project = null;
 
         Xpp3Dom[] children = schedule.getChildren();
 
@@ -169,7 +169,7 @@
                         "A configuration can only have a single 'ant' or 'maven' schedule." );
                 }
 
-                project = new ContinuumProject();
+                project = new Project();
 
                 project.setExecutorId( ContinuumBuildExecutor.ANT_EXECUTOR_ID );
 
@@ -188,7 +188,7 @@
                         "A configuration can only have a single 'ant' or 'maven' schedule." );
                 }
 
-                project = new ContinuumProject();
+                project = new Project();
 
                 project.setExecutorId( ContinuumBuildExecutor.MAVEN_ONE_EXECUTOR_ID );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AbstractIntegrationTest.java Wed Aug 17 10:34:49 2005
@@ -21,10 +21,10 @@
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ChangeFile;
 import org.apache.maven.continuum.model.scm.ChangeSet;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
@@ -84,6 +84,8 @@
 
     public static final String REMOTING_METHOD_XFIRE = "xfire";
 
+    private static final String CVS_COMMAND = "c:/cygwin/bin/cvs";
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -169,7 +171,7 @@
 
         for ( Iterator it = collection.iterator(); it.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) it.next();
+            Project project = (Project) it.next();
 
             continuum.removeProject( project.getId() );
         }
@@ -182,6 +184,7 @@
     {
         Date endTime = new Date();
 
+        progress( "Tearing down test - ignore any interrupted exceptions" );
         super.tearDown();
 
         long diff = endTime.getTime() - startTime.getTime();
@@ -357,7 +360,7 @@
     //
     // ----------------------------------------------------------------------
 
-    protected String getProjectId( ContinuumProjectBuildingResult buildingResult )
+    protected int getProjectId( ContinuumProjectBuildingResult buildingResult )
     {
         List warnings = buildingResult.getWarnings();
 
@@ -383,11 +386,11 @@
         }
         else if ( projects.size() > 1 )
         {
-            String ids = "[" + ( (ContinuumProject) projects.get( 0 ) ).getId();
+            String ids = "[" + ( (Project) projects.get( 0 ) ).getId();
 
             for ( Iterator it = projects.iterator(); it.hasNext(); )
             {
-                ContinuumProject project = (ContinuumProject) it.next();
+                Project project = (Project) it.next();
 
                 ids += ", " + project.getId();
             }
@@ -397,21 +400,23 @@
             fail( "When adding a project only a single project was expected to be added, project ids: " + ids );
         }
 
-        return ( (ContinuumProject) projects.get( 0 ) ).getId();
+        return ( (Project) projects.get( 0 ) ).getId();
     }
 
     /**
      * @todo use a notify mechanism rather than polling. That's what queues are for. Really, buildProject should create the build result with a WAITING state, return the ID, and let the queue take it from there
      */
-    public BuildResult buildProject( String projectId, boolean force )
+    public BuildResult buildProject( int projectId, boolean force )
         throws Exception
     {
-        int count = 600;
+        int timeout = 60 * 1000;
 
         BuildResult previousBuild = getContinuum().getLatestBuildResultForProject( projectId );
 
         getContinuum().buildProject( projectId, force );
 
+        long start = System.currentTimeMillis();
+
         while ( true )
         {
             BuildResult latestBuildResult = getContinuum().getLatestBuildResultForProject( projectId );
@@ -421,18 +426,16 @@
                 return latestBuildResult;
             }
 
-            if ( count == 0 )
+            if ( System.currentTimeMillis() - start > timeout )
             {
                 fail( "Timeout while waiting for build. Project id: " + projectId );
             }
 
-            count--;
-
             Thread.yield();
         }
     }
 
-    public void removeProject( String projectId )
+    public void removeProject( int projectId )
         throws Exception
     {
         getContinuum().removeProject( projectId );
@@ -449,34 +452,34 @@
         }
     }
 
-    public ContinuumProject waitForCheckout( String projectId )
+    public Project waitForCheckout( int projectId )
         throws Exception
     {
         long timeout = 60 * 1000;
 
         long start = System.currentTimeMillis();
 
-        ContinuumProject project = getContinuum().getProject( projectId );
+        Project project = getContinuum().getProjectWithCheckoutResult( projectId );
 
         while ( project.getCheckoutResult() == null )
         {
             if ( System.currentTimeMillis() - start > timeout )
             {
-                fail( "Timeout while waiting for project '" + project.getName() + "' to be checked out." );
+                fail( "Timeout while waiting for project '" + projectId + "' to be checked out." );
             }
 
             Thread.yield();
 
-            project = getContinuum().getProject( projectId );
+            project = getContinuum().getProjectWithCheckoutResult( projectId );
         }
 
         return project;
     }
 
-    public void waitForSuccessfulCheckout( String projectId )
+    public void waitForSuccessfulCheckout( int projectId )
         throws Exception
     {
-        ContinuumProject project = waitForCheckout( projectId );
+        Project project = waitForCheckout( projectId );
 
         String message = "The check out was not successful for project #" + project.getId() + ": ";
 
@@ -529,8 +532,8 @@
     // Assertions
     // ----------------------------------------------------------------------
 
-    public void assertProject( String projectId, String name, String version, String commandLineArguments,
-                               String executorId, ContinuumProject project )
+    public void assertProject( int projectId, String name, String version, String commandLineArguments,
+                               String executorId, Project project )
     {
         assertEquals( "project.id", projectId, project.getId() );
         assertEquals( "project.name", name, project.getName() );
@@ -538,7 +541,7 @@
         assertEquals( "project.executorId", executorId, project.getExecutorId() );
     }
 
-    public void assertCheckedOutFiles( ContinuumProject project, String[] expectedCheckedOutFiles )
+    public void assertCheckedOutFiles( Project project, String[] expectedCheckedOutFiles )
     {
         assertNotNull( "project.scmResult", project.getCheckoutResult() );
 
@@ -596,7 +599,7 @@
         return build;
     }
 
-    public BuildResult assertSuccessfulBuild( int buildId, String projectId )
+    public BuildResult assertSuccessfulBuild( int buildId, int projectId )
         throws Exception
     {
         BuildResult build = waitForBuild( buildId );
@@ -621,19 +624,19 @@
         return build;
     }
 
-    public BuildResult assertSuccessfulMaven1Build( int buildId, String projectId )
+    public BuildResult assertSuccessfulMaven1Build( int buildId, int projectId )
         throws Exception
     {
         return assertSuccessfulAntBuild( buildId, projectId );
     }
 
-    public BuildResult assertSuccessfulMaven2Build( int buildId, String projectId )
+    public BuildResult assertSuccessfulMaven2Build( int buildId, int projectId )
         throws Exception
     {
         return assertSuccessfulMaven1Build( buildId, projectId );
     }
 
-    public BuildResult assertSuccessfulAntBuild( int buildId, String projectId )
+    public BuildResult assertSuccessfulAntBuild( int buildId, int projectId )
         throws Exception
     {
         BuildResult build = assertSuccessfulBuild( buildId, projectId );
@@ -649,7 +652,7 @@
         return build;
     }
 
-    public BuildResult assertSuccessfulShellBuild( int buildId, String projectId, String expectedStandardOutput )
+    public BuildResult assertSuccessfulShellBuild( int buildId, int projectId, String expectedStandardOutput )
         throws Exception
     {
         BuildResult build = assertSuccessfulBuild( buildId, projectId );
@@ -672,7 +675,7 @@
 
         deleteAndCreateDirectory( cvsRoot );
 
-        system( cvsRoot, "cvs", " -d " + cvsRoot.getAbsolutePath() + " init" );
+        system( cvsRoot, CVS_COMMAND, " -d " + cvsRoot.getAbsolutePath() + " init" );
     }
 
     protected void scmImport( File root, String artifactId, String scm, File scmRoot )
@@ -691,7 +694,7 @@
     protected void cvsImport( File root, String artifactId, File scmRoot )
         throws CommandLineException
     {
-        system( root, "cvs",
+        system( root, CVS_COMMAND,
                 "-d " + scmRoot.getAbsolutePath() + " import -m yo_yo " + artifactId + " continuum_test start" );
     }
 
@@ -704,14 +707,14 @@
     protected void cvsCheckout( File cvsRoot, String module, File coDir )
         throws CommandLineException
     {
-        system( new File( getBasedir() ), "cvs",
+        system( new File( getBasedir() ), CVS_COMMAND,
                 "-d " + cvsRoot.getAbsolutePath() + " checkout -d " + coDir.getAbsolutePath() + " " + module );
     }
 
     protected void cvsCommit( File coDir )
         throws CommandLineException
     {
-        system( coDir, "cvs", new String[]{"commit -m ", "-"} );
+        system( coDir, CVS_COMMAND, new String[]{"commit -m ", "-"} );
     }
 
     protected void initializeSvnRoot()

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java Wed Aug 17 10:34:49 2005
@@ -20,8 +20,8 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
 import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
@@ -52,7 +52,7 @@
 
         progress( "Adding Ant SVN project" );
 
-        ContinuumProject p = new ContinuumProject();
+        Project p = new Project();
         p.setScmUrl( makeScmUrl( "svn", getSvnRoot(), "ant-svn" ) );
         p.setName( "Ant SVN Project" );
 //        p.getNotifiers().add( makeMailNotifier( email ) );
@@ -64,11 +64,11 @@
         bd.setGoals( "clean build" );
         p.addBuildDefinition( bd );
 
-        String projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID );
+        int projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID );
 
         waitForSuccessfulCheckout( projectId );
 
-        ContinuumProject project = continuum.getProject( projectId );
+        Project project = continuum.getProject( projectId );
 
         assertProject( projectId, "Ant SVN Project", "3.0", "-v", "ant", project );
 
@@ -96,7 +96,7 @@
 
         cvsImport( root, "ant-cvs", getCvsRoot() );
 
-        ContinuumProject p = new ContinuumProject();
+        Project p = new Project();
         p.setScmUrl( makeScmUrl( "cvs", getCvsRoot(), "ant-cvs" ) );
         p.setName( "Ant CVS Project" );
 //        p.getNotifiers().add( makeMailNotifier( email ) );
@@ -108,11 +108,11 @@
         bd.setGoals( "clean build" );
         p.addBuildDefinition( bd );
 
-        String projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID );
+        int projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID );
 
         waitForSuccessfulCheckout( projectId );
 
-        ContinuumProject project = continuum.getProject( projectId );
+        Project project = continuum.getProject( projectId );
         assertProject( projectId, "Ant CVS Project", "3.0", "-debug", AntBuildExecutor.ID, project );
 
         progress( "Building CVS Ant project" );

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java Wed Aug 17 10:34:49 2005
@@ -19,9 +19,9 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.xmlrpc.XmlRpcHelper;
 import org.apache.xmlrpc.XmlRpcClient;
@@ -91,19 +91,19 @@
     // Project
     // ----------------------------------------------------------------------
 
-    public void removeProject( String projectId )
+    public void removeProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void checkoutProject( String projectId )
+    public void checkoutProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public ContinuumProject getProject( String projectId )
+    public Project getProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -112,7 +112,7 @@
     public Collection getAllProjects( int start, int end )
         throws ContinuumException
     {
-        return (Collection) invoke( "getProjects", new Object[]{}, ContinuumProject.class );
+        return (Collection) invoke( "getProjects", new Object[]{}, Project.class );
     }
 
     public List getProjectsInBuildOrder()
@@ -121,13 +121,13 @@
         throw new UnsupportedOperationException();
     }
 
-    public ScmResult getScmResultForProject( String projectId )
+    public ScmResult getScmResultForProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public ScmResult getCheckOutScmResultForProject( String projectId )
+    public ScmResult getCheckOutScmResultForProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -139,7 +139,7 @@
         throw new UnsupportedOperationException();
     }
 
-    public BuildResult getLatestBuildResultForProject( String projectId )
+    public BuildResult getLatestBuildResultForProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -149,7 +149,7 @@
     // Queues
     // ----------------------------------------------------------------------
 
-    public boolean isInBuildingQueue( String projectId )
+    public boolean isInBuildingQueue( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -171,13 +171,13 @@
         throw new UnsupportedOperationException();
     }
 
-    public void buildProject( String projectId )
+    public void buildProject( int projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void buildProject( String projectId, boolean force )
+    public void buildProject( int projectId, boolean force )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -208,25 +208,25 @@
     // Notification
     // ----------------------------------------------------------------------
 
-    public ProjectNotifier getNotifier( String projectId, String notifierType )
+    public ProjectNotifier getNotifier( int projectId, String notifierType )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void updateNotifier( String projectId, String notifierType, Map configuration )
+    public void updateNotifier( int projectId, String notifierType, Map configuration )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void addNotifier( String projectId, String notifierType, Map configuration )
+    public void addNotifier( int projectId, String notifierType, Map configuration )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
     }
 
-    public void removeNotifier( String projectId, String notifierType )
+    public void removeNotifier( int projectId, String notifierType )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java Wed Aug 17 10:34:49 2005
@@ -18,7 +18,7 @@
 
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 
@@ -49,11 +49,11 @@
 
         progress( "Adding Maven 1 project" );
 
-        String projectId = getProjectId( continuum.addMavenOneProject( getFileUrl( root ) + "/project.xml" ) );
+        int projectId = getProjectId( continuum.addMavenOneProject( getFileUrl( root ) + "/project.xml" ) );
 
         waitForSuccessfulCheckout( projectId );
 
-        ContinuumProject project = continuum.getProject( projectId );
+        Project project = continuum.getProjectWithCheckoutResult( projectId );
 
         assertProject( projectId, "Maven 1 Project", "1.0", "", MavenOneBuildExecutor.ID, project );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java Wed Aug 17 10:34:49 2005
@@ -19,8 +19,8 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
@@ -51,12 +51,11 @@
 
         progress( "Adding Maven 2 project" );
 
-        String projectId = getProjectId(
-            continuum.addMavenTwoProject( "file:" + root.getAbsolutePath() + "/pom.xml" ) );
+        int projectId = getProjectId( continuum.addMavenTwoProject( "file:" + root.getAbsolutePath() + "/pom.xml" ) );
 
         waitForSuccessfulCheckout( projectId );
 
-        ContinuumProject project = continuum.getProject( projectId );
+        Project project = continuum.getProjectWithAllDetails( projectId );
 
         assertProject( projectId, "Maven 2 Project", "2.0-SNAPSHOT", "-N -B", MavenTwoBuildExecutor.ID, project );
 
@@ -75,7 +74,8 @@
 
         progress( "Building Maven 2 project" );
 
-        int originalSize = project.getBuilds().size();
+        project = continuum.getProjectWithBuilds( projectId );
+        int originalSize = project.getBuildResults().size();
 
         int buildId = buildProject( projectId, false ).getId();
 
@@ -83,8 +83,8 @@
 
         progress( "Test that a build without any files changed won't execute the executor" );
 
-        project = continuum.getProject( projectId );
-        int expectedSize = project.getBuilds().size();
+        project = continuum.getProjectWithBuilds( projectId );
+        int expectedSize = project.getBuildResults().size();
 
         assertEquals( "build list was not updated", originalSize + 1, expectedSize );
 
@@ -92,8 +92,8 @@
 
         Thread.sleep( 3000 );
 
-        project = continuum.getProject( projectId );
-        int actualSize = project.getBuilds().size();
+        project = continuum.getProjectWithBuilds( projectId );
+        int actualSize = project.getBuildResults().size();
 
         assertEquals( "A build has unexpectedly been executed.", expectedSize, actualSize );
 
@@ -133,7 +133,7 @@
         cvsImport( basedir, artifactId, getCvsRoot() );
     }
 
-    private void removeNotifier( String projectId, String notifierType )
+    private void removeNotifier( int projectId, String notifierType )
     {
         try
         {

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java (original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java Wed Aug 17 10:34:49 2005
@@ -19,7 +19,7 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
 import org.apache.maven.continuum.model.project.BuildDefinition;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 
@@ -52,7 +52,7 @@
 
         progress( "Adding CVS Shell project" );
 
-        ContinuumProject p = new ContinuumProject();
+        Project p = new Project();
         p.setScmUrl( "scm|cvs|local|" + getCvsRoot() + "|shell" );
         p.setName( "Shell Project" );
 //        p.getNotifiers().add( makeMailNotifier( email ) );
@@ -63,10 +63,10 @@
         bd.setBuildFile( getScriptName() );
         p.addBuildDefinition( bd );
 
-        String projectId = continuum.addProject( p, ShellBuildExecutor.SHELL_EXECUTOR_ID );
+        int projectId = continuum.addProject( p, ShellBuildExecutor.SHELL_EXECUTOR_ID );
         waitForSuccessfulCheckout( projectId );
 
-        ContinuumProject project = continuum.getProject( projectId );
+        Project project = continuum.getProject( projectId );
         assertProject( projectId, "Shell Project", "3.0", "", "shell", project );
         progress( "Building Shell project" );
         int buildId = buildProject( projectId, false ).getId();
@@ -84,12 +84,13 @@
 
         cvsCommit( coDir );
 
-        ContinuumProject shellProject = continuum.getProject( projectId );
+        Project shellProject = continuum.getProjectWithAllDetails( projectId );
         bd = (BuildDefinition) shellProject.getBuildDefinitions().iterator().next();
         bd.setArguments( "a b" );
         continuum.updateProject( shellProject );
 
-        shellProject = continuum.getProject( projectId );
+        // TODO: change all details to build details
+        shellProject = continuum.getProjectWithAllDetails( projectId );
         // TODO: better way?
         bd = (BuildDefinition) shellProject.getBuildDefinitions().iterator().next();
         assertEquals( "Updated command line arguments doesn't match", "a b", bd.getArguments() );

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=233212&r1=233211&r2=233212&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 Wed Aug 17 10:34:49 2005
@@ -26,15 +26,12 @@
 import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
 import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
 import org.apache.maven.continuum.core.action.StoreProjectAction;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.apache.maven.continuum.initialization.ContinuumInitializer;
 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 org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.project.builder.maven.MavenOneContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
@@ -121,26 +118,19 @@
     public Collection getProjects()
         throws ContinuumException
     {
-        try
-        {
-            return store.getAllProjects();
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Error while getting all projects.", e );
-        }
+        return store.getAllProjectsByName();
     }
 
-    public BuildResult getLatestBuildResultForProject( String id )
+    public BuildResult getLatestBuildResultForProject( int projectId )
         throws ContinuumException
     {
         try
         {
-            return store.getLatestBuildResultForProject( id );
+            return store.getLatestBuildResultForProject( projectId );
         }
         catch ( ContinuumStoreException e )
         {
-            throw logAndCreateException( "Error while getting the last build for project '" + id + "'.", e );
+            throw logAndCreateException( "Error while getting the last build for project '" + projectId + "'.", e );
         }
     }
 
@@ -148,7 +138,7 @@
     // Queues
     // ----------------------------------------------------------------------
 
-    public boolean isInBuildingQueue( String id )
+    public boolean isInBuildingQueue( int projectId )
         throws ContinuumException
     {
         List queue;
@@ -166,7 +156,7 @@
         {
             BuildProjectTask task = (BuildProjectTask) it.next();
 
-            if ( task.getProjectId().equals( id ) )
+            if ( task.getProjectId() == projectId )
             {
                 return true;
             }
@@ -179,12 +169,12 @@
     //
     // ----------------------------------------------------------------------
 
-    public void removeProject( String projectId )
+    public void removeProject( int projectId )
         throws ContinuumException
     {
         try
         {
-            store.removeProject( projectId );
+            store.removeProject( store.getProject( projectId ) );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -192,17 +182,17 @@
         }
     }
 
-    public void checkoutProject( String id )
+    public void checkoutProject( int projectId )
         throws ContinuumException
     {
         Map context = new HashMap();
 
-        context.put( AddProjectToCheckOutQueueAction.KEY_PROJECT_ID, id );
+        context.put( AddProjectToCheckOutQueueAction.KEY_PROJECT_ID, new Integer( projectId ) );
 
         executeAction( "add-project-to-checkout-queue", context );
     }
 
-    public ContinuumProject getProject( String projectId )
+    public Project getProject( int projectId )
         throws ContinuumException
     {
         try
@@ -218,27 +208,7 @@
     public Collection getAllProjects( int start, int end )
         throws ContinuumException
     {
-        try
-        {
-            return store.getAllProjects();
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting projects.", ex );
-        }
-    }
-
-    public ScmResult getScmResultForProject( String projectId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getScmResultForProject( projectId );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw logAndCreateException( "Exception while getting check out scm result for project.", ex );
-        }
+        return store.getAllProjectsByName();
     }
 
     // ----------------------------------------------------------------------
@@ -256,7 +226,7 @@
     {
         for ( Iterator i = getProjects().iterator(); i.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) i.next();
+            Project project = (Project) i.next();
 
             buildProject( project.getId(), force );
         }
@@ -285,18 +255,18 @@
         */
     }
 
-    public void buildProject( String projectId )
+    public void buildProject( int projectId )
         throws ContinuumException
     {
         buildProject( projectId, true );
     }
 
-    public void buildProject( String projectId, boolean force )
+    public void buildProject( int projectId, boolean force )
         throws ContinuumException
     {
         try
         {
-            ContinuumProject project = store.getProject( projectId );
+            Project project = store.getProject( projectId );
 
             getLogger().info( "Enqueuing '" + project.getName() + "'." );
 
@@ -319,7 +289,7 @@
         {
             return store.getBuildResult( buildId );
         }
-        catch ( ContinuumObjectNotFoundException e )
+        catch ( ContinuumStoreException e )
         {
             throw logAndCreateException( "Exception while getting build result for project.", e );
         }
@@ -342,8 +312,7 @@
     public ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl )
         throws ContinuumException
     {
-        return executeAddProjectsFromMetadataActivity( metadataUrl, MavenOneContinuumProjectBuilder.ID,
-                                                       MavenOneBuildExecutor.ID );
+        return executeAddProjectsFromMetadataActivity( metadataUrl, MavenOneContinuumProjectBuilder.ID );
     }
 
     // ----------------------------------------------------------------------
@@ -353,15 +322,14 @@
     public ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl )
         throws ContinuumException
     {
-        return executeAddProjectsFromMetadataActivity( metadataUrl, MavenTwoContinuumProjectBuilder.ID,
-                                                       MavenTwoBuildExecutor.ID );
+        return executeAddProjectsFromMetadataActivity( metadataUrl, MavenTwoContinuumProjectBuilder.ID );
     }
 
     // ----------------------------------------------------------------------
     // Shell projects
     // ----------------------------------------------------------------------
 
-    public String addProject( ContinuumProject project, String executorId )
+    public int addProject( Project project, String executorId )
         throws ContinuumException
     {
         project.setExecutorId( executorId );
@@ -373,7 +341,7 @@
     // Activities. These should end up as workflows in werkflow
     // ----------------------------------------------------------------------
 
-    private String executeAddProjectFromScmActivity( ContinuumProject project )
+    private int executeAddProjectFromScmActivity( Project project )
         throws ContinuumException
     {
         Map context = new HashMap();
@@ -392,12 +360,11 @@
 
         executeAction( "add-project-to-checkout-queue", context );
 
-        return (String) context.get( StoreProjectAction.KEY_PROJECT_ID );
+        return ( (Integer) context.get( StoreProjectAction.KEY_PROJECT_ID ) ).intValue();
     }
 
     private ContinuumProjectBuildingResult executeAddProjectsFromMetadataActivity( String metadataUrl,
-                                                                                   String projectBuilderId,
-                                                                                   String buildExecutorId )
+                                                                                   String projectBuilderId )
         throws ContinuumException
     {
         Map context = new HashMap();
@@ -489,35 +456,35 @@
 
         for ( Iterator i = projects.iterator(); i.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) i.next();
+            Project project = (Project) i.next();
 
-            project.setExecutorId( buildExecutorId );
-
-            try
-            {
-                project = store.addProject( project );
+            projectGroup.addProject( project );
+        }
 
-                // TODO: store operation for this instead
-//                projectGroup.addProject( project );
+        try
+        {
+            store.updateProjectGroup( projectGroup );
 
-                store.updateProjectGroup( projectGroup );
-            }
-            catch ( ContinuumStoreException e )
+            for ( Iterator i = projects.iterator(); i.hasNext(); )
             {
-                throw new ContinuumException( "crap", e );
-            }
+                Project project = (Project) i.next();
 
-            context = new HashMap();
+                context = new HashMap();
 
-            context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
+                context.put( AbstractContinuumAction.KEY_UNVALIDATED_PROJECT, project );
 //
 //            executeAction( "validate-project", context );
 //
 //            executeAction( "store-project", context );
 //
-            context.put( AbstractContinuumAction.KEY_PROJECT_ID, project.getId() );
+                context.put( AbstractContinuumAction.KEY_PROJECT_ID, new Integer( project.getId() ) );
 
-            executeAction( "add-project-to-checkout-queue", context );
+                executeAction( "add-project-to-checkout-queue", context );
+            }
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error adding projects from modules", e );
         }
 
         return result;
@@ -530,10 +497,10 @@
     // This whole section needs a scrub but will need to be dealt with generally
     // when we add schedules and profiles to the mix.
 
-    public ProjectNotifier getNotifier( String projectId, String notifierType )
+    public ProjectNotifier getNotifier( int projectId, String notifierType )
         throws ContinuumException
     {
-        ContinuumProject project = getProject( projectId );
+        Project project = getProject( projectId );
 
         List notifiers = project.getNotifiers();
 
@@ -552,7 +519,7 @@
         return notifier;
     }
 
-    public void updateNotifier( String projectId, String notifierType, Map configuration )
+    public void updateNotifier( int projectId, String notifierType, Map configuration )
         throws ContinuumException
     {
         ProjectNotifier notifier = getNotifier( projectId, notifierType );
@@ -583,7 +550,7 @@
         return notifierProperties;
     }
 
-    public void addNotifier( String projectId, String notifierType, Map configuration )
+    public void addNotifier( int projectId, String notifierType, Map configuration )
         throws ContinuumException
     {
         ProjectNotifier notifier = new ProjectNotifier();
@@ -598,14 +565,14 @@
 
         notifier.setConfiguration( notifierProperties );
 
-        ContinuumProject project = getProject( projectId );
+        Project project = getProject( projectId );
 
         project.addNotifier( notifier );
 
         updateProject( project );
     }
 
-    public void removeNotifier( String projectId, String notifierType )
+    public void removeNotifier( int projectId, String notifierType )
         throws ContinuumException
     {
         ProjectNotifier n = getNotifier( projectId, notifierType );
@@ -646,18 +613,11 @@
 
         getLogger().info( "Showing all projects: " );
 
-        try
+        for ( Iterator it = store.getAllProjectsByName().iterator(); it.hasNext(); )
         {
-            for ( Iterator it = store.getAllProjects().iterator(); it.hasNext(); )
-            {
-                ContinuumProject project = (ContinuumProject) it.next();
+            Project project = (Project) it.next();
 
-                getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getExecutorId() );
-            }
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw new InitializationException( "Couldn't load projects.", e );
+            getLogger().info( " " + project.getId() + ":" + project.getName() + ":" + project.getExecutorId() );
         }
     }
 
@@ -712,12 +672,12 @@
         stopMessage();
     }
 
-    public Collection getBuildResultsForProject( String projectId )
+    public Collection getBuildResultsForProject( int projectId )
         throws ContinuumException
     {
         try
         {
-            return store.getProject( projectId ).getBuilds();
+            return store.getProject( projectId ).getBuildResults();
         }
         catch ( ContinuumStoreException e )
         {
@@ -770,7 +730,7 @@
 
     // core
 
-    public void updateProject( ContinuumProject project )
+    public void updateProject( Project project )
         throws ContinuumException
     {
         try
@@ -866,6 +826,57 @@
         catch ( IOException e )
         {
             return "unknown";
+        }
+    }
+
+    public Project getProjectWithCheckoutResult( int projectId )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.getProjectWithCheckoutResult( projectId );
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            throw new ContinuumException( "Unable to find the requested project", e );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error retrieving the requested project", e );
+        }
+    }
+
+    public Project getProjectWithAllDetails( int projectId )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.getProjectWithAllDetails( projectId );
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            throw new ContinuumException( "Unable to find the requested project", e );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error retrieving the requested project", e );
+        }
+    }
+
+    public Project getProjectWithBuilds( int projectId )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.getProjectWithBuilds( projectId );
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            throw new ContinuumException( "Unable to find the requested project", e );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error retrieving the requested project", e );
         }
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java Wed Aug 17 10:34:49 2005
@@ -24,5 +24,5 @@
 {
     String ROLE = BuildController.class.getName();
 
-    void build( String projectId, boolean forced );
+    void build( int projectId, boolean forced );
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Wed Aug 17 10:34:49 2005
@@ -18,9 +18,9 @@
 
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.ContinuumScmException;
 import org.apache.maven.continuum.store.ContinuumStore;
@@ -69,7 +69,7 @@
     /**
      * @todo structure of this method is a bit of a mess (too much exception/finally code)
      */
-    public void build( String projectId, boolean forced )
+    public void build( int projectId, boolean forced )
     {
         long startTime = System.currentTimeMillis();
 
@@ -80,9 +80,9 @@
         // if these calls fail we're screwed anyway
         // and it will only be logged through the logger.
 
-        ContinuumProject project;
+        Project project;
 
-        int buildId = 0;
+        BuildResult build = null;
 
         try
         {
@@ -107,7 +107,7 @@
 
             Map actionContext = new HashMap();
 
-            actionContext.put( AbstractContinuumAction.KEY_PROJECT_ID, projectId );
+            actionContext.put( AbstractContinuumAction.KEY_PROJECT_ID, new Integer( projectId ) );
 
             actionContext.put( AbstractContinuumAction.KEY_FORCED, Boolean.valueOf( forced ) );
 
@@ -146,7 +146,7 @@
                     if ( !StringUtils.isEmpty( checkoutErrorMessage ) ||
                         !StringUtils.isEmpty( checkoutErrorException ) || checkOutScmResult == null )
                     {
-                        BuildResult build = makeBuildResult( scmResult, startTime, forced );
+                        build = makeBuildResult( scmResult, startTime, forced );
 
                         String error = "";
 
@@ -164,7 +164,7 @@
 
                         build.setError( error );
 
-                        buildId = storeBuild( project, build ).getId();
+                        store.addBuildResult( project, build );
 
                         return;
                     }
@@ -178,14 +178,25 @@
 
                 actionManager.lookup( "execute-builder" ).execute( actionContext );
 
-                buildId = Integer.valueOf(
-                    (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID ) ).intValue();
+                String s = (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID );
+                if ( s != null )
+                {
+                    build = store.getBuildResult( Integer.valueOf( s ).intValue() );
+                }
             }
             catch ( Throwable e )
             {
                 getLogger().error( "Error while building project.", e );
 
-                BuildResult build = makeBuildResult( scmResult, startTime, forced );
+                String s = (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID );
+                if ( s != null )
+                {
+                    build = store.getBuildResult( Integer.valueOf( s ).intValue() );
+                }
+                else
+                {
+                    build = makeBuildResult( scmResult, startTime, forced );
+                }
 
                 // This can happen if the "update project from scm" action fails
 
@@ -222,7 +233,14 @@
 
                 build.setError( error );
 
-                buildId = storeBuild( project, build ).getId();
+                if ( s != null )
+                {
+                    store.updateBuildResult( build );
+                }
+                else
+                {
+                    store.addBuildResult( project, build );
+                }
 
                 project.setState( ContinuumProjectState.ERROR );
             }
@@ -236,20 +254,6 @@
         }
         finally
         {
-            BuildResult build = null;
-
-            if ( buildId > 0 )
-            {
-                try
-                {
-                    build = store.getBuildResult( buildId );
-                }
-                catch ( ContinuumStoreException e )
-                {
-                    // ignore
-                }
-            }
-
             notifierDispatcher.buildComplete( project, build );
         }
     }
@@ -258,17 +262,6 @@
     //
     // ----------------------------------------------------------------------
 
-    // TODO: can we remove? surely you only need one add (see ExecuteBuilderContinuumAction). This only ever creates errored builds, maybe it occurs before that
-    private BuildResult storeBuild( ContinuumProject project, BuildResult build )
-        throws ContinuumStoreException
-    {
-        build = store.addBuildResult( project, build );
-
-        getLogger().info( "Build id: '" + build.getId() + "'." );
-
-        return build;
-    }
-
     private BuildResult makeBuildResult( ScmResult scmResult, long startTime, boolean forced )
     {
         BuildResult build = new BuildResult();
@@ -285,12 +278,5 @@
         build.setScmResult( scmResult );
 
         return build;
-    }
-
-    // Check to see if there is only a single build in the builds list.
-    public boolean isNew( ContinuumProject project )
-        throws ContinuumStoreException
-    {
-        return project.getBuilds().size() == 0;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/BuildProjectTask.java Wed Aug 17 10:34:49 2005
@@ -25,13 +25,13 @@
 public class BuildProjectTask
     implements Task
 {
-    private String projectId;
+    private int projectId;
 
     private long timestamp;
 
     private boolean forced;
 
-    public BuildProjectTask( String projectId, boolean forced )
+    public BuildProjectTask( int projectId, boolean forced )
     {
         this.projectId = projectId;
 
@@ -40,7 +40,7 @@
         this.forced = forced;
     }
 
-    public String getProjectId()
+    public int getProjectId()
     {
         return projectId;
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java Wed Aug 17 10:34:49 2005
@@ -35,7 +35,9 @@
     extends AbstractLogEnabled
     implements TaskViabilityEvaluator
 {
-    /** @plexus.configuration */
+    /**
+     * @plexus.configuration
+     */
     private long requiredBuildInterval;
 
     // ----------------------------------------------------------------------
@@ -58,13 +60,14 @@
         {
             BuildProjectTask task = (BuildProjectTask) it.next();
 
-            List projectTasks = (List) projects.get( task.getProjectId() );
+            Integer key = new Integer( task.getProjectId() );
+            List projectTasks = (List) projects.get( key );
 
             if ( projectTasks == null )
             {
                 projectTasks = new ArrayList();
 
-                projects.put( task.getProjectId(), projectTasks );
+                projects.put( key, projectTasks );
             }
 
             projectTasks.add( task );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Wed Aug 17 10:34:49 2005
@@ -16,9 +16,9 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.action.AbstractAction;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -78,9 +78,9 @@
     //
     // ----------------------------------------------------------------------
 
-    public static String getProjectId( Map context )
+    public static int getProjectId( Map context )
     {
-        return getString( context, KEY_PROJECT_ID );
+        return getInteger( context, KEY_PROJECT_ID );
     }
 
     public static int getProjectGroupId( Map context )
@@ -98,9 +98,9 @@
         return getBoolean( context, KEY_FORCED );
     }
 
-    public static ContinuumProject getUnvalidatedProject( Map context )
+    public static Project getUnvalidatedProject( Map context )
     {
-        return (ContinuumProject) getObject( context, KEY_UNVALIDATED_PROJECT );
+        return (Project) getObject( context, KEY_UNVALIDATED_PROJECT );
     }
 
     public static ProjectGroup getUnvalidatedProjectGroup( Map context )
@@ -155,6 +155,11 @@
     public static boolean getBoolean( Map context, String key )
     {
         return ( (Boolean) getObject( context, key ) ).booleanValue();
+    }
+
+    private static int getInteger( Map context, String key )
+    {
+        return ( (Integer) getObject( context, key, null ) ).intValue();
     }
 
     private static Object getObject( Map context, String key )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Wed Aug 17 10:34:49 2005
@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
+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.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
 import java.util.Map;
@@ -31,7 +31,9 @@
 public class AddProjectToCheckOutQueueAction
     extends AbstractContinuumAction
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private WorkingDirectoryService workingDirectoryService;
 
     private TaskQueue checkOutQueue;
@@ -41,7 +43,7 @@
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProject( getProjectId( context ) );
 
         CheckOutTask checkOutTask = new CheckOutTask( project.getId(),
                                                       workingDirectoryService.getWorkingDirectory( project ) );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Wed Aug 17 10:34:49 2005
@@ -16,9 +16,9 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
-import org.apache.maven.continuum.utils.WorkingDirectoryService;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.utils.WorkingDirectoryService;
 
 import java.io.File;
 import java.util.Map;
@@ -43,7 +43,7 @@
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProject( getProjectId( context ) );
 
         File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Wed Aug 17 10:34:49 2005
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.ContinuumScm;
 import org.apache.maven.continuum.scm.ContinuumScmException;
 import org.apache.maven.continuum.store.ContinuumStore;
@@ -42,7 +42,7 @@
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProject( getProjectId( context ) );
 
         File workingDirectory = getWorkingDirectory( context );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadata.java Wed Aug 17 10:34:49 2005
@@ -7,8 +7,8 @@
 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.ContinuumProjectBuilderManagerException;
 import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
+import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManagerException;
 
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -30,9 +30,7 @@
     public static final String KEY_PROJECT_BUILDING_RESULT = "projectBuildingResult";
 
     public void execute( Map context )
-        throws ContinuumException,
-               ContinuumProjectBuilderManagerException,
-               ContinuumProjectBuilderException
+        throws ContinuumException, ContinuumProjectBuilderManagerException, ContinuumProjectBuilderException
     {
         String projectBuilderId = getString( context, KEY_PROJECT_BUILDER_ID );
 



Mime
View raw message