continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r233212 [2/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
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Wed Aug 17 10:34:49 2005
@@ -19,16 +19,18 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
+import org.apache.maven.continuum.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.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.store.ContinuumStore;
 import org.apache.maven.continuum.utils.ContinuumUtils;
 
 import java.io.File;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -51,7 +53,7 @@
         // Get parameters from the context
         // ----------------------------------------------------------------------
 
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProjectWithBuildDetails( getProjectId( context ) );
 
         boolean forced = isForced( context );
 
@@ -83,19 +85,25 @@
         // TODO: set trigger properly
         build.setTrigger( forced ? ContinuumProjectState.TRIGGER_FORCED : ContinuumProjectState.TRIGGER_UNKNOWN );
 
+        // TODO: select actualy build def
+        List buildDefinitions = project.getBuildDefinitions();
+        BuildDefinition buildDefinition = (BuildDefinition) buildDefinitions.iterator().next();
+
         build.setScmResult( scmResult );
 
-        build = store.addBuildResult( project, build );
+        store.addBuildResult( project, build );
 
         context.put( KEY_BUILD_ID, Integer.toString( build.getId() ) );
 
+        build = store.getBuildResult( build.getId() );
+
         try
         {
             notifier.runningGoals( project, build );
 
             File buildOutputFile = store.getBuildOutputFile( build.getId(), project.getId() );
 
-            ContinuumBuildExecutionResult result = buildExecutor.build( project, buildOutputFile );
+            ContinuumBuildExecutionResult result = buildExecutor.build( project, buildDefinition, buildOutputFile );
 
             build.setState( result.getExitCode() == 0 ? ContinuumProjectState.OK : ContinuumProjectState.FAILED );
 
@@ -103,6 +111,8 @@
         }
         catch ( Throwable e )
         {
+            getLogger().error( "Error running build", e );
+
             build.setState( ContinuumProjectState.ERROR );
 
             build.setError( ContinuumUtils.throwableToString( e ) );
@@ -125,8 +135,8 @@
     //
     // ----------------------------------------------------------------------
 
-    private boolean isNew( ContinuumProject project )
+    private boolean isNew( Project project )
     {
-        return project.getBuilds().size() == 0;
+        return project.getState() == ContinuumProjectState.NEW;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java 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.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
@@ -53,7 +53,7 @@
             //
             // ----------------------------------------------------------------------
 
-            ContinuumProject project = store.getProject( getProjectId( context ) );
+            Project project = store.getProject( getProjectId( context ) );
 
             project.setCheckoutResult( scmResult );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java Wed Aug 17 10:34:49 2005
@@ -17,7 +17,7 @@
  */
 
 import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
@@ -35,15 +35,17 @@
     public void execute( Map context )
         throws ContinuumException, ContinuumStoreException
     {
-        ContinuumProject project = getUnvalidatedProject( context );
+        Project project = getUnvalidatedProject( context );
 
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
 
+        // TODO: group!
+
         project = store.addProject( project );
 
-        context.put( KEY_PROJECT_ID, project.getId() );
+        context.put( KEY_PROJECT_ID, new Integer( project.getId() ) );
 
         // ----------------------------------------------------------------------
         // Set the working directory
@@ -62,6 +64,6 @@
 
         project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
 */
-        store.updateProject( project );
+//        store.updateProject( project );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java Wed Aug 17 10:34:49 2005
@@ -28,7 +28,5 @@
         projectGroup = store.addProjectGroup( projectGroup );
 
         context.put( KEY_PROJECT_GROUP_ID, Integer.toString( projectGroup.getId() ) );
-
-        store.updateProjectGroup( projectGroup );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java Wed Aug 17 10:34:49 2005
@@ -20,10 +20,10 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
-import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.util.Map;
 
@@ -34,7 +34,9 @@
 public class UpdateProjectFromWorkingDirectoryContinuumAction
     extends AbstractContinuumAction
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private WorkingDirectoryService workingDirectoryService;
 
     private BuildExecutorManager buildExecutorManager;
@@ -44,7 +46,7 @@
     public void execute( Map context )
         throws ContinuumStoreException, ContinuumException, ContinuumBuildExecutorException
     {
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProjectWithBuildDetails( getProjectId( context ) );
 
         getLogger().info( "Updating project '" + project.getName() + "' from checkout." );
 
@@ -54,8 +56,7 @@
 
         ContinuumBuildExecutor builder = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
 
-        builder.updateProjectFromCheckOut( workingDirectoryService.getWorkingDirectory( project ),
-                                           project );
+        builder.updateProjectFromCheckOut( workingDirectoryService.getWorkingDirectory( project ), project );
 
         // ----------------------------------------------------------------------
         // Store the new descriptor

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java 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.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.ContinuumScm;
 import org.apache.maven.continuum.store.ContinuumStore;
 
@@ -40,9 +40,9 @@
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = store.getProject( getProjectId( context ) );
+        Project project = store.getProject( getProjectId( context ) );
 
-        ScmResult scmResult = null;
+        ScmResult scmResult;
 
         try
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java Wed Aug 17 10:34:49 2005
@@ -18,7 +18,7 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ContinuumStore;
 
 import java.util.Map;
@@ -37,7 +37,7 @@
     public void execute( Map context )
         throws Exception
     {
-        ContinuumProject project = getUnvalidatedProject( context );
+        Project project = getUnvalidatedProject( context );
 
         // ----------------------------------------------------------------------
         // Make sure that the builder id is correct before starting to check

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -16,8 +16,7 @@
  * limitations under the License.
  */
 
-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.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.continuum.utils.shell.ExecutionResult;
 import org.apache.maven.continuum.utils.shell.ShellCommandHelper;
@@ -120,8 +119,8 @@
     //
     // ----------------------------------------------------------------------
 
-    protected ContinuumBuildExecutionResult executeShellCommand( ContinuumProject project, String executable,
-                                                                 String arguments, File output )
+    protected ContinuumBuildExecutionResult executeShellCommand( Project project, String executable, String arguments,
+                                                                 File output )
         throws ContinuumBuildExecutorException
     {
         // ----------------------------------------------------------------------
@@ -192,14 +191,6 @@
             throw new ContinuumBuildExecutorException( "Error while executing shell command. " +
                 "The most common error is that '" + executable + "' " + "is not in your path.", e );
         }
-    }
-
-    public ContinuumBuildExecutionResult build( ContinuumProject project, File buildOutput )
-        throws ContinuumBuildExecutorException
-    {
-        // TODO: remove
-        BuildDefinition buildDefinition = (BuildDefinition) project.getBuildDefinitions().iterator().next();
-        return build( project, buildDefinition, buildOutput );
     }
 
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -21,7 +21,7 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 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.StringUtils;
 
 import java.io.File;
@@ -57,8 +57,7 @@
     // ContinuumBuilder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildExecutionResult build( ContinuumProject project, BuildDefinition buildDefinition,
-                                                File buildOutput )
+    public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput )
         throws ContinuumBuildExecutorException
     {
         // TODO: get from installation
@@ -71,7 +70,7 @@
         return executeShellCommand( project, executable, arguments, buildOutput );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject p )
+    public void updateProjectFromCheckOut( File workingDirectory, Project p )
         throws ContinuumBuildExecutorException
     {
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java Wed Aug 17 10:34:49 2005
@@ -17,9 +17,9 @@
  */
 
 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.notification.ContinuumRecipientSource;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
@@ -44,7 +44,7 @@
     // MavenOneMetadataHelper Implementation
     // ----------------------------------------------------------------------
 
-    public void mapMetadata( File metadata, ContinuumProject project )
+    public void mapMetadata( File metadata, Project project )
         throws MavenOneMetadataHelperException
     {
         Xpp3Dom mavenProject;

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -21,7 +21,7 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 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.StringUtils;
 
 import java.io.File;
@@ -56,8 +56,7 @@
     // Builder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildExecutionResult build( ContinuumProject project, BuildDefinition buildDefinition,
-                                                File buildOutput )
+    public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput )
         throws ContinuumBuildExecutorException
     {
         // TODO: get from installation
@@ -70,7 +69,7 @@
         return executeShellCommand( project, executable, arguments, buildOutput );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    public void updateProjectFromCheckOut( File workingDirectory, Project project )
         throws ContinuumBuildExecutorException
     {
         File projectXmlFile = new File( workingDirectory, "project.xml" );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java Wed Aug 17 10:34:49 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 
 import java.io.File;
 
@@ -28,6 +28,6 @@
 {
     String ROLE = MavenOneMetadataHelper.class.getName();
 
-    void mapMetadata( File metadata, ContinuumProject project )
+    void mapMetadata( File metadata, Project project )
         throws MavenOneMetadataHelperException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java Wed Aug 17 10:34:49 2005
@@ -19,11 +19,10 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectDependency;
 import org.apache.maven.continuum.model.project.ProjectDeveloper;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.model.CiManagement;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Developer;
@@ -40,7 +39,6 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
@@ -83,13 +81,13 @@
     // MavenBuilderHelper Implementation
     // ----------------------------------------------------------------------
 
-    public void mapMetadataToProject( File metadata, ContinuumProject continuumProject )
+    public void mapMetadataToProject( File metadata, Project continuumProject )
         throws MavenBuilderHelperException
     {
         mapMavenProjectToContinuumProject( getMavenProject( metadata ), continuumProject );
     }
 
-    public void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject )
+    public void mapMavenProjectToContinuumProject( MavenProject mavenProject, Project continuumProject )
         throws MavenBuilderHelperException
     {
         continuumProject.setName( getProjectName( mavenProject ) );
@@ -97,12 +95,6 @@
         continuumProject.setScmUrl( getScmUrl( mavenProject ) );
 
         continuumProject.setVersion( getVersion( mavenProject ) );
-
-        BuildDefinition bd = new BuildDefinition();
-        bd.setArguments( "--batch-mode --non-recursive" );
-        bd.setGoals( "clean:clean install" );
-        bd.setBuildFile( "pom.xml" );
-        continuumProject.addBuildDefinition( bd );
 
         // ----------------------------------------------------------------------
         // GroupId

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java Wed Aug 17 10:34:49 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.project.MavenProject;
 
 import java.io.File;
@@ -29,12 +29,12 @@
 {
     String ROLE = MavenBuilderHelper.class.getName();
 
-    void mapMetadataToProject( File metadata, ContinuumProject project )
+    void mapMetadataToProject( File metadata, Project project )
         throws MavenBuilderHelperException;
 
     MavenProject getMavenProject( File file )
         throws MavenBuilderHelperException;
 
-    void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject )
+    void mapMavenProjectToContinuumProject( MavenProject mavenProject, Project continuumProject )
         throws MavenBuilderHelperException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -21,7 +21,7 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 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.StringUtils;
 
 import java.io.File;
@@ -64,8 +64,7 @@
     // ContinuumBuilder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildExecutionResult build( ContinuumProject project, BuildDefinition buildDefinition,
-                                                File buildOutput )
+    public ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition, File buildOutput )
         throws ContinuumBuildExecutorException
     {
         // TODO: get from installation
@@ -78,7 +77,7 @@
         return executeShellCommand( project, executable, arguments, buildOutput );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    public void updateProjectFromCheckOut( File workingDirectory, Project project )
         throws ContinuumBuildExecutorException
     {
         File f = new File( workingDirectory, "pom.xml" );

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java Wed Aug 17 10:34:49 2005
@@ -21,7 +21,7 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 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;
 
@@ -54,7 +54,7 @@
     // ContinuumBuilder implementation
     // ----------------------------------------------------------------------
 
-    public synchronized ContinuumBuildExecutionResult build( ContinuumProject project, BuildDefinition buildDefinition,
+    public synchronized ContinuumBuildExecutionResult build( Project project, BuildDefinition buildDefinition,
                                                              File buildOutput )
         throws ContinuumBuildExecutorException
     {
@@ -70,7 +70,7 @@
         return executeShellCommand( project, executable, buildDefinition.getArguments(), buildOutput );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    public void updateProjectFromCheckOut( File workingDirectory, Project project )
         throws ContinuumBuildExecutorException
     {
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.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.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.notification.AbstractRecipientSource;
 import org.codehaus.plexus.notification.NotificationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -72,7 +72,7 @@
     public Set getRecipients( String notifierType, String messageId, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         if ( project == null )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java Wed Aug 17 10:34:49 2005
@@ -17,8 +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.project.ContinuumProject;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -59,32 +59,32 @@
     // ContinuumNotificationDispatcher Implementation
     // ----------------------------------------------------------------------
 
-    public void buildStarted( ContinuumProject project )
+    public void buildStarted( Project project )
     {
         sendNotification( MESSAGE_ID_BUILD_STARTED, project, null );
     }
 
-    public void checkoutStarted( ContinuumProject project )
+    public void checkoutStarted( Project project )
     {
         sendNotification( MESSAGE_ID_CHECKOUT_STARTED, project, null );
     }
 
-    public void checkoutComplete( ContinuumProject project )
+    public void checkoutComplete( Project project )
     {
         sendNotification( MESSAGE_ID_CHECKOUT_COMPLETE, project, null );
     }
 
-    public void runningGoals( ContinuumProject project, BuildResult build )
+    public void runningGoals( Project project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_RUNNING_GOALS, project, build );
     }
 
-    public void goalsCompleted( ContinuumProject project, BuildResult build )
+    public void goalsCompleted( Project project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_GOALS_COMPLETED, project, build );
     }
 
-    public void buildComplete( ContinuumProject project, BuildResult build )
+    public void buildComplete( Project project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_BUILD_COMPLETE, project, build );
     }
@@ -93,7 +93,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private void sendNotification( String messageId, ContinuumProject project, BuildResult build )
+    private void sendNotification( String messageId, Project project, BuildResult build )
     {
         Map context = new HashMap();
 
@@ -109,13 +109,12 @@
             // Here we need to get all the project details
             //  - builds are used to detect if the state has changed (TODO: maybe previousState field is better)
             //  - notifiers are used to send the notification
-            context.put( CONTEXT_PROJECT, store.getProject( project.getId() ) );
+            project = store.getProjectWithAllDetails( project.getId() );
+
+            context.put( CONTEXT_PROJECT, project );
 
             if ( build != null )
             {
-                // TODO: remove?
-                build = store.getBuildResult( build.getId() );
-
                 context.put( CONTEXT_BUILD, build );
 
                 if ( build.getEndTime() != 0 )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console/ConsoleNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console/ConsoleNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console/ConsoleNotifier.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console/ConsoleNotifier.java Wed Aug 17 10:34:49 2005
@@ -17,8 +17,8 @@
  */
 
 import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.notification.NotificationException;
 import org.codehaus.plexus.notification.notifier.AbstractNotifier;
 import org.codehaus.plexus.util.StringUtils;
@@ -41,7 +41,7 @@
     public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
@@ -79,27 +79,27 @@
     //
     // ----------------------------------------------------------------------
 
-    private void buildStarted( ContinuumProject project )
+    private void buildStarted( Project project )
     {
         out( project, null, "Build started." );
     }
 
-    private void checkoutStarted( ContinuumProject project )
+    private void checkoutStarted( Project project )
     {
         out( project, null, "Checkout started." );
     }
 
-    private void checkoutComplete( ContinuumProject project )
+    private void checkoutComplete( Project project )
     {
         out( project, null, "Checkout complete." );
     }
 
-    private void runningGoals( ContinuumProject project, BuildResult build )
+    private void runningGoals( Project project, BuildResult build )
     {
         out( project, build, "Running goals." );
     }
 
-    private void goalsCompleted( ContinuumProject project, BuildResult build )
+    private void goalsCompleted( Project project, BuildResult build )
     {
         if ( build.getError() == null )
         {
@@ -111,7 +111,7 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, BuildResult build )
+    private void buildComplete( Project project, BuildResult build )
     {
         if ( build.getError() == null )
         {
@@ -123,7 +123,7 @@
         }
     }
 
-    private void out( ContinuumProject project, BuildResult build, String msg )
+    private void out( Project project, BuildResult build, String msg )
     {
         System.out.println( "Build event for project '" + project.getName() + "':" + msg );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java Wed Aug 17 10:34:49 2005
@@ -19,11 +19,12 @@
 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.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.ContinuumRecipientSource;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.exception.ResourceNotFoundException;
 import org.codehaus.plexus.mailsender.MailMessage;
@@ -164,7 +165,7 @@
     public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
@@ -196,8 +197,8 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, BuildResult build, String buildOutput, String source,
-                                Set recipients, Map configuration )
+    private void buildComplete( Project project, BuildResult build, String buildOutput, String source, Set recipients,
+                                Map configuration )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
@@ -281,7 +282,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateSubject( ContinuumProject project, BuildResult build )
+    private String generateSubject( Project project, BuildResult build )
     {
         int state = build.getState();
 
@@ -305,8 +306,7 @@
         }
     }
 
-    private void sendMessage( ContinuumProject project, Set recipients, String subject, String content,
-                              Map configuration )
+    private void sendMessage( Project project, Set recipients, String subject, String content, Map configuration )
         throws ContinuumException
     {
         if ( recipients.size() == 0 )
@@ -333,7 +333,7 @@
 
         message.addHeader( "X-Continuum-Build-Host", buildHost );
 
-        message.addHeader( "X-Continuum-Project-Id", project.getId() );
+        message.addHeader( "X-Continuum-Project-Id", Integer.toString( project.getId() ) );
 
         message.addHeader( "X-Continuum-Project-Name", project.getName() );
 
@@ -424,10 +424,18 @@
         return false;
     }
 
-    private BuildResult getPreviousBuild( ContinuumProject project, BuildResult currentBuild )
+    private BuildResult getPreviousBuild( Project project, BuildResult currentBuild )
         throws ContinuumException
     {
-        Collection builds = project.getBuilds();
+        try
+        {
+            project = store.getProjectWithBuilds( project.getId() );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Unable to obtain project builds", e );
+        }
+        Collection builds = project.getBuildResults();
 
         if ( builds.size() == 0 )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java Wed Aug 17 10:34:49 2005
@@ -19,8 +19,8 @@
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelperException;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -69,7 +69,7 @@
 
         try
         {
-            ContinuumProject project = new ContinuumProject();
+            Project project = new Project();
 
             metadataHelper.mapMetadata( pomFile, project );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java Wed Aug 17 10:34:49 2005
@@ -19,8 +19,9 @@
 import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
 import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelperException;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
@@ -114,7 +115,13 @@
 
         if ( !excludedPackagingTypes.contains( mavenProject.getPackaging() ) )
         {
-            ContinuumProject continuumProject = new ContinuumProject();
+            Project continuumProject = new Project();
+
+            BuildDefinition bd = new BuildDefinition();
+            bd.setArguments( "--batch-mode --non-recursive" );
+            bd.setGoals( "clean:clean install" );
+            bd.setBuildFile( "pom.xml" );
+            continuumProject.addBuildDefinition( bd );
 
             try
             {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/ContinuumScm.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/ContinuumScm.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/ContinuumScm.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/ContinuumScm.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 java.io.File;
 
@@ -29,12 +29,12 @@
 {
     String ROLE = ContinuumScm.class.getName();
 
-    ScmResult checkOut( ContinuumProject project, File workingDirectory )
+    ScmResult checkOut( Project project, File workingDirectory )
         throws ContinuumScmException;
 
-    ScmResult checkOutProject( ContinuumProject project )
+    ScmResult checkOutProject( Project project )
         throws ContinuumScmException;
 
-    ScmResult updateProject( ContinuumProject project )
+    ScmResult updateProject( Project project )
         throws ContinuumScmException;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java Wed Aug 17 10:34:49 2005
@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
+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.utils.WorkingDirectoryService;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFile;
@@ -59,7 +59,7 @@
     // ContinuumScm implementation
     // ----------------------------------------------------------------------
 
-    public ScmResult checkOut( ContinuumProject project, File workingDirectory )
+    public ScmResult checkOut( Project project, File workingDirectory )
         throws ContinuumScmException
     {
         try
@@ -135,7 +135,7 @@
      * @param project The project to check out.
      * @throws ContinuumScmException Thrown in case of a exception while checking out the sources.
      */
-    public ScmResult checkOutProject( ContinuumProject project )
+    public ScmResult checkOutProject( Project project )
         throws ContinuumScmException
     {
         File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
@@ -149,7 +149,7 @@
         return checkOut( project, workingDirectory );
     }
 
-    public ScmResult updateProject( ContinuumProject project )
+    public ScmResult updateProject( Project project )
         throws ContinuumScmException
     {
         try

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTask.java Wed Aug 17 10:34:49 2005
@@ -27,18 +27,18 @@
 public class CheckOutTask
     implements Task
 {
-    private String projectId;
+    private int projectId;
 
     private File workingDirectory;
 
-    public CheckOutTask( String projectId, File workingDirectory )
+    public CheckOutTask( int projectId, File workingDirectory )
     {
         this.projectId = projectId;
 
         this.workingDirectory = workingDirectory;
     }
 
-    public String getProjectId()
+    public int getProjectId()
     {
         return projectId;
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java Wed Aug 17 10:34:49 2005
@@ -34,7 +34,9 @@
     extends AbstractLogEnabled
     implements TaskExecutor
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private ActionManager actionManager;
 
     // ----------------------------------------------------------------------
@@ -46,13 +48,13 @@
     {
         CheckOutTask task = (CheckOutTask) t;
 
-        String projectId = task.getProjectId();
+        int projectId = task.getProjectId();
 
         String workingDirectory = task.getWorkingDirectory().getAbsolutePath();
 
         Map context = new HashMap();
 
-        context.put( CheckoutProjectContinuumAction.KEY_PROJECT_ID, projectId );
+        context.put( CheckoutProjectContinuumAction.KEY_PROJECT_ID, new Integer( projectId ) );
 
         context.put( CheckoutProjectContinuumAction.KEY_WORKING_DIRECTORY, workingDirectory );
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/DefaultWorkingDirectoryService.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.store.ContinuumStore;
 import org.apache.maven.continuum.configuration.ConfigurationService;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 import java.io.File;
@@ -45,7 +45,7 @@
     // WorkingDirectoryService Implementation
     // ----------------------------------------------------------------------
 
-    public File getWorkingDirectory( ContinuumProject project )
+    public File getWorkingDirectory( Project project )
     {
 //        TODO: Enable, this is what we really want
 //        ContinuumProjectGroup projectGroup = project.getProjectGroup();
@@ -53,7 +53,6 @@
 //        return new File( projectGroup.getWorkingDirectory(),
 //                         project.getPath() );
 
-        return new File( configurationService.getWorkingDirectory(),
-                         project.getId() );
+        return new File( configurationService.getWorkingDirectory(), Integer.toString( project.getId() ) );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/ProjectSorter.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/ProjectSorter.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/ProjectSorter.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/ProjectSorter.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.ProjectDependency;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 import org.codehaus.plexus.util.dag.DAG;
 import org.codehaus.plexus.util.dag.TopologicalSorter;
@@ -62,7 +62,7 @@
 
         for ( Iterator i = projects.iterator(); i.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) i.next();
+            Project project = (Project) i.next();
 
             String id = getProjectId( project );
 
@@ -73,7 +73,7 @@
 
         for ( Iterator i = projects.iterator(); i.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) i.next();
+            Project project = (Project) i.next();
 
             String id = getProjectId( project );
 
@@ -102,7 +102,7 @@
         return sortedProjects;
     }
 
-    private static String getProjectId( ContinuumProject project )
+    private static String getProjectId( Project project )
     {
         return project.getGroupId() + ":" + project.getArtifactId();
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/WorkingDirectoryService.java Wed Aug 17 10:34:49 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 
 import java.io.File;
 
@@ -28,5 +28,5 @@
 {
     String ROLE = WorkingDirectoryService.class.getName();
 
-    File getWorkingDirectory( ContinuumProject project );
+    File getWorkingDirectory( Project project );
 }

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java Wed Aug 17 10:34:49 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
@@ -57,7 +57,7 @@
     {
         Continuum continuum = (Continuum) lookup( Continuum.ROLE );
 
-        int projectCount = getStore().getAllProjects().size();
+        int projectCount = getStore().getAllProjectsByName().size();
 
         int projectGroupCount = getStore().getAllProjectGroupsWithProjects().size();
 
@@ -73,20 +73,20 @@
 
         assertEquals( "result.projectGroups.size", 1, result.getProjectGroups().size() );
 
-        System.err.println( "number of projects: " + getStore().getAllProjects().size() );
+        System.err.println( "number of projects: " + getStore().getAllProjectsByName().size() );
 
         System.err.println( "number of project groups: " + getStore().getAllProjectGroupsWithProjects().size() );
 
-        assertEquals( "Total project count", projectCount + 2, getStore().getAllProjects().size() );
+        assertEquals( "Total project count", projectCount + 2, getStore().getAllProjectsByName().size() );
 
         assertEquals( "Total project group count.", projectGroupCount + 1,
                       getStore().getAllProjectGroupsWithProjects().size() );
 
         Map projects = new HashMap();
 
-        for ( Iterator i = getStore().getAllProjects().iterator(); i.hasNext(); )
+        for ( Iterator i = getStore().getAllProjectsByName().iterator(); i.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) i.next();
+            Project project = (Project) i.next();
 
             projects.put( project.getName(), project );
         }
@@ -116,9 +116,12 @@
 
         assertEquals( 1, projects.size() );
 
-        assertEquals( ContinuumProject.class, projects.get( 0 ).getClass() );
+        assertEquals( Project.class, projects.get( 0 ).getClass() );
 
-        ContinuumProject project = (ContinuumProject) projects.get( 0 );
+        Project project = (Project) projects.get( 0 );
+
+        // reattach
+        project = continuum.getProject( project.getId() );
 
         project.setName( project.getName() + " 2" );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java Wed Aug 17 10:34:49 2005
@@ -134,7 +134,7 @@
     private void buildProject( int projectId, boolean force )
         throws Exception
     {
-        buildQueue.put( new BuildProjectTask( Integer.toString( projectId ), force ) );
+        buildQueue.put( new BuildProjectTask( projectId, force ) );
     }
 
     private void assertNextBuildIs( int expectedProjectId )
@@ -146,8 +146,7 @@
 
         BuildProjectTask buildProjectTask = (BuildProjectTask) task;
 
-        assertEquals( "Didn't get the expected project id.", Integer.toString( expectedProjectId ),
-                      buildProjectTask.getProjectId() );
+        assertEquals( "Didn't get the expected project id.", expectedProjectId, buildProjectTask.getProjectId() );
     }
 
     private void assertNextBuildIsNull()

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java Wed Aug 17 10:34:49 2005
@@ -18,8 +18,8 @@
 
 import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
+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;
@@ -61,7 +61,7 @@
         // Make the "existing" project
         // ----------------------------------------------------------------------
 
-        ContinuumProject project = new ContinuumProject();
+        Project project = new Project();
 
         project.setName( "Maven" );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java 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.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.codehaus.plexus.PlexusTestCase;
@@ -55,7 +55,7 @@
 
         assertEquals( "result.projects.length", 1, result.getProjects().size() );
 
-        ContinuumProject project = (ContinuumProject) result.getProjects().get( 0 );
+        Project project = (Project) result.getProjects().get( 0 );
 
         assertNotNull( project );
 

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java 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.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.codehaus.plexus.PlexusTestCase;
@@ -56,7 +56,7 @@
 
         assertEquals( 1, result.getProjects().size() );
 
-        ContinuumProject project = (ContinuumProject) result.getProjects().get( 0 );
+        Project project = (Project) result.getProjects().get( 0 );
 
         assertNotNull( project.getNotifiers() );
 
@@ -87,7 +87,7 @@
 
         assertEquals( 1, result.getProjects().size() );
 
-        ContinuumProject project = (ContinuumProject) result.getProjects().get( 0 );
+        Project project = (Project) result.getProjects().get( 0 );
 
         assertNotNull( project.getNotifiers() );
 
@@ -160,7 +160,7 @@
 
         for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
         {
-            ContinuumProject project = (ContinuumProject) it.next();
+            Project project = (Project) it.next();
 
             assertNotNull( project.getName() );
 
@@ -180,7 +180,7 @@
 
     private void assertMavenTwoProject( String name, Map projects )
     {
-        ContinuumProject project = (ContinuumProject) projects.get( name );
+        Project project = (Project) projects.get( name );
 
         assertNotNull( project );
 

Modified: maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties (original)
+++ maven/continuum/trunk/continuum-core/src/test/resources/log4j.properties Wed Aug 17 10:34:49 2005
@@ -4,11 +4,11 @@
 log4j.appender.root.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] - %m%n
 
 # JPOX Categories
-log4j.category.JPOX=WARN, root
+#log4j.category.JPOX=WARN, root
 log4j.category.JPOX.RDBMS=ERROR, root
-log4j.category.JPOX.RDBMS.Schema=WARN, root
-log4j.category.JPOX.RDBMS.DDL=DEBUG, root
-log4j.category.JPOX.RDBMS.SQL=WARN, root
+#log4j.category.JPOX.RDBMS.Schema=WARN, root
+#log4j.category.JPOX.RDBMS.DDL=DEBUG, root
+#log4j.category.JPOX.RDBMS.SQL=WARN, root
 
 #log4j.category.JPOX.JDO=DEBUG, root
 #log4j.category.JPOX.Cache=DEBUG, root

Modified: maven/continuum/trunk/continuum-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/pom.xml?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/pom.xml (original)
+++ maven/continuum/trunk/continuum-model/pom.xml Wed Aug 17 10:34:49 2005
@@ -20,7 +20,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jpox-plugin</artifactId>
-        <version>1.0</version>
+        <version>1.0.1-SNAPSHOT</version>
         <executions>
           <execution>
             <goals>

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Wed Aug 17 10:34:49 2005
@@ -123,11 +123,13 @@
           <name>state</name>
           <version>1.0.0+</version>
           <type>int</type>
+          <defaultValue>1</defaultValue>
         </field>
+        <!-- TODO: maybe buildresult itself? -->
         <field>
           <name>latestBuildId</name>
           <version>1.0.0</version>
-          <type>String</type>
+          <type>int</type>
         </field>
         <field>
           <name>buildNumber</name>
@@ -718,130 +720,6 @@
           <type>Map</type>
           <association xml.mapStyle="inline" stash.part="true" stash.keyType="java.lang.String">
             <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-      </fields>
-    </class>
-
-    <!-- TODO: old ones to remove -->
-
-    <class>
-      <packageName>org.apache.maven.continuum.project</packageName>
-      <name>ContinuumProject</name>
-      <version>1.0.0</version>
-      <fields>
-        <field>
-          <name>id</name>
-          <required>true</required>
-          <identifier>true</identifier>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>name</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <!-- TODO: Remove -->
-        <field>
-          <name>scmUrl</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>version</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field stash.storable="false">
-          <name>state</name>
-          <version>1.0.0</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>executorId</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>latestBuildId</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>buildNumber</name>
-          <version>1.0.0</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>builds</name>
-          <version>1.0.0</version>
-          <association stash.part="true">
-            <type>BuildResult</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>checkoutResult</name>
-          <version>1.0.0</version>
-          <association>
-            <type>ScmResult</type>
-          </association>
-        </field>
-        <field>
-          <name>url</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>artifactId</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>groupId</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>developers</name>
-          <version>1.0.0</version>
-          <association stash.part="true">
-            <type>ProjectDeveloper</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>notifiers</name>
-          <version>1.0.0</version>
-          <association stash.part="true">
-            <type>ProjectNotifier</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>dependencies</name>
-          <version>1.0.0</version>
-          <association stash.part="true">
-            <type>ProjectDependency</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
-        <field>
-          <name>projectGroup</name>
-          <version>1.0.0</version>
-          <type>Set</type>
-          <association stash.part="false">
-            <type>ProjectGroup</type>
-          </association>
-        </field>
-        <field>
-          <name>buildDefinitions</name>
-          <version>1.0.0</version>
-          <type>Set</type>
-          <association>
-            <type>BuildDefinition</type>
             <multiplicity>*</multiplicity>
           </association>
         </field>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo Wed Aug 17 10:34:49 2005
@@ -5,63 +5,6 @@
     "http://java.sun.com/dtd/jdo_2_0.dtd">
 
 <jdo>
-  <package name="org.apache.maven.continuum.project">
-    <class name="ContinuumProject" detachable="true" identity-type="application"
-           objectid-class="javax.jdo.identity.StringIdentity">
-      <inheritance strategy="new-table">
-        <discriminator strategy="class-name">
-          <column name="PROJECT_TYPE"/>
-        </discriminator>
-      </inheritance>
-      <field name="id" persistence-modifier="persistent" primary-key="true" value-strategy="native"/>
-      <field name="name" persistence-modifier="persistent"/>
-      <field name="scmUrl" persistence-modifier="persistent"/>
-      <field name="version" persistence-modifier="persistent"/>
-      <field name="state" persistence-modifier="none"/>
-      <field name="executorId" persistence-modifier="persistent"/>
-      <field name="latestBuildId" persistence-modifier="persistent"/>
-      <field name="buildNumber" persistence-modifier="persistent"/>
-      <field name="checkoutResult" persistence-modifier="persistent" default-fetch-group="true" dependent="true"/>
-      <field name="url" persistence-modifier="persistent"/>
-      <field name="artifactId" persistence-modifier="persistent"/>
-      <field name="groupId" persistence-modifier="persistent"/>
-      <!-- Collections -->
-      <field name="builds" persistence-modifier="persistent">
-        <collection element-type="org.apache.maven.continuum.model.project.BuildResult" dependent-element="true"/>
-        <join/>
-      </field>
-      <field name="developers" persistence-modifier="persistent">
-        <collection element-type="org.apache.maven.continuum.model.project.ProjectDeveloper" dependent-element="true"/>
-        <join/>
-      </field>
-      <field name="notifiers" persistence-modifier="persistent">
-        <collection element-type="org.apache.maven.continuum.model.project.ProjectNotifier" dependent-element="true"/>
-        <join/>
-      </field>
-      <field name="dependencies" persistence-modifier="persistent">
-        <collection element-type="org.apache.maven.continuum.model.project.ProjectDependency" dependent-element="true"/>
-        <join/>
-      </field>
-      <field name="buildDefinitions" persistence-modifier="persistent" default-fetch-group="true">
-        <collection element-type="org.apache.maven.continuum.model.project.BuildDefinition" dependent-element="true"/>
-        <join/>
-      </field>
-
-      <field name="projectGroup" persistence-modifier="persistent"/>
-
-      <fetch-group name="project-detail">
-        <field name="checkoutResult"/>
-        <field name="builds"/>
-        <field name="developers"/>
-        <field name="notifiers"/>
-        <field name="dependencies"/>
-        <field name="projectGroup"/>
-        <field name="buildDefinitions"/>
-      </fetch-group>
-    </class>
-  </package>
-
-  <!-- Really new stuff, TODO: remove the rest -->
   <package name="org.apache.maven.continuum.model.project">
     <class name="ProjectGroup" identity-type="application" detachable="true"
            objectid-class="javax.jdo.identity.IntIdentity">

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java Wed Aug 17 10:34:49 2005
@@ -20,7 +20,7 @@
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
-import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.model.project.Project;
 import org.codehaus.plexus.notification.notifier.AbstractNotifier;
 
 public abstract class AbstractContinuumNotifier
@@ -32,7 +32,7 @@
      * @param project The project
      * @param build The build
      */
-    public String getReportUrl( ContinuumProject project, BuildResult build, ConfigurationService configurationService )
+    public String getReportUrl( Project project, BuildResult build, ConfigurationService configurationService )
         throws ContinuumException
     {
         try

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java Wed Aug 17 10:34:49 2005
@@ -19,11 +19,12 @@
 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.notification.AbstractContinuumNotifier;
 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.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.ircbot.IrcBot;
 import org.codehaus.plexus.notification.NotificationException;
 
@@ -66,7 +67,7 @@
     public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
@@ -96,7 +97,7 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, BuildResult build, Map configuration )
+    private void buildComplete( Project project, BuildResult build, Map configuration )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
@@ -160,7 +161,7 @@
         }
     }
 
-    private String generateMessage( ContinuumProject project, BuildResult build )
+    private String generateMessage( Project project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -222,10 +223,18 @@
         return false;
     }
 
-    private BuildResult getPreviousBuild( ContinuumProject project, BuildResult currentBuild )
+    private BuildResult getPreviousBuild( Project project, BuildResult currentBuild )
         throws ContinuumException
     {
-        Collection builds = project.getBuilds();
+        try
+        {
+            project = store.getProjectWithBuilds( project.getId() );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Unable to obtain project builds", e );
+        }
+        Collection builds = project.getBuildResults();
 
         if ( builds.size() == 0 )
         {

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-jabber/src/main/java/org/apache/maven/continuum/notification/jabber/JabberContinuumNotifier.java Wed Aug 17 10:34:49 2005
@@ -19,9 +19,9 @@
 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.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.jabber.JabberClient;
 import org.codehaus.plexus.jabber.JabberClientException;
@@ -84,7 +84,7 @@
     public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
@@ -113,7 +113,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( ContinuumProject project, BuildResult build )
+    private String generateMessage( Project project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -142,7 +142,7 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void sendMessage( ContinuumProject project, BuildResult build, Set recipients, Map configuration )
+    private void sendMessage( Project project, BuildResult build, Set recipients, Map configuration )
         throws NotificationException
     {
         String message;

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java?rev=233212&r1=233211&r2=233212&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java (original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-msn/src/main/java/org/apache/maven/continuum/notification/msn/MsnContinuumNotifier.java Wed Aug 17 10:34:49 2005
@@ -19,9 +19,9 @@
 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.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.msn.MsnClient;
 import org.codehaus.plexus.msn.MsnException;
@@ -78,7 +78,7 @@
     public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
-        ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
+        Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
         BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
@@ -107,7 +107,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( ContinuumProject project, BuildResult build )
+    private String generateMessage( Project project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -136,7 +136,7 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void sendMessage( ContinuumProject project, BuildResult build, Set recipients, Map configuration )
+    private void sendMessage( Project project, BuildResult build, Set recipients, Map configuration )
         throws NotificationException
     {
         String message;



Mime
View raw message