continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r232681 [1/2] - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/notification/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-...
Date Mon, 15 Aug 2005 00:35:26 GMT
Author: brett
Date: Sun Aug 14 17:34:39 2005
New Revision: 232681

URL: http://svn.apache.org/viewcvs?rev=232681&view=rev
Log:
nuke ContinuumBuild

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/notification/ContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.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/TestUtils.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/core/action/ExecuteBuilderContinuumAction.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/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
    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-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-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.project.AntProject;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
@@ -62,7 +62,7 @@
     Collection getProjects()
         throws ContinuumException;
 
-    ContinuumBuild getLatestBuildForProject( String id )
+    BuildResult getLatestBuildResultForProject( String projectId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
@@ -95,13 +95,7 @@
     // Build information
     // ----------------------------------------------------------------------
 
-    ContinuumBuild getBuild( String buildId )
-        throws ContinuumException;
-
-    Collection getBuildsForProject( String projectId )
-        throws ContinuumException;
-
-    Collection getChangedFilesForBuild( String buildId )
+    BuildResult getBuildResult( int buildId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
@@ -175,25 +169,8 @@
     void removeNotifier( String projectId, String notifierType )
         throws ContinuumException;
 
-    // ----------------------------------------------------------------------
-    // Schedules
-    // ----------------------------------------------------------------------
-
-    // ----------------------------------------------------------------------
-    // Project scheduling
-    // ----------------------------------------------------------------------
-
-    // ----------------------------------------------------------------------
-    // Project groups
-    // ----------------------------------------------------------------------
-
-    // ----------------------------------------------------------------------
-    // Build Settings
-    // ----------------------------------------------------------------------
-
-    // ----------------------------------------------------------------------
-    // Defaults
-    // ----------------------------------------------------------------------
-
     ContinuumBuildSettings getDefaultBuildSettings();
+
+    Collection getBuildResultsForProject( String projectId )
+        throws ContinuumException;
 }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -16,12 +16,13 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
+ * @todo use build result for all of these? need project for those that do?
  */
 public interface ContinuumNotificationDispatcher
 {
@@ -63,9 +64,9 @@
 
     void checkoutComplete( ContinuumProject project );
 
-    void runningGoals( ContinuumProject project, ContinuumBuild build );
+    void runningGoals( ContinuumProject project, BuildResult build );
 
-    void goalsCompleted( ContinuumProject project, ContinuumBuild build );
+    void goalsCompleted( ContinuumProject project, BuildResult build );
 
-    void buildComplete( ContinuumProject project, ContinuumBuild build );
+    void buildComplete( ContinuumProject project, BuildResult build );
 }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -24,7 +24,6 @@
 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.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 
@@ -62,28 +61,10 @@
     ScmResult getScmResultForProject( String projectId )
         throws ContinuumStoreException;
 
-    ContinuumBuild addBuild( String projectId, ContinuumBuild build )
+    String getBuildOutput( int buildId, String projectId )
         throws ContinuumStoreException;
 
-    ContinuumBuild updateBuild( ContinuumBuild build )
-        throws ContinuumStoreException;
-
-    ContinuumBuild getBuild( String buildId )
-        throws ContinuumStoreException;
-
-    String getBuildOutput( String buildId, String projectId )
-        throws ContinuumStoreException;
-
-    ContinuumBuild getLatestBuildForProject( String projectId )
-        throws ContinuumStoreException;
-
-    Collection getBuildsForProject( String projectId, int start, int end )
-        throws ContinuumStoreException;
-
-    List getChangedFilesForBuild( String buildId )
-        throws ContinuumStoreException;
-
-    File getBuildOutputFile( String buildId, String projectId )
+    File getBuildOutputFile( int buildId, String projectId )
         throws ContinuumStoreException;
 
     void removeNotifier( ProjectNotifier notifier )
@@ -177,5 +158,14 @@
         throws ContinuumObjectNotFoundException;
 
     ProjectGroup getProjectGroupByGroupId( String groupId )
+        throws ContinuumStoreException;
+
+    BuildResult getLatestBuildResultForProject( String projectId )
+        throws ContinuumStoreException;
+
+    BuildResult addBuildResult( ContinuumProject project, BuildResult build )
+        throws ContinuumStoreException;
+
+    void updateBuildResult( BuildResult build )
         throws ContinuumStoreException;
 }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -20,10 +20,10 @@
 import org.apache.maven.continuum.Continuum;
 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.scm.ChangeFile;
 import org.apache.maven.continuum.model.scm.ChangeSet;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -400,27 +400,30 @@
         return ( (ContinuumProject) projects.get( 0 ) ).getId();
     }
 
-    public ContinuumBuild buildProject( String projectId, boolean force )
+    /**
+     * @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 )
         throws Exception
     {
         int count = 600;
 
-        int originalSize = getContinuum().getBuildsForProject( projectId ).size();
+        BuildResult previousBuild = getContinuum().getLatestBuildResultForProject( projectId );
 
         getContinuum().buildProject( projectId, force );
 
         while ( true )
         {
-            Collection builds = getContinuum().getBuildsForProject( projectId );
+            BuildResult latestBuildResult = getContinuum().getLatestBuildResultForProject( projectId );
 
-            if ( count == 0 )
+            if ( latestBuildResult != null && !latestBuildResult.equals( previousBuild ) )
             {
-                fail( "Timeout while waiting for build. Project id: " + projectId );
+                return latestBuildResult;
             }
 
-            if ( builds.size() != originalSize )
+            if ( count == 0 )
             {
-                return (ContinuumBuild) builds.iterator().next();
+                fail( "Timeout while waiting for build. Project id: " + projectId );
             }
 
             count--;
@@ -495,13 +498,16 @@
         assertTrue( message + "scmResult.success != true", project.getCheckoutResult().isSuccess() );
     }
 
-    public ContinuumBuild waitForBuild( String buildId )
+    /**
+     * @todo share with other methods doing the same thing
+     */
+    public BuildResult waitForBuild( int buildId )
         throws Exception
     {
         int timeout = 120 * 1000;
         long start = System.currentTimeMillis();
 
-        ContinuumBuild build = getContinuum().getBuild( buildId );
+        BuildResult build = getContinuum().getBuildResult( buildId );
 
         while ( build.getState() == ContinuumProjectState.UPDATING ||
             build.getState() == ContinuumProjectState.BUILDING )
@@ -513,7 +519,7 @@
 
             Thread.yield();
 
-            build = getContinuum().getBuild( buildId );
+            build = getContinuum().getBuildResult( buildId );
         }
 
         return build;
@@ -580,20 +586,20 @@
         }
     }
 
-    public ContinuumBuild assertSuccessfulNoBuildPerformed( String buildId )
+    public BuildResult assertSuccessfulNoBuildPerformed( int buildId )
         throws Exception
     {
-        ContinuumBuild build = waitForBuild( buildId );
+        BuildResult build = waitForBuild( buildId );
 
         assertEquals( "The build wasn't successful.", ContinuumProjectState.OK, build.getState() );
 
         return build;
     }
 
-    public ContinuumBuild assertSuccessfulBuild( String buildId, String projectId )
+    public BuildResult assertSuccessfulBuild( int buildId, String projectId )
         throws Exception
     {
-        ContinuumBuild build = waitForBuild( buildId );
+        BuildResult build = waitForBuild( buildId );
 
         if ( build.getState() != ContinuumProjectState.OK )
         {
@@ -615,22 +621,22 @@
         return build;
     }
 
-    public ContinuumBuild assertSuccessfulMaven1Build( String buildId, String projectId )
+    public BuildResult assertSuccessfulMaven1Build( int buildId, String projectId )
         throws Exception
     {
         return assertSuccessfulAntBuild( buildId, projectId );
     }
 
-    public ContinuumBuild assertSuccessfulMaven2Build( String buildId, String projectId )
+    public BuildResult assertSuccessfulMaven2Build( int buildId, String projectId )
         throws Exception
     {
         return assertSuccessfulMaven1Build( buildId, projectId );
     }
 
-    public ContinuumBuild assertSuccessfulAntBuild( String buildId, String projectId )
+    public BuildResult assertSuccessfulAntBuild( int buildId, String projectId )
         throws Exception
     {
-        ContinuumBuild build = assertSuccessfulBuild( buildId, projectId );
+        BuildResult build = assertSuccessfulBuild( buildId, projectId );
 
         String output = getStore().getBuildOutput( buildId, projectId );
 
@@ -643,10 +649,10 @@
         return build;
     }
 
-    public ContinuumBuild assertSuccessfulShellBuild( String buildId, String projectId, String expectedStandardOutput )
+    public BuildResult assertSuccessfulShellBuild( int buildId, String projectId, String expectedStandardOutput )
         throws Exception
     {
-        ContinuumBuild build = assertSuccessfulBuild( buildId, projectId );
+        BuildResult build = assertSuccessfulBuild( buildId, projectId );
 
         String output = getStore().getBuildOutput( buildId, projectId );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -70,7 +70,7 @@
 
         progress( "Building SVN Ant project" );
 
-        String buildId = buildProject( project.getId(), false ).getId();
+        int buildId = buildProject( project.getId(), false ).getId();
 
         assertSuccessfulAntBuild( buildId, project.getId() );
 
@@ -110,7 +110,7 @@
 
         progress( "Building CVS Ant project" );
 
-        String buildId = buildProject( projectId, false ).getId();
+        int buildId = buildProject( projectId, false ).getId();
 
         assertSuccessfulAntBuild( buildId, projectId );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,10 +18,10 @@
 
 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.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.project.AntProject;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
@@ -142,7 +142,7 @@
         throw new UnsupportedOperationException();
     }
 
-    public ContinuumBuild getLatestBuildForProject( String projectId )
+    public BuildResult getLatestBuildResultForProject( String projectId )
         throws ContinuumException
     {
         throw new UnsupportedOperationException();
@@ -181,28 +181,6 @@
     }
 
     public void buildProject( String projectId, boolean force )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    // ----------------------------------------------------------------------
-    // Build information
-    // ----------------------------------------------------------------------
-
-    public ContinuumBuild getBuild( String buildId )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Collection getBuildsForProject( String projectId )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Collection getChangedFilesForBuild( String buildId )
         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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -65,7 +65,7 @@
 
         progress( "Building Maven 1 project" );
 
-        String buildId = buildProject( projectId, false ).getId();
+        int buildId = buildProject( projectId, false ).getId();
 
         assertSuccessfulMaven1Build( buildId, projectId );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,8 +18,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.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.util.FileUtils;
@@ -75,19 +75,25 @@
 
         progress( "Building Maven 2 project" );
 
-        String buildId = buildProject( projectId, false ).getId();
+        int originalSize = project.getBuilds().size();
+
+        int buildId = buildProject( projectId, false ).getId();
 
         assertSuccessfulMaven2Build( buildId, projectId );
 
         progress( "Test that a build without any files changed won't execute the executor" );
 
-        int expectedSize = continuum.getBuildsForProject( projectId ).size();
+        project = continuum.getProject( projectId );
+        int expectedSize = project.getBuilds().size();
+
+        assertEquals( "build list was not updated", originalSize + 1, expectedSize );
 
         continuum.buildProject( projectId, false );
 
         Thread.sleep( 3000 );
 
-        int actualSize = continuum.getBuildsForProject( projectId ).size();
+        project = continuum.getProject( projectId );
+        int actualSize = project.getBuilds().size();
 
         assertEquals( "A build has unexpectedly been executed.", expectedSize, actualSize );
 
@@ -95,7 +101,7 @@
 
         buildId = buildProject( projectId, true ).getId();
 
-        ContinuumBuild build = assertSuccessfulMaven2Build( buildId, projectId );
+        BuildResult build = assertSuccessfulMaven2Build( buildId, projectId );
 
         assertEquals( "The 'build forced' flag wasn't true", ContinuumProjectState.TRIGGER_FORCED, build.getTrigger() );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -69,7 +69,7 @@
         ContinuumProject project = continuum.getProject( projectId );
         assertProject( projectId, "Shell Project", "3.0", "", "shell", project );
         progress( "Building Shell project" );
-        String buildId = buildProject( projectId, false ).getId();
+        int buildId = buildProject( projectId, false ).getId();
         assertSuccessfulShellBuild( buildId, projectId, "" );
 
         // Test project reconfiguration

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -31,11 +31,11 @@
 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.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.project.AntProject;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
@@ -136,12 +136,12 @@
         }
     }
 
-    public ContinuumBuild getLatestBuildForProject( String id )
+    public BuildResult getLatestBuildResultForProject( String id )
         throws ContinuumException
     {
         try
         {
-            return store.getLatestBuildForProject( id );
+            return store.getLatestBuildResultForProject( id );
         }
         catch ( ContinuumStoreException e )
         {
@@ -317,6 +317,19 @@
         }
     }
 
+    public BuildResult getBuildResult( int buildId )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.getBuildResult( buildId );
+        }
+        catch ( ContinuumObjectNotFoundException e )
+        {
+            throw logAndCreateException( "Exception while getting build result for project.", e );
+        }
+    }
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -331,45 +344,6 @@
     // Build inforation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuild getBuild( String buildId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Unable to retrieve build with id = " + buildId, e );
-        }
-    }
-
-    public Collection getBuildsForProject( String projectId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getBuildsForProject( projectId, 0, 0 );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve builds for project with id = " + projectId, e );
-        }
-    }
-
-    public Collection getChangedFilesForBuild( String buildId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getChangedFilesForBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
-        }
-    }
-
     // ----------------------------------------------------------------------
     // Ant Projects
     // ----------------------------------------------------------------------
@@ -814,6 +788,19 @@
     public ContinuumBuildSettings getDefaultBuildSettings()
     {
         return initializer.getDefaultBuildSettings();
+    }
+
+    public Collection getBuildResultsForProject( String projectId )
+        throws ContinuumException
+    {
+        try
+        {
+            return store.getProject( projectId ).getBuilds();
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Unable to get builds for project", e );
+        }
     }
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java?rev=232681&r1=232680&r2=232681&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/TestUtils.java Sun Aug 14 17:34:39 2005
@@ -17,7 +17,7 @@
  */
 
 import junit.framework.Assert;
-import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
 
@@ -33,34 +33,37 @@
     // Wait for build
     // ----------------------------------------------------------------------
 
-    public final static ContinuumBuild waitForSuccessfulBuild( ContinuumStore continuumStore, String buildId )
+    public static final BuildResult waitForSuccessfulBuild( ContinuumStore continuumStore, int buildId )
         throws Exception
     {
-        ContinuumBuild build = waitForBuild( continuumStore, buildId );
+        BuildResult build = waitForBuild( continuumStore, buildId );
 
         Assert.assertEquals( ContinuumProjectState.OK, build.getState() );
 
         return build;
     }
 
-    public final static ContinuumBuild waitForFailedBuild( ContinuumStore continuumStore, String buildId )
+    public static final BuildResult waitForFailedBuild( ContinuumStore continuumStore, int buildId )
         throws Exception
     {
-        ContinuumBuild build = waitForBuild( continuumStore, buildId );
+        BuildResult build = waitForBuild( continuumStore, buildId );
 
         Assert.assertEquals( ContinuumProjectState.FAILED, build.getState() );
 
         return build;
     }
 
-    public final static ContinuumBuild waitForBuild( ContinuumStore continuumStore, String buildId )
+    /**
+     * @todo use proper thread notification
+     */
+    public static final BuildResult waitForBuild( ContinuumStore continuumStore, int buildId )
         throws Exception
     {
         int time = buildTimeout;
 
         int interval = 100;
 
-        ContinuumBuild result;
+        BuildResult result;
 
         while ( time > 0 )
         {
@@ -68,7 +71,7 @@
 
             time -= interval;
 
-            result = continuumStore.getBuild( buildId );
+            result = continuumStore.getBuildResult( buildId );
 
             Assert.assertNotNull( result );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -17,9 +17,9 @@
  */
 
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.ContinuumScmException;
@@ -31,7 +31,6 @@
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -67,6 +66,9 @@
     // BuildController Implementation
     // ----------------------------------------------------------------------
 
+    /**
+     * @todo structure of this method is a bit of a mess (too much exception/finally code)
+     */
     public void build( String projectId, boolean forced )
     {
         long startTime = System.currentTimeMillis();
@@ -80,7 +82,7 @@
 
         ContinuumProject project;
 
-        String buildId = null;
+        int buildId = 0;
 
         try
         {
@@ -144,7 +146,7 @@
                     if ( !StringUtils.isEmpty( checkoutErrorMessage ) ||
                         !StringUtils.isEmpty( checkoutErrorException ) || checkOutScmResult == null )
                     {
-                        ContinuumBuild build = makeBuildResult( scmResult, startTime, forced );
+                        BuildResult build = makeBuildResult( scmResult, startTime, forced );
 
                         String error = "";
 
@@ -176,13 +178,14 @@
 
                 actionManager.lookup( "execute-builder" ).execute( actionContext );
 
-                buildId = (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID );
+                buildId = Integer.valueOf(
+                    (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID ) ).intValue();
             }
             catch ( Throwable e )
             {
                 getLogger().error( "Error while building project.", e );
 
-                ContinuumBuild build = makeBuildResult( scmResult, startTime, forced );
+                BuildResult build = makeBuildResult( scmResult, startTime, forced );
 
                 // This can happen if the "update project from scm" action fails
 
@@ -233,13 +236,13 @@
         }
         finally
         {
-            ContinuumBuild build = null;
+            BuildResult build = null;
 
-            if ( buildId != null )
+            if ( buildId > 0 )
             {
                 try
                 {
-                    build = store.getBuild( buildId );
+                    build = store.getBuildResult( buildId );
                 }
                 catch ( ContinuumStoreException e )
                 {
@@ -255,19 +258,20 @@
     //
     // ----------------------------------------------------------------------
 
-    private ContinuumBuild storeBuild( ContinuumProject project, ContinuumBuild build )
+    // 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.addBuild( project.getId(), build );
+        build = store.addBuildResult( project, build );
 
         getLogger().info( "Build id: '" + build.getId() + "'." );
 
         return build;
     }
 
-    private ContinuumBuild makeBuildResult( ScmResult scmResult, long startTime, boolean forced )
+    private BuildResult makeBuildResult( ScmResult scmResult, long startTime, boolean forced )
     {
-        ContinuumBuild build = new ContinuumBuild();
+        BuildResult build = new BuildResult();
 
         build.setState( ContinuumProjectState.ERROR );
 
@@ -287,8 +291,6 @@
     public boolean isNew( ContinuumProject project )
         throws ContinuumStoreException
     {
-        Collection builds = store.getBuildsForProject( project.getId(), 0, 0 );
-
-        return builds.size() == 0;
+        return project.getBuilds().size() == 0;
     }
 }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -19,17 +19,15 @@
 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.BuildResult;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ContinuumUtils;
 
 import java.io.File;
-import java.util.Collection;
 import java.util.Date;
 import java.util.Map;
 
@@ -76,7 +74,7 @@
         // Make the build
         // ----------------------------------------------------------------------
 
-        ContinuumBuild build = new ContinuumBuild();
+        BuildResult build = new BuildResult();
 
         build.setStartTime( new Date().getTime() );
 
@@ -87,21 +85,15 @@
 
         build.setScmResult( scmResult );
 
-        String buildId = store.addBuild( project.getId(), build ).getId();
+        build = store.addBuildResult( project, build );
 
-        context.put( KEY_BUILD_ID, buildId );
-
-        // ----------------------------------------------------------------------
-        //
-        // ----------------------------------------------------------------------
-
-        build = store.getBuild( buildId );
+        context.put( KEY_BUILD_ID, Integer.toString( build.getId() ) );
 
         try
         {
             notifier.runningGoals( project, build );
 
-            File buildOutputFile = store.getBuildOutputFile( buildId, project.getId() );
+            File buildOutputFile = store.getBuildOutputFile( build.getId(), project.getId() );
 
             ContinuumBuildExecutionResult result = buildExecutor.build( project, buildOutputFile );
 
@@ -123,7 +115,7 @@
             // Copy over the build result
             // ----------------------------------------------------------------------
 
-            build = store.updateBuild( build );
+            store.updateBuildResult( build );
 
             notifier.goalsCompleted( project, build );
         }
@@ -134,10 +126,7 @@
     // ----------------------------------------------------------------------
 
     private boolean isNew( ContinuumProject project )
-        throws ContinuumStoreException
     {
-        Collection builds = store.getBuildsForProject( project.getId(), 0, 0 );
-
-        return builds.size() == 0;
+        return project.getBuilds().size() == 0;
     }
 }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
@@ -74,17 +74,17 @@
         sendNotification( MESSAGE_ID_CHECKOUT_COMPLETE, project, null );
     }
 
-    public void runningGoals( ContinuumProject project, ContinuumBuild build )
+    public void runningGoals( ContinuumProject project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_RUNNING_GOALS, project, build );
     }
 
-    public void goalsCompleted( ContinuumProject project, ContinuumBuild build )
+    public void goalsCompleted( ContinuumProject project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_GOALS_COMPLETED, project, build );
     }
 
-    public void buildComplete( ContinuumProject project, ContinuumBuild build )
+    public void buildComplete( ContinuumProject project, BuildResult build )
     {
         sendNotification( MESSAGE_ID_BUILD_COMPLETE, project, build );
     }
@@ -93,7 +93,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private void sendNotification( String messageId, ContinuumProject project, ContinuumBuild build )
+    private void sendNotification( String messageId, ContinuumProject project, BuildResult build )
     {
         Map context = new HashMap();
 
@@ -106,12 +106,15 @@
         try
         {
             // TODO: remove re-reading?
+            // 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() ) );
 
             if ( build != null )
             {
                 // TODO: remove?
-                build = store.getBuild( build.getId() );
+                build = store.getBuildResult( build.getId() );
 
                 context.put( CONTEXT_BUILD, build );
 

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -16,8 +16,8 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.notification.NotificationException;
 import org.codehaus.plexus.notification.notifier.AbstractNotifier;
@@ -43,7 +43,7 @@
     {
         ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
-        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
+        BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_STARTED ) )
         {
@@ -94,12 +94,12 @@
         out( project, null, "Checkout complete." );
     }
 
-    private void runningGoals( ContinuumProject project, ContinuumBuild build )
+    private void runningGoals( ContinuumProject project, BuildResult build )
     {
         out( project, build, "Running goals." );
     }
 
-    private void goalsCompleted( ContinuumProject project, ContinuumBuild build )
+    private void goalsCompleted( ContinuumProject project, BuildResult build )
     {
         if ( build.getError() == null )
         {
@@ -111,7 +111,7 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, ContinuumBuild build )
+    private void buildComplete( ContinuumProject project, BuildResult build )
     {
         if ( build.getError() == null )
         {
@@ -123,7 +123,7 @@
         }
     }
 
-    private void out( ContinuumProject project, ContinuumBuild build, String msg )
+    private void out( ContinuumProject 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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,13 +18,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.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.notification.ContinuumRecipientSource;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.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;
@@ -162,15 +161,12 @@
     // Notifier Implementation
     // ----------------------------------------------------------------------
 
-    public void sendNotification( String source,
-                                  Set recipients,
-                                  Map configuration,
-                                  Map context )
+    public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
         ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
-        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
+        BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         String buildOutput = (String) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD_OUTPUT );
 
@@ -191,12 +187,7 @@
         {
             if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
             {
-                buildComplete( project,
-                               build,
-                               buildOutput,
-                               source,
-                               recipients,
-                               configuration );
+                buildComplete( project, build, buildOutput, source, recipients, configuration );
             }
         }
         catch ( ContinuumException e )
@@ -205,19 +196,15 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project,
-                                ContinuumBuild build,
-                                String buildOutput,
-                                String source,
-                                Set recipients,
-                                Map configuration )
+    private void buildComplete( ContinuumProject project, BuildResult build, String buildOutput, String source,
+                                Set recipients, Map configuration )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
         // Check if the mail should be sent at all
         // ----------------------------------------------------------------------
 
-        ContinuumBuild previousBuild = getPreviousBuild( project, build );
+        BuildResult previousBuild = getPreviousBuild( project, build );
 
         if ( !shouldNotify( build, previousBuild ) )
         {
@@ -278,7 +265,7 @@
         }
         catch ( Exception e )
         {
-            throw new ContinuumException( "Error while generating mail contents." , e );
+            throw new ContinuumException( "Error while generating mail contents.", e );
         }
 
         // ----------------------------------------------------------------------
@@ -294,7 +281,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateSubject( ContinuumProject project, ContinuumBuild build )
+    private String generateSubject( ContinuumProject project, BuildResult build )
     {
         int state = build.getState();
 
@@ -318,10 +305,7 @@
         }
     }
 
-    private void sendMessage( ContinuumProject project,
-                              Set recipients,
-                              String subject,
-                              String content,
+    private void sendMessage( ContinuumProject project, Set recipients, String subject, String content,
                               Map configuration )
         throws ContinuumException
     {
@@ -339,7 +323,8 @@
 
         if ( fromMailbox == null )
         {
-            getLogger().warn( project.getName() + ": Project is missing nag email and global from mailbox is missing, not sending mail." );
+            getLogger().warn( project.getName() +
+                ": Project is missing nag email and global from mailbox is missing, not sending mail." );
 
             return;
         }
@@ -369,7 +354,7 @@
                 String mailbox = (String) it.next();
 
                 // TODO: set a proper name
-                MailMessage.Address to = new MailMessage.Address( mailbox  );
+                MailMessage.Address to = new MailMessage.Address( mailbox );
 
                 getLogger().info( "Recipient: To '" + to + "'." );
 
@@ -406,7 +391,7 @@
         return address;
     }
 
-    private boolean shouldNotify( ContinuumBuild build, ContinuumBuild previousBuild )
+    private boolean shouldNotify( BuildResult build, BuildResult previousBuild )
     {
         if ( build == null )
         {
@@ -414,8 +399,7 @@
         }
 
         // Always send if the project failed
-        if ( build.getState() == ContinuumProjectState.FAILED ||
-             build.getState() == ContinuumProjectState.ERROR)
+        if ( build.getState() == ContinuumProjectState.FAILED || build.getState() == ContinuumProjectState.ERROR )
         {
             return true;
         }
@@ -427,7 +411,8 @@
         }
 
         // Send if the state has changed
-        getLogger().info( "Current build state: " + build.getState() + ", previous build state: " + previousBuild.getState() );
+        getLogger().info(
+            "Current build state: " + build.getState() + ", previous build state: " + previousBuild.getState() );
 
         if ( build.getState() != previousBuild.getState() )
         {
@@ -439,33 +424,23 @@
         return false;
     }
 
-    private ContinuumBuild getPreviousBuild( ContinuumProject project, ContinuumBuild currentBuild )
+    private BuildResult getPreviousBuild( ContinuumProject project, BuildResult currentBuild )
         throws ContinuumException
     {
-        Collection builds;
-
-        try
-        {
-            builds = store.getBuildsForProject( project.getId(), 0, 0 );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw new ContinuumException( "Error while finding the last project build.", ex );
-        }
+        Collection builds = project.getBuilds();
 
         if ( builds.size() == 0 )
         {
             return null;
         }
 
-        Iterator itr =  builds.iterator();
-        ContinuumBuild build = (ContinuumBuild) itr.next();
+        Iterator itr = builds.iterator();
+        BuildResult build = (BuildResult) itr.next();
 
-        if ( currentBuild != null && !build.getId().equals( currentBuild.getId() ) )
+        if ( currentBuild != null && build.getId() != currentBuild.getId() )
         {
             throw new ContinuumException( "INTERNAL ERROR: The current build wasn't the first in the build list. " +
-                                          "Current build: '" + currentBuild.getId() + "', " +
-                                          "first build: '" + build.getId() + "'." );
+                "Current build: '" + currentBuild.getId() + "', " + "first build: '" + build.getId() + "'." );
         }
 
         if ( !itr.hasNext() )
@@ -473,7 +448,7 @@
             return null;
         }
 
-        return (ContinuumBuild) itr.next();
+        return (BuildResult) itr.next();
     }
 
     /**

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=232681&r1=232680&r2=232681&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Sun Aug 14 17:34:39 2005
@@ -17,7 +17,9 @@
  */
 
 import org.apache.maven.continuum.AbstractContinuumTest;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
 
 /**
@@ -37,13 +39,13 @@
 
         Project project = addProject( store, "Notification Dispatcher Test Project" );
 
-/* TODO
-        ContinuumBuild build = new ContinuumBuild();
+        BuildResult build = new BuildResult();
         build.setStartTime( System.currentTimeMillis() );
         build.setState( ContinuumProjectState.BUILDING );
-        build.setForced( false );
+        build.setTrigger( ContinuumProjectState.TRIGGER_UNKNOWN ); // TODO
 
-        build = store.addBuild( Integer.toString( project.getId() ), build );
+/* TODO
+        build = store.addBuildResult( project, build );
 
         notificationDispatcher.buildComplete( project, build );
 */

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java?rev=232681&r1=232680&r2=232681&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java Sun Aug 14 17:34:39 2005
@@ -33,13 +33,11 @@
     public void testSuccessfulBuild()
         throws Exception
     {
-        ContinuumProject project = makeStubMavenTwoProject( "Test Project" );
+        Project project = makeStubProject( "Test Project" );
 
-        ContinuumBuild build = makeBuild( ContinuumProjectState.OK );
+        BuildResult build = makeBuild( ContinuumProjectState.OK );
 
-        MailMessage mailMessage = sendNotificationAndGetMessage( project,
-                                                                 build,
-                                                                 "lots out build output" );
+        MailMessage mailMessage = sendNotificationAndGetMessage( project, build, "lots out build output" );
 
         dumpContent( mailMessage );
     }
@@ -47,13 +45,11 @@
     public void testFailedBuild()
         throws Exception
     {
-        ContinuumProject project = makeStubMavenTwoProject( "Test Project" );
+        Project project = makeStubProject( "Test Project" );
 
-        ContinuumBuild build = makeBuild( ContinuumProjectState.FAILED );
+        BuildResult build = makeBuild( ContinuumProjectState.FAILED );
 
-        MailMessage mailMessage = sendNotificationAndGetMessage( project,
-                                                                 build,
-                                                                 "output" );
+        MailMessage mailMessage = sendNotificationAndGetMessage( project, build, "output" );
 
         dumpContent( mailMessage );
     }
@@ -61,15 +57,13 @@
     public void testErrorenousBuild()
         throws Exception
     {
-        ContinuumProject project = makeStubMavenTwoProject( "Test Project" );
+        Project project = makeStubProject( "Test Project" );
 
-        ContinuumBuild build = makeBuild( ContinuumProjectState.ERROR );
+        BuildResult build = makeBuild( ContinuumProjectState.ERROR );
 
         build.setError( "Big long error message" );
 
-        MailMessage mailMessage = sendNotificationAndGetMessage( project,
-                                                                 build,
-                                                                 "lots of stack traces" );
+        MailMessage mailMessage = sendNotificationAndGetMessage( project, build, "lots of stack traces" );
 
         dumpContent( mailMessage );
     }
@@ -87,8 +81,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private MailMessage sendNotificationAndGetMessage( ContinuumProject project, ContinuumBuild build,
-                                                       String buildOutput )
+    private MailMessage sendNotificationAndGetMessage( Project project, BuildResult build, String buildOutput )
         throws Exception
     {
         Set recipients = new HashSet();
@@ -144,11 +137,11 @@
         return mailMessage;
     }
 
-    private ContinuumBuild makeBuild( int state )
+    private BuildResult makeBuild( int state )
     {
-        ContinuumBuild build = new ContinuumBuild();
+        BuildResult build = new BuildResult();
 
-        build.setId( "17" );
+        build.setId( 17 );
 
         build.setStartTime( System.currentTimeMillis() );
 
@@ -159,16 +152,6 @@
         build.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
 
         build.setExitCode( 10 );
-
-        ScmResult scmResult = new ScmResult();
-
-        ScmFile file = new ScmFile();
-
-        file.setPath( "/hey/yo/lets/go" );
-
-        scmResult.getFiles().add( file );
-
-        build.setScmResult( scmResult );
 
         return build;
     }

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=232681&r1=232680&r2=232681&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Sun Aug 14 17:34:39 2005
@@ -778,7 +778,7 @@
           <name>builds</name>
           <version>1.0.0</version>
           <association stash.part="true">
-            <type>ContinuumBuild</type>
+            <type>BuildResult</type>
             <multiplicity>*</multiplicity>
           </association>
         </field>
@@ -906,84 +906,6 @@
           <name>commandLineArguments</name>
           <version>1.0.0</version>
           <type>String</type>
-        </field>
-      </fields>
-    </class>
-
-    <!--
-    |
-    | Builds
-    |
-    -->
-    <class stash.storable="true">
-      <packageName>org.apache.maven.continuum.project</packageName>
-      <name>ContinuumBuild</name>
-      <version>1.0.0</version>
-      <description><![CDATA[
-          This class is a single continuum build.
-          It has a reference to a {@link BuilderBuildResult} which contains
-          any builder specific objects/variables.</description>
-        ]]></description>
-      <fields>
-        <!-- TODO: this is often used as a build number - it shouldn't be user facing -->
-        <field>
-          <name>id</name>
-          <version>1.0.0</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>state</name>
-          <version>1.0.0</version>
-          <type>int</type>
-          <!--
-          <association>
-            <type>BuildResultState</type>
-          </association>
-          -->
-        </field>
-        <field>
-          <name>trigger</name>
-          <version>1.0.0</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>startTime</name>
-          <version>1.0.0</version>
-          <type>long</type>
-        </field>
-        <field>
-          <name>endTime</name>
-          <version>1.0.0</version>
-          <type>long</type>
-        </field>
-        <field stash.maxSize="8000">
-          <name>error</name>
-          <version>1.0.0</version>
-          <type>String</type>
-          <!--
-          <association>
-            <type>java.lang.Throwable</type>
-          </association>
-          -->
-        </field>
-
-        <field>
-          <name>success</name>
-          <version>1.0.0</version>
-          <type>boolean</type>
-        </field>
-        <field>
-          <name>exitCode</name>
-          <version>1.0.0</version>
-          <type>int</type>
-        </field>
-        <field>
-          <name>scmResult</name>
-          <version>1.0.0</version>
-          <association stash.part="true">
-            <type>ScmResult</type>
-          </association>
         </field>
       </fields>
     </class>

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -27,7 +27,7 @@
       <field name="groupId" persistence-modifier="persistent"/>
       <!-- Collections -->
       <field name="builds" persistence-modifier="persistent">
-        <collection element-type="ContinuumBuild" dependent-element="true"/>
+        <collection element-type="org.apache.maven.continuum.model.project.BuildResult" dependent-element="true"/>
         <join/>
       </field>
       <field name="developers" persistence-modifier="persistent">
@@ -85,21 +85,6 @@
       </field>
       <field name="targets" persistence-modifier="persistent"/>
     </class>
-    <class name="ContinuumBuild" detachable="true" identity-type="application"
-           objectid-class="javax.jdo.identity.StringIdentity" table="build">
-      <field name="id" persistence-modifier="persistent" primary-key="true" value-strategy="native"/>
-      <field name="state" persistence-modifier="persistent"/>
-      <field name="trigger" persistence-modifier="persistent"/>
-      <field name="startTime" persistence-modifier="persistent"/>
-      <field name="endTime" persistence-modifier="persistent"/>
-      <field name="error" persistence-modifier="persistent">
-        <extension vendor-name="jpox" key="length" value="max 8000"/>
-      </field>
-      <field name="success" persistence-modifier="persistent"/>
-      <field name="exitCode" persistence-modifier="persistent"/>
-      <field name="scmResult" persistence-modifier="persistent" default-fetch-group="true" dependent="true"/>
-    </class>
-
     <class name="ContinuumBuildSettings" detachable="true">
       <field name="name" persistence-modifier="persistent"/>
       <field name="cronExpression" persistence-modifier="persistent"/>
@@ -145,6 +130,7 @@
       <field name="url"/>
       <field name="artifactId"/>
       <field name="groupId"/>
+      <!-- TODO: these could grow large. lazy load, or perhaps archive old builds? Maybe they shouldn't be objects in here, but just extracted by id -->
       <field name="buildResults" mapped-by="project">
         <collection element-type="BuildResult" dependent-element="true"/>
       </field>

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -19,7 +19,7 @@
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
-import org.apache.maven.continuum.project.ContinuumBuild;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.notification.notifier.AbstractNotifier;
 
@@ -32,7 +32,7 @@
      * @param project The project
      * @param build The build
      */
-    public String getReportUrl( ContinuumProject project, ContinuumBuild build, ConfigurationService configurationService )
+    public String getReportUrl( ContinuumProject project, BuildResult build, ConfigurationService configurationService )
         throws ContinuumException
     {
         try
@@ -47,7 +47,8 @@
                 buf.append( "/" );
             }
 
-            buf.append( "target/ProjectBuild.vm/view/ProjectBuild/id/" ).append( project.getId() ).append( "/buildId/" ).append( build.getId() );
+            buf.append( "target/ProjectBuild.vm/view/ProjectBuild/id/" ).append( project.getId() ).append(
+                "/buildId/" ).append( build.getId() );
 
             return buf.toString();
         }

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,16 +18,14 @@
 
 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.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
-
-import org.codehaus.plexus.notification.NotificationException;
 import org.codehaus.plexus.ircbot.IrcBot;
+import org.codehaus.plexus.notification.NotificationException;
 
 import java.util.Collection;
 import java.util.Iterator;
@@ -65,15 +63,12 @@
     // Notifier Implementation
     // ----------------------------------------------------------------------
 
-    public void sendNotification( String source,
-                                  Set recipients,
-                                  Map configuration,
-                                  Map context )
+    public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
         ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
-        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
+        BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
@@ -101,16 +96,14 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project,
-                                ContinuumBuild build,
-                                Map configuration )
+    private void buildComplete( ContinuumProject project, BuildResult build, Map configuration )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
         // Check if the message should be sent at all
         // ----------------------------------------------------------------------
 
-        ContinuumBuild previousBuild = getPreviousBuild( project, build );
+        BuildResult previousBuild = getPreviousBuild( project, build );
 
         if ( !shouldNotify( build, previousBuild ) )
         {
@@ -139,7 +132,7 @@
 
             ircClient.sendMessageToChannel( channel, generateMessage( project, build ) );
         }
-        catch( Exception e )
+        catch ( Exception e )
         {
             throw new ContinuumException( "Exception while sending message.", e );
         }
@@ -149,7 +142,7 @@
             {
                 ircClient.logoff();
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 throw new ContinuumException( "Exception while logoff.", e );
             }
@@ -159,7 +152,7 @@
                 {
                     ircClient.disconnect();
                 }
-                catch( Exception e )
+                catch ( Exception e )
                 {
                     throw new ContinuumException( "Exception while disconnecting.", e );
                 }
@@ -167,7 +160,7 @@
         }
     }
 
-    private String generateMessage( ContinuumProject project, ContinuumBuild build )
+    private String generateMessage( ContinuumProject project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -196,7 +189,7 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private boolean shouldNotify( ContinuumBuild build, ContinuumBuild previousBuild )
+    private boolean shouldNotify( BuildResult build, BuildResult previousBuild )
     {
         if ( build == null )
         {
@@ -217,8 +210,7 @@
 
         // Send if the state has changed
         getLogger().info(
-                          "Current build state: " + build.getState() + ", previous build state: "
-                              + previousBuild.getState() );
+            "Current build state: " + build.getState() + ", previous build state: " + previousBuild.getState() );
 
         if ( build.getState() != previousBuild.getState() )
         {
@@ -230,19 +222,10 @@
         return false;
     }
 
-    private ContinuumBuild getPreviousBuild( ContinuumProject project, ContinuumBuild currentBuild )
+    private BuildResult getPreviousBuild( ContinuumProject project, BuildResult currentBuild )
         throws ContinuumException
     {
-        Collection builds;
-
-        try
-        {
-            builds = store.getBuildsForProject( project.getId(), 0, 0 );
-        }
-        catch ( ContinuumStoreException ex )
-        {
-            throw new ContinuumException( "Error while finding the last project build.", ex );
-        }
+        Collection builds = project.getBuilds();
 
         if ( builds.size() == 0 )
         {
@@ -250,13 +233,12 @@
         }
 
         Iterator itr = builds.iterator();
-        ContinuumBuild build = (ContinuumBuild) itr.next();
+        BuildResult build = (BuildResult) itr.next();
 
-        if ( currentBuild != null && !build.getId().equals( currentBuild.getId() ) )
+        if ( currentBuild != null && build.getId() != currentBuild.getId() )
         {
-            throw new ContinuumException( "INTERNAL ERROR: The current build wasn't the first in the build list. "
-                                          + "Current build: '" + currentBuild.getId() + "', " + "first build: '"
-                                          + build.getId() + "'." );
+            throw new ContinuumException( "INTERNAL ERROR: The current build wasn't the first in the build list. " +
+                "Current build: '" + currentBuild.getId() + "', " + "first build: '" + build.getId() + "'." );
         }
 
         if ( !itr.hasNext() )
@@ -264,7 +246,7 @@
             return null;
         }
 
-        return (ContinuumBuild) itr.next();
+        return (BuildResult) itr.next();
     }
 
     /**

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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,9 +18,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.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.jabber.JabberClient;
@@ -81,15 +81,12 @@
     // Notifier Implementation
     // ----------------------------------------------------------------------
 
-    public void sendNotification( String source,
-                                  Set recipients,
-                                  Map configuration,
-                                  Map context )
+    public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
         ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
-        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
+        BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
         //
@@ -116,7 +113,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( ContinuumProject project, ContinuumBuild build )
+    private String generateMessage( ContinuumProject project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -145,10 +142,7 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void sendMessage( ContinuumProject project,
-                              ContinuumBuild build,
-                              Set recipients,
-                              Map configuration )
+    private void sendMessage( ContinuumProject 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=232681&r1=232680&r2=232681&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 Sun Aug 14 17:34:39 2005
@@ -18,9 +18,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.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
-import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.codehaus.plexus.msn.MsnClient;
@@ -75,15 +75,12 @@
     // Notifier Implementation
     // ----------------------------------------------------------------------
 
-    public void sendNotification( String source,
-                                  Set recipients,
-                                  Map configuration,
-                                  Map context )
+    public void sendNotification( String source, Set recipients, Map configuration, Map context )
         throws NotificationException
     {
         ContinuumProject project = (ContinuumProject) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT );
 
-        ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
+        BuildResult build = (BuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
         // ----------------------------------------------------------------------
         //
@@ -110,7 +107,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private String generateMessage( ContinuumProject project, ContinuumBuild build )
+    private String generateMessage( ContinuumProject project, BuildResult build )
         throws ContinuumException
     {
         int state = build.getState();
@@ -139,10 +136,7 @@
         return message + " " + getReportUrl( project, build, configurationService );
     }
 
-    private void sendMessage( ContinuumProject project,
-                              ContinuumBuild build,
-                              Set recipients,
-                              Map configuration )
+    private void sendMessage( ContinuumProject project, BuildResult build, Set recipients, Map configuration )
         throws NotificationException
     {
         String message;

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/AbstractContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/AbstractContinuumStore.java?rev=232681&r1=232680&r2=232681&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/AbstractContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/AbstractContinuumStore.java Sun Aug 14 17:34:39 2005
@@ -37,7 +37,7 @@
      */
     private ConfigurationService configurationService;
 
-    public String getBuildOutput( String buildId, String projectId )
+    public String getBuildOutput( int buildId, String projectId )
         throws ContinuumStoreException
     {
         File file = getBuildOutputFile( buildId, projectId );
@@ -58,7 +58,7 @@
     //
     // ----------------------------------------------------------------------
 
-    public File getBuildOutputFile( String buildId, String projectId )
+    public File getBuildOutputFile( int buildId, String projectId )
         throws ContinuumStoreException
     {
         File dir = new File( configurationService.getBuildOutputDirectory(), projectId );



Mime
View raw message