continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r190775 [1/2] - /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core-it /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2 /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-model/src/main/resources /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
Date Wed, 15 Jun 2005 16:32:44 GMT
Author: trygvis
Date: Wed Jun 15 09:32:41 2005
New Revision: 190775

URL: http://svn.apache.org/viewcvs?rev=190775&view=rev
Log:
o Merging ContinuumBuildResult into ContinuumBuild.
o Updating the ITs with latest changes to ContinuumProject, in particular:
 - Adding ContinuumNotifier
 - Adding ContinuumDeveloper

Added:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java   (with props)
Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core-it/continuum.py
    maven/continuum/trunk/continuum-core-it/continuum_cli.py
    maven/continuum/trunk/continuum-core-it/it.py
    maven/continuum/trunk/continuum-core-it/it_utils.py
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/console/ConsoleNotifier.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
    maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultXmlRpcHelper.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=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Wed Jun 15 09:32:41 2005
@@ -20,7 +20,6 @@
 
 import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
@@ -94,8 +93,8 @@
     Collection getBuildsForProject( String projectId )
         throws ContinuumException;
 
-    ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumException;
+//    ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumException;
 
     Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;

Added: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java?rev=190775&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java (added)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java Wed Jun 15 09:32:41 2005
@@ -0,0 +1,63 @@
+package org.apache.maven.continuum.execution;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class ContinuumBuildExecutionResult
+{
+    private boolean success;
+
+    private String standardOutput;
+
+    private String standardError;
+
+    private int exitCode;
+
+    public ContinuumBuildExecutionResult( boolean success, String standardOutput, String standardError, int exitCode )
+    {
+        this.success = success;
+
+        this.standardOutput = standardOutput;
+
+        this.standardError = standardError;
+
+        this.exitCode = exitCode;
+    }
+
+    public boolean isSuccess()
+    {
+        return success;
+    }
+
+    public String getStandardOutput()
+    {
+        return standardOutput;
+    }
+
+    public String getStandardError()
+    {
+        return standardError;
+    }
+
+    public int getExitCode()
+    {
+        return exitCode;
+    }
+}

Propchange: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutionResult.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java Wed Jun 15 09:32:41 2005
@@ -18,7 +18,6 @@
 
 import java.io.File;
 
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 
 /**
@@ -39,7 +38,7 @@
 
     String SHELL_EXECUTOR_ID = "shell";
 
-    ContinuumBuildResult build( ContinuumProject project )
+    ContinuumBuildExecutionResult build( ContinuumProject project )
         throws ContinuumBuildExecutorException;
 
     void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java Wed Jun 15 09:32:41 2005
@@ -19,8 +19,8 @@
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.UpdateScmResult;
@@ -91,7 +91,7 @@
      */
     void setBuildResult( String buildId,
                          int state,
-                         ContinuumBuildResult result,
+                         ContinuumBuildExecutionResult result,
                          UpdateScmResult scmResult,
                          Throwable error )
         throws ContinuumStoreException;
@@ -105,8 +105,8 @@
     Collection getBuildsForProject( String projectId, int start, int end )
         throws ContinuumStoreException;
 
-    ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumStoreException;
+//    ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumStoreException;
 
     List getChangedFilesForBuild( String buildId )
         throws ContinuumStoreException;
@@ -141,7 +141,7 @@
 
     void setBuildComplete( String buildId,
                            UpdateScmResult scmResult,
-                           ContinuumBuildResult result )
+                           ContinuumBuildExecutionResult result )
         throws ContinuumStoreException;
 
     void setBuildError( String buildId,

Modified: maven/continuum/trunk/continuum-core-it/continuum.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum.py?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum.py Wed Jun 15 09:32:41 2005
@@ -47,6 +47,12 @@
     else:
         return "UNKNOWN STATE (" + str( state ) + ")."
 
+def makeMailNotifier( address ):
+    notifier = ContinuumNotifier()
+
+    notifier.type = "mail"
+    notifier.configuration = { "address" : address }
+
 class Continuum:
     STATE_NEW = 1
     STATE_OK = 2
@@ -118,15 +124,15 @@
 
         return builds
 
-    def getBuildResultForBuild( self, buildId ):
-        result = checkResult( self.server.continuum.getBuildResultForBuild( buildId ) )
-
-        buildResult = result[ "buildResult" ]
-
-        if ( len( buildResult ) == 0 ):
-            return None
-
-        return BuildResult( buildResult )
+#    def getBuildResultForBuild( self, buildId ):
+#        result = checkResult( self.server.continuum.getBuildResultForBuild( buildId ) )
+#
+#        buildResult = result[ "buildResult" ]
+#
+#        if ( len( buildResult ) == 0 ):
+#            return None
+#
+#        return BuildResult( buildResult )
 
     def getChangedFilesForBuild( self, buildId ):
         result = checkResult( self.server.continuum.getBuildResultForBuild( buildId ) )
@@ -210,6 +216,8 @@
 class Project:
     def __init__( self, map ):
         self.map = map;
+        self.developers = []
+        self.notifiers = []
 
         if ( map == None ):
             return
@@ -218,7 +226,6 @@
         self.id = map[ "id" ]
         self.name = map[ "name" ]
         self.scmUrl = map[ "scmUrl" ]
-        self.nagEmailAddress = map[ "nagEmailAddress" ]
         self.version = map[ "version" ]
         self.workingDirectory = map[ "workingDirectory" ]
         self.state = int( map[ "state" ] )
@@ -244,20 +251,23 @@
         else:
             self.checkOutErrorException = None
 
+        self.developers = list()
+        if ( map.has_key( "developers" ) ):
+            for f in map[ "developers" ]:
+                self.developers.append( ContinuumDeveloper( f ) )
+
+        self.notifiers = list()
+        if ( map.has_key( "notifiers" ) ):
+            for f in map[ "notifiers" ]:
+                self.notifiers.append( ContinuumNotifier( f ) )
+
     def __str__( self ):
         s = "id: " + self.id + os.linesep +\
             "name: " + self.name + os.linesep +\
-            "nagEmailAddress: " + self.nagEmailAddress + os.linesep +\
             "state: " + decodeState( self.state ) + os.linesep +\
             "version: " + self.version + os.linesep +\
             "executor id: " + self.executorId + os.linesep
 
-#        if ( len( self.configuration.keys() ) > 0 ):
-#            conf = ""
-#            for key in self.configuration.keys():
-#                conf += os.linesep + key + "=" + self.configuration[ key ]
-#            s += conf
-
         return s
 
 class MavenTwoProject( Project ):
@@ -339,6 +349,17 @@
             self.error = ""
             map[ "error" ] = ""
 
+        self.success = map[ "success" ] == "true"
+        self.exitCode = int( map[ "exitCode" ] )
+        if ( map.has_key( "standardOutput" ) ):
+            self.standardOutput = map[ "standardOutput" ]
+        else:
+            self.standardOutput = None
+        if ( map.has_key( "standardError" ) ):
+            self.standardError = map[ "standardError" ]
+        else:
+            self.standardError = None
+
     def __str__( self ):
         s = "Id: " + self.id + os.linesep +\
             "State: " + decodeState( self.state ) + os.linesep +\
@@ -347,30 +368,14 @@
 
         if ( self.error != "" ):
             s += "Error: %(error)s" % self.map
-
-        return s
-
-class BuildResult:
-    def __init__( self, map ):
-        # This is the common stuff between all ContinuumBuildResult objects
-        self.success = map[ "success" ] == "true"
-
-        self.exitCode = int( map[ "exitCode" ] )
-        self.standardOutput = map[ "standardOutput" ]
-        self.standardError = map[ "standardError" ]
-
-    def __str__( self ):
         value = "Success: " + str( self.success )
-
         value += os.linesep + "Exit code: " + str( self.exitCode )
-
         if ( len( self.standardOutput ) > 0 ):
               value += os.linesep + "Standard output: " + self.standardOutput
-
         if ( len( self.standardError ) > 0 ):
                value += os.linesep + "Standard error: " + self.standardError
 
-        return value
+        return s
 
 class ScmResult:
     def __init__( self, map ):
@@ -389,8 +394,8 @@
 
     def __str__( self ):
         value = "Success: " + str( self.success ) + os.linesep +\
-                 "Provider Message: " + self.providerMessage + os.linesep +\
-                 "Command output: " + self.commandOutput
+                "Provider Message: " + self.providerMessage + os.linesep +\
+                "Command output: " + self.commandOutput
 
         return value
 
@@ -437,3 +442,34 @@
     def __init__( self, map ):
         self.map = map
         self.path = map[ "path" ]
+
+class ContinuumDeveloper:
+    def __init__( self, map ):
+        self.id = map[ "id" ]
+        self.name = map[ "name" ]
+        self.email = map[ "email" ]
+
+    def __str__( self ):
+        value = "id: " + self.id + os.linesep +\
+                "name: " + self.name + os.linesep +\
+                "email: " + self.email
+
+        return value
+
+class ContinuumNotifier:
+    def __init__( self, map=None ):
+        self.type = None
+        self.configuration = {}
+
+        if ( map == None ):
+            return
+
+        self.type = map[ "type" ]
+
+        if ( map.has_key( "configuration" ) ):
+            self.configuration = map[ "configuration" ]
+
+    def __str__( self ):
+        value = "type: " + self.type
+
+        return value

Modified: maven/continuum/trunk/continuum-core-it/continuum_cli.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum_cli.py?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum_cli.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum_cli.py Wed Jun 15 09:32:41 2005
@@ -44,7 +44,7 @@
     def do_addMavenTwoProject(self, args):
         """Add a Maven 2.x project."""
 
-        projectIds = continuum.addMavenTwoProject( args[0] )
+        projectIds = c.addMavenTwoProject( args[0] )
 
         print "Added " + str( len( projectIds ) ) + " projects."
         for id in projectIds:
@@ -53,7 +53,7 @@
     def do_addMavenOneProject(self, args):
         """Add a Maven 1.x project."""
 
-        projectId = continuum.addMavenOneProject( args[0] )
+        projectId = c.addMavenOneProject( args[0] )
 
         print "Added project, id: " + projectId
 
@@ -64,7 +64,7 @@
         """Shows Continuum project.
         Use this command to show the details of a Continuum project."""
 
-        project = continuum.getProject( args[0] )
+        project = c.getProject( args[0] )
 
         print "Project details:"
         print "Id: " + project.id
@@ -86,11 +86,7 @@
             print ""
             print project.checkOutScmResult
 
-            print "Project Configuration:"
-            for key in project.configuration.keys():
-                print key + "=" + project.configuration[ key ]
-
-            builds = continuum.getBuildsForProject( project.id, 0, 0 )
+            builds = c.getBuildsForProject( project.id, 0, 0 )
             print ""
             print "Project Builds:"
             print "|  Id  |  State |           Start time            |             End time            | Build time |"
@@ -98,11 +94,17 @@
                 build.state = continuum.decodeState( build.state )
                 print "| %(id)4s | %(state)6s | %(startTime)s | %(endTime)s | %(totalTime)10s |" % build.map
 
+        print ""
+        print "Notifiers:"
+        for notifier in project.notifiers:
+            print " type: " + notifier.type
+            print " configuration: " + str( notifier.configuration )
+
     def do_showProjects(self, args):
         """Shows all Continuum projects registeret.
         Use this command to list all Continuum projects."""
 
-        projects = continuum.getAllProjects()
+        projects = c.getAllProjects()
 
         print ""
         print "Projects:"
@@ -114,20 +116,20 @@
     def do_removeProject(self,args):
         """Removes a project."""
 
-        continuum.removeProject( args[0] )
+        c.removeProject( args[0] )
 
     def do_buildProject(self, args):
         """Build a Continuum project.
         Use this command to signal a build for a Continuum project."""
 
-        continuum.buildProject( args[ 0 ] )
+        c.buildProject( args[ 0 ] )
 
         print "Enqueued project"
 
     def do_showBuild( self, args ):
         """Shows the result of a build."""
 
-        build = continuum.getBuild( args[ 0 ] );
+        build = c.getBuild( args[ 0 ] );
 
         print build
 
@@ -136,7 +138,7 @@
             print build.updateScmResult
         print ""
 
-        buildResult = continuum.getBuildResultForBuild( args[ 0 ] );
+        buildResult = c.getBuildResultForBuild( args[ 0 ] );
 
         print "Build result:"
         print buildResult
@@ -154,7 +156,7 @@
 # Main loop
 ##########################################################
 
-continuum = continuum.Continuum( "http://localhost:8000" )
+c = continuum.Continuum( "http://localhost:8000" )
 
 try:
     ContinuumXmlRpcCli().cmdloop()

Modified: maven/continuum/trunk/continuum-core-it/it.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it.py?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it.py (original)
+++ maven/continuum/trunk/continuum-core-it/it.py Wed Jun 15 09:32:41 2005
@@ -1,4 +1,4 @@
-from continuum import Continuum, MavenTwoProject, MavenOneProject, AntProject, ShellProject
+from continuum import Continuum, MavenTwoProject, MavenOneProject, AntProject, ShellProject, makeMailNotifier
 import os
 import shutil
 import sys
@@ -14,7 +14,7 @@
 print "############################################################"
 print ""
 
-continuum = Continuum( "http://localhost:8000" )
+c = Continuum( "http://localhost:8000" )
 
 from it_utils import *
 
@@ -42,15 +42,15 @@
     progress( "Initializing Maven 1 CVS project" )
     initMaven1Project( maven1Project, "cvs", cvsroot, "maven-1" )
     progress( "Adding Maven 1 project" )
-    maven1Id = getProjectId( continuum.addMavenOneProject( "file:" + maven1Project + "/project.xml" ) )
-    waitForSuccessfulCheckOut( continuum, maven1Id );
-    maven1 = continuum.getProject( maven1Id )
-    assertProject( maven1Id, "Maven 1 Project", email, continuum.STATE_NEW, "1.0", "", "maven-1", maven1 )
+    maven1Id = getProjectId( c.addMavenOneProject( "file:" + maven1Project + "/project.xml" ) )
+    waitForSuccessfulCheckOut( c, maven1Id );
+    maven1 = c.getProject( maven1Id )
+    assertProject( maven1Id, "Maven 1 Project", email, c.STATE_NEW, "1.0", "", "maven-1", maven1 )
     assertCheckedOutFiles( maven1, [ "/project.xml", "/src/main/java/Foo.java" ] )
 
     progress( "Building Maven 1 project" )
-    buildId = buildProject( continuum, maven1.id ).id
-    assertSuccessfulMaven1Build( continuum, buildId )
+    buildId = buildProject( c, maven1.id ).id
+    assertSuccessfulMaven1Build( c, buildId )
 
     progress( "Testing that the POM is updated before each build." )
     cleanDirectory( coDir )
@@ -68,40 +68,40 @@
 
     cvsCommit( coDir )
 
-    #continuum.updateProjectFromScm( maven1.id )
-    #maven1 = continuum.getProject( maven1.id )
+    #c.updateProjectFromScm( maven1.id )
+    #maven1 = c.getProject( maven1.id )
     #assertEquals( "The project name wasn't changed.", "Maven 1 Project - Changed", maven1.name )
     #assertEquals( "The project version wasn't changed.", "1.1", maven1.version )
 
-    removeProject( continuum, maven1.id );
+    removeProject( c, maven1.id );
 
 if 1:
     progress( "Initializing Maven 2 CVS project" )
     initMaven2Project( maven2Project, cvsroot, "maven-2" )
     progress( "Adding Maven 2 project" )
-    maven2Id = getProjectId( continuum.addMavenTwoProject( "file:" + maven2Project + "/pom.xml" ) )
-    waitForSuccessfulCheckOut( continuum, maven2Id );
-    maven2 = continuum.getProject( maven2Id )
-    assertProject( maven2Id, "Maven 2 Project", email, continuum.STATE_NEW, "2.0-SNAPSHOT", "-N", "maven2", maven2 )
+    maven2Id = getProjectId( c.addMavenTwoProject( "file:" + maven2Project + "/pom.xml" ) )
+    waitForSuccessfulCheckOut( c, maven2Id );
+    maven2 = c.getProject( maven2Id )
+    assertProject( maven2Id, "Maven 2 Project", email, c.STATE_NEW, "2.0-SNAPSHOT", "-N", "maven2", maven2 )
 
     progress( "Building Maven 2 project" )
-    buildId = buildProject( continuum, maven2.id ).id
-    assertSuccessfulMaven2Build( continuum, buildId )
+    buildId = buildProject( c, maven2.id ).id
+    assertSuccessfulMaven2Build( c, buildId )
 
     progress( "Test that a build without any files changed won't execute the executor" )
-    expectedSize = len( continuum.getBuildsForProject( maven2.id ) )
-    continuum.buildProject( maven2.id, False )
+    expectedSize = len( c.getBuildsForProject( maven2.id ) )
+    c.buildProject( maven2.id, False )
     time.sleep( 3.0 )
-    actualSize = len( continuum.getBuildsForProject( maven2.id ) )
+    actualSize = len( c.getBuildsForProject( maven2.id ) )
     assertEquals( "A build has unexpectedly been executed.", expectedSize, actualSize )
 
     progress( "Test that a forced build without any files changed executes the executor" )
-    buildId = buildProject( continuum, maven2.id, True ).id
-    build = assertSuccessfulMaven2Build( continuum, buildId )
+    buildId = buildProject( c, maven2.id, True ).id
+    build = assertSuccessfulMaven2Build( c, buildId )
     assertTrue( "The 'build forced' flag wasn't true", build.forced );
-    build = continuum.getBuild( buildId )
+    build = c.getBuild( buildId )
 
-    removeProject( continuum, maven2Id )
+    removeProject( c, maven2Id )
 
 if 1:
     progress( "Initializing Ant SVN project" )
@@ -112,20 +112,20 @@
     p = AntProject()
     p.scmUrl = "scm:svn:file://" + svnroot + "/ant-svn"
     p.name = "Ant SVN Project"
-    p.nagEmailAddress = email
+    p.notifiers.append( makeMailNotifier( email ) )
     p.version = "3.0"
     p.commandLineArguments = "-v"
     p.executable = "ant"
     p.targets = "clean build"
-    antSvnId = getProjectId( continuum.addAntProject( p ) )
-    waitForSuccessfulCheckOut( continuum, antSvnId );
-    antSvn = continuum.getProject( antSvnId )
-    assertProject( antSvnId, "Ant SVN Project", email, continuum.STATE_NEW, "3.0", "-v", "ant", antSvn )
+    antSvnId = getProjectId( c.addAntProject( p ) )
+    waitForSuccessfulCheckOut( c, antSvnId );
+    antSvn = c.getProject( antSvnId )
+    assertProject( antSvnId, "Ant SVN Project", None, c.STATE_NEW, "3.0", "-v", "ant", antSvn )
     progress( "Building SVN Ant project" )
-    buildId = buildProject( continuum, antSvn.id ).id
-    assertSuccessfulAntBuild( continuum, buildId )
+    buildId = buildProject( c, antSvn.id ).id
+    assertSuccessfulAntBuild( c, buildId )
 
-    removeProject( continuum, antSvnId )
+    removeProject( c, antSvnId )
 
 if 1:
     progress( "Initializing Ant CVS project" )
@@ -135,20 +135,20 @@
     p = AntProject()
     p.scmUrl = "scm:cvs:local:" + basedir + "/cvsroot:ant-cvs"
     p.name = "Ant CVS Project"
-    p.nagEmailAddress = email
+    p.notifiers.append( makeMailNotifier( email ) )
     p.version = "3.0"
     p.commandLineArguments = "-d"
     p.executable = "ant"
     p.targets = "clean build"
-    antCvsId = getProjectId( continuum.addAntProject( p ) )
-    waitForSuccessfulCheckOut( continuum, antCvsId );
+    antCvsId = getProjectId( c.addAntProject( p ) )
+    waitForSuccessfulCheckOut( c, antCvsId );
 
-    antCvs = continuum.getProject( antCvsId )
-    assertProject( antCvsId, "Ant CVS Project", email, continuum.STATE_NEW, "3.0", "-d", "ant", antCvs )
+    antCvs = c.getProject( antCvsId )
+    assertProject( antCvsId, "Ant CVS Project", None, c.STATE_NEW, "3.0", "-d", "ant", antCvs )
     progress( "Building CVS Ant project" )
-    buildId = buildProject( continuum, antCvs.id ).id
-    assertSuccessfulAntBuild( continuum, buildId )
-    removeProject( continuum, antCvsId )
+    buildId = buildProject( c, antCvs.id ).id
+    assertSuccessfulAntBuild( c, buildId )
+    removeProject( c, antCvsId )
 
 if 1:
     progress( "Initializing Shell CVS project" )
@@ -159,18 +159,18 @@
     p = ShellProject()
     p.scmUrl = "scm:cvs:local:" + basedir + "/cvsroot:shell"
     p.name = "Shell Project"
-    p.nagEmailAddress = email
+    p.notifiers.append( makeMailNotifier( email ) )
     p.version = "3.0"
     p.commandLineArguments = ""
     p.executable = "script.sh"
-    shellId = getProjectId( continuum.addShellProject( p ) )
-    waitForSuccessfulCheckOut( continuum, shellId );
-    shell = continuum.getProject( shellId )
-    assertProject( shellId, "Shell Project", email, continuum.STATE_NEW, "3.0", "", "shell", shell )
+    shellId = getProjectId( c.addShellProject( p ) )
+    waitForSuccessfulCheckOut( c, shellId );
+    shell = c.getProject( shellId )
+    assertProject( shellId, "Shell Project", None, c.STATE_NEW, "3.0", "", "shell", shell )
 
     progress( "Building Shell project" )
-    buildId = buildProject( continuum, shell.id ).id
-    assertSuccessfulShellBuild( continuum, buildId, "" )
+    buildId = buildProject( c, shell.id ).id
+    assertSuccessfulShellBuild( c, buildId, "" )
 
     # Test project reconfiguration
     # Test that a project will be built after a changed file is committed
@@ -188,16 +188,16 @@
 
     output = cvsCommit( coDir )
 
-    #continuum.updateProject( shell.id, shell.name, shell.scmUrl, shell.nagEmailAddress, shell.version, "a b" )
-    shell = continuum.getProject( shell.id )
+    #c.updateProject( shell.id, shell.name, shell.scmUrl, shell.nagEmailAddress, shell.version, "a b" )
+    shell = c.getProject( shell.id )
     shell.commandLineArguments = "a b";
-    continuum.updateShellProject( shell )
+    c.updateShellProject( shell )
 
-    buildId = buildProject( continuum, shell.id ).id
-    assertSuccessfulShellBuild( continuum, buildId, """a
+    buildId = buildProject( c, shell.id ).id
+    assertSuccessfulShellBuild( c, buildId, """a
 b
 """ )
-    removeProject( continuum, shellId )
+    removeProject( c, shellId )
 
 # TODO: Add project failure tests
 

Modified: maven/continuum/trunk/continuum-core-it/it_utils.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it_utils.py?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it_utils.py (original)
+++ maven/continuum/trunk/continuum-core-it/it_utils.py Wed Jun 15 09:32:41 2005
@@ -69,12 +69,19 @@
 def assertProject( projectId, name, nagEmailAddress, state, version, commandLineArguments, executorId, project ):
     assertNotNull( "project.id", projectId )
     assertEquals( "project.name", name, project.name )
-    assertEquals( "project.nagEmailAddress", nagEmailAddress, project.nagEmailAddress )
     assertEquals( "project.state", state, project.state )
     assertEquals( "project.version", version, project.version )
     assertEquals( "project.commandLineArguments", commandLineArguments, project.commandLineArguments )
     assertEquals( "project.executorId", executorId, project.executorId )
 
+    if ( nagEmailAddress == None ):
+        assertEquals( "project.notifiers.size", 0, len( project.notifiers ) )
+    else:
+        assertEquals( "project.notifiers.size", 1, len( project.notifiers ) )
+        assertEquals( "project.notifiers[0].type", "mail", project.notifiers[0].type )
+        assertTrue( "project.notifiers[0].configuration.has_key('address')", project.notifiers[0].configuration.has_key('address') )
+        assertEquals( "project.notifiers[0].configuration['address']", nagEmailAddress, project.notifiers[0].configuration['address'] )
+
 def assertCheckedOutFiles( project, expectedCheckedOutFiles ):
     actualCheckedOutFiles = project.checkOutScmResult.checkedOutFiles
     if ( len( expectedCheckedOutFiles ) != len( actualCheckedOutFiles ) ):
@@ -100,47 +107,37 @@
 def assertSuccessfulNoBuildPerformed( continuum, buildId ):
     build = waitForBuild( continuum, buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
-    buildResult = continuum.getBuildResultForBuild( buildId )
-    assertNotNull( "Build result was null.", buildResult )
-    assertTrue( "The build wasn't successful", buildResult.success )
+    assertTrue( "The build wasn't successful", build.success )
 
 def assertSuccessfulMaven1Build( continuum, buildId ):
     build = waitForBuild( continuum, buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
-    buildResult = continuum.getBuildResultForBuild( buildId )
-    assertNotNull( "Build result was null.", buildResult )
-    assertTrue( "The build wasn't successful", buildResult.success )
-    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", buildResult.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
-    assertEquals( "Standard error wasn't empty.", 0, len( buildResult.standardError ) )
+    assertTrue( "The build wasn't successful", build.success )
+    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", build.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
+    assertEquals( "Standard error wasn't empty.", 0, len( build.standardError ) )
 
 def assertSuccessfulMaven2Build( continuum, buildId ):
     build = waitForBuild( continuum, buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
-    buildResult = continuum.getBuildResultForBuild( buildId )
-    assertNotNull( "Build result was null.", buildResult )
-    assertTrue( "The build wasn't successful", buildResult.success )
-    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", buildResult.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
-    assertEquals( "Standard error wasn't empty.", 0, len( buildResult.standardError ) )
+    assertTrue( "The build wasn't successful", build.success )
+    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", build.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
+    assertEquals( "Standard error wasn't empty.", 0, len( build.standardError ) )
 
     return build
 
 def assertSuccessfulAntBuild( continuum, buildId ):
     build = waitForBuild( continuum, buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
-    buildResult = continuum.getBuildResultForBuild( buildId )
-    assertNotNull( "Build result was null.", buildResult )
-    assertTrue( "The build wasn't successful", buildResult.success )
-    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", buildResult.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
-    assertEquals( "Standard error wasn't empty.", 0, len( buildResult.standardError ) )
+    assertTrue( "The build wasn't successful", build.success )
+    assertTrue( "Standard output didn't contain the 'BUILD SUCCESSFUL' message.", build.standardOutput.find( "BUILD SUCCESSFUL" ) != -1 )
+    assertEquals( "Standard error wasn't empty.", 0, len( build.standardError ) )
 
 def assertSuccessfulShellBuild( continuum, buildId, expectedStandardOutput ):
     build = waitForBuild( continuum, buildId )
     assertEquals( "The build wasn't successful.", continuum.STATE_OK, build.state )
-    buildResult = continuum.getBuildResultForBuild( buildId )
-    assertNotNull( "Build result was null.", buildResult )
-    assertTrue( "The build wasn't successful", buildResult.success )
-    assertEquals( "Standard output didn't contain the expected output.", expectedStandardOutput, buildResult.standardOutput )
-    assertEquals( "Standard error wasn't empty.", 0, len( buildResult.standardError ) )
+    assertTrue( "The build wasn't successful", build.success )
+    assertEquals( "Standard output didn't contain the expected output.", expectedStandardOutput, build.standardOutput )
+    assertEquals( "Standard error wasn't empty.", 0, len( build.standardError ) )
 
 def buildProject( continuum, projectId, force=False ):
     count = 600;
@@ -317,7 +314,9 @@
     <notifiers>
       <notifier>
         <type>mail</type>
-        <address>%(email)s</address>
+        <configuration>
+          <address>%(email)s</address>
+        </configuration>
       </notifier>
     </notifiers>
   </ciManagement>

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=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Wed Jun 15 09:32:41 2005
@@ -29,7 +29,6 @@
 import org.apache.maven.continuum.core.action.StoreProjectAction;
 import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.MavenOneProject;
@@ -201,11 +200,11 @@
         return core.getBuildsForProject( projectId );
     }
 
-    public ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumException
-    {
-        return core.getBuildResultForBuild( buildId );
-    }
+//    public ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumException
+//    {
+//        return core.getBuildResultForBuild( buildId );
+//    }
 
     public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/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=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Wed Jun 15 09:32:41 2005
@@ -21,10 +21,10 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.ContinuumScm;
@@ -72,7 +72,7 @@
 
         UpdateScmResult scmResult;
 
-        ContinuumBuildResult result;
+        ContinuumBuildExecutionResult result;
 
         int state;
 
@@ -288,18 +288,20 @@
     {
         makeBuild( context );
 
-        context.result = new ContinuumBuildResult();
-
-        context.result.setSuccess( false );
+        context.result = new ContinuumBuildExecutionResult( false, null, null, 0 );
 
         context.state = ContinuumProjectState.ERROR;
 
-        setBuildResult( context.build.getId(), context.state, context.result, context.scmResult, e );
+        setBuildResult( context.build.getId(),
+                        context.state,
+                        context.result,
+                        context.scmResult,
+                        e );
     }
 
     private void setBuildResult( String buildId,
                                  int state,
-                                 ContinuumBuildResult result,
+                                 ContinuumBuildExecutionResult result,
                                  UpdateScmResult scmResult,
                                  Throwable e )
         throws ContinuumStoreException

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/ContinuumCore.java Wed Jun 15 09:32:41 2005
@@ -24,7 +24,6 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.builder.manager.ContinuumProjectBuilderManager;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
@@ -97,8 +96,8 @@
     Collection getBuildsForProject( String projectId )
         throws ContinuumException;
 
-    ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumException;
+//    ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumException;
 
     Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException;

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/DefaultContinuumCore.java Wed Jun 15 09:32:41 2005
@@ -31,7 +31,6 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
@@ -76,32 +75,32 @@
     //       that the database is properly initialized before starting the store.
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private BuildExecutorManager buildExecutorManager;
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private ContinuumProjectBuilderManager projectBuilderManager;
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private TaskQueue buildQueue;
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private TaskQueue checkOutQueue;
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private ContinuumStore store;
 
     /**
-     * @requirement
+     * @plexus.requirement
      */
     private ContinuumScm scm;
 
@@ -110,12 +109,12 @@
     // ----------------------------------------------------------------------
 
     /**
-     * @configuration
+     * @plexus.configuration
      */
     private String workingDirectory;
 
     /**
-     * @configuration
+     * @plexus.configuration
      */
     private String appHome;
 
@@ -387,7 +386,9 @@
     {
         try
         {
-            return store.getBuild( buildId );
+            ContinuumBuild b = store.getBuild( buildId );
+
+            return b;
         }
         catch ( ContinuumStoreException e )
         {
@@ -408,18 +409,18 @@
         }
     }
 
-    public ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumException
-    {
-        try
-        {
-            return store.getBuildResultForBuild( buildId );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
-        }
-    }
+//    public ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumException
+//    {
+//        try
+//        {
+//            return store.getBuildResultForBuild( buildId );
+//        }
+//        catch ( ContinuumStoreException e )
+//        {
+//            throw logAndCreateException( "Cannot retrieve build result for build with id = " + buildId, e );
+//        }
+//    }
 
     public Collection getChangedFilesForBuild( String buildId )
         throws ContinuumException

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -16,16 +16,16 @@
  * limitations under the License.
  */
 
+import java.util.Collection;
+import java.util.Map;
+
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.UpdateScmResult;
 
-import java.util.Collection;
-import java.util.Map;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -79,7 +79,7 @@
 
         getNotifier().runningGoals( project, getBuild( context ) );
 
-        ContinuumBuildResult result = buildExecutor.build( project );
+        ContinuumBuildExecutionResult result = buildExecutor.build( project );
 
         int state = result.isSuccess() ?
                     ContinuumProjectState.OK : ContinuumProjectState.FAILED;

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -22,9 +22,9 @@
 import org.apache.maven.continuum.execution.AbstractBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.shell.ExecutionResult;
 import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.AntProject;
 
@@ -57,7 +57,7 @@
     // ContinuumBuilder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildResult build( ContinuumProject p )
+    public ContinuumBuildExecutionResult build( ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
         AntProject project = (AntProject) p;
@@ -81,19 +81,10 @@
             throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
         }
 
-        boolean success = executionResult.getExitCode() == 0;
-
-        AntBuildResult result = new AntBuildResult();
-
-        result.setSuccess( success );
-
-        result.setStandardOutput( executionResult.getStandardOutput() );
-
-        result.setStandardError( executionResult.getStandardError() );
-
-        result.setExitCode( executionResult.getExitCode() );
-
-        return result;
+        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
+                                                  executionResult.getStandardOutput(),
+                                                  executionResult.getStandardError(),
+                                                  executionResult.getExitCode() );
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -19,11 +19,11 @@
 import java.io.File;
 
 import org.apache.maven.continuum.execution.AbstractBuildExecutor;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 import org.apache.maven.continuum.execution.shell.ExecutionResult;
 import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 
@@ -52,7 +52,7 @@
     // Builder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildResult build( ContinuumProject p )
+    public ContinuumBuildExecutionResult build( ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
         MavenOneProject project = (MavenOneProject) p;
@@ -74,19 +74,10 @@
             throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
         }
 
-        boolean success = executionResult.getExitCode() == 0;
-
-        Maven1BuildResult result = new Maven1BuildResult();
-
-        result.setSuccess( success );
-
-        result.setStandardOutput( executionResult.getStandardOutput() );
-
-        result.setStandardError( executionResult.getStandardError() );
-
-        result.setExitCode( executionResult.getExitCode() );
-
-        return result;
+        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
+                                                  executionResult.getStandardOutput(),
+                                                  executionResult.getStandardError(),
+                                                  executionResult.getExitCode() );
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -50,19 +50,19 @@
 {
     public static final String DEFAULT_TEST_OUTPUT_DIRECTORY = "target/surefire-reports";
 
-    /** @requirement */
+    /** @plexus.requirement */
     private MavenProjectBuilder projectBuilder;
 
-    /** @requirement */
+    /** @plexus.requirement */
     private ArtifactRepositoryFactory artifactRepositoryFactory;
 
-    /** @requirement */
+    /** @plexus.requirement */
     private MavenSettingsBuilder settingsBuilder;
 
-    /** @requirement */
+    /** @plexus.requirement */
     private ArtifactRepositoryLayout repositoryLayout;
 
-    /** @configuration */
+    /** @plexus.configuration */
     private String localRepository;
 
     // ----------------------------------------------------------------------
@@ -76,9 +76,8 @@
     }
 
     public void mapMavenProjectToContinuumProject( MavenProject mavenProject, MavenTwoProject continuumProject )
+        throws MavenBuilderHelperException
     {
-        continuumProject.setNotifiers( getNotifiers( mavenProject ) );
-
         continuumProject.setName( getProjectName( mavenProject ) );
 
         continuumProject.setScmUrl( getScmUrl( mavenProject ) );
@@ -99,8 +98,6 @@
         // Group
         // ----------------------------------------------------------------------
 
-        System.out.println( "mavenProject.getGroupId() = " + mavenProject.getGroupId() );
-
         if ( mavenProject.getGroupId() != null )
         {
            continuumProject.setGroupId( mavenProject.getGroupId() );
@@ -110,8 +107,6 @@
         // Project Url
         // ----------------------------------------------------------------------
 
-        System.out.println( "mavenProject.getUrl() = " + mavenProject.getUrl() );
-
         if ( mavenProject.getUrl() != null )
         {
            continuumProject.setUrl( mavenProject.getUrl() );
@@ -144,6 +139,12 @@
                 continuumProject.addDeveloper( cd );
             }
         }
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        continuumProject.setNotifiers( getNotifiers( mavenProject ) );
     }
 
     public MavenProject getMavenProject( File file )
@@ -221,6 +222,7 @@
     }
 
     private List getNotifiers( MavenProject mavenProject )
+        throws MavenBuilderHelperException
     {
         List notifiers = new ArrayList();
 
@@ -230,10 +232,12 @@
 
             ContinuumNotifier notifier = new ContinuumNotifier();
 
-            if ( !StringUtils.isEmpty( projectNotifier.getType() ) )
+            if ( StringUtils.isEmpty( projectNotifier.getType() ) )
             {
-                notifier.setType( projectNotifier.getType() );
+                throw new MavenBuilderHelperException( "Missing type from notifier." );
             }
+
+            notifier.setType( projectNotifier.getType() );
 
             notifier.setConfiguration( projectNotifier.getConfiguration() );
 

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -35,5 +35,6 @@
     MavenProject getMavenProject( File file )
         throws MavenBuilderHelperException;
 
-    void mapMavenProjectToContinuumProject( MavenProject mavenProject, MavenTwoProject continuumProject );
+    void mapMavenProjectToContinuumProject( MavenProject mavenProject, MavenTwoProject 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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -19,11 +19,11 @@
 import java.io.File;
 
 import org.apache.maven.continuum.execution.AbstractBuildExecutor;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 import org.apache.maven.continuum.execution.shell.ExecutionResult;
 import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 
@@ -60,7 +60,7 @@
     // ContinuumBuilder Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildResult build( ContinuumProject p )
+    public ContinuumBuildExecutionResult build( ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
         MavenTwoProject project = (MavenTwoProject) p;
@@ -82,19 +82,10 @@
             throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
         }
 
-        boolean success = executionResult.getExitCode() == 0;
-
-        MavenTwoBuildResult result = new MavenTwoBuildResult();
-
-        result.setSuccess( success );
-
-        result.setStandardOutput( executionResult.getStandardOutput() );
-
-        result.setStandardError( executionResult.getStandardError() );
-
-        result.setExitCode( executionResult.getExitCode() );
-
-        return result;
+        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
+                                                  executionResult.getStandardOutput(),
+                                                  executionResult.getStandardError(),
+                                                  executionResult.getExitCode() );
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -21,7 +21,7 @@
 import org.apache.maven.continuum.execution.AbstractBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ShellProject;
 
@@ -52,7 +52,7 @@
     // ContinuumBuilder implementation
     // ----------------------------------------------------------------------
 
-    public synchronized ContinuumBuildResult build( ContinuumProject p )
+    public synchronized ContinuumBuildExecutionResult build( ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
         ShellProject project = (ShellProject) p;
@@ -80,19 +80,10 @@
             throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
         }
 
-        boolean success = executionResult.getExitCode() == 0;
-
-        ShellBuildResult result = new ShellBuildResult();
-
-        result.setSuccess( success );
-
-        result.setStandardOutput( executionResult.getStandardOutput() );
-
-        result.setStandardError( executionResult.getStandardError() );
-
-        result.setExitCode( executionResult.getExitCode() );
-
-        return result;
+        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
+                                                  executionResult.getStandardOutput(),
+                                                  executionResult.getStandardError(),
+                                                  executionResult.getExitCode() );
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -117,7 +117,7 @@
             {
                 context.put( CONTEXT_BUILD, store.getBuild( build.getId() ) );
 
-                context.put( CONTEXT_BUILD_RESULT, store.getBuildResultForBuild( build.getId() ) );
+//                context.put( CONTEXT_BUILD_RESULT, store.getBuildResultForBuild( build.getId() ) );
             }
 
             if ( scmResult != null )

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -22,7 +22,6 @@
 
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 
 import org.codehaus.plexus.notification.NotificationException;
@@ -47,8 +46,6 @@
 
         ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
-        ContinuumBuildResult result = (ContinuumBuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD_RESULT );
-
         if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_STARTED ) )
         {
             buildStarted( project );
@@ -67,11 +64,11 @@
         }
         else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_GOALS_COMPLETED ) )
         {
-            goalsCompleted( project, build, result );
+            goalsCompleted( project, build );
         }
         else if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
         {
-            buildComplete( project, build, result );
+            buildComplete( project, build );
         }
         else
         {
@@ -103,9 +100,9 @@
         out( project, build, "Running goals." );
     }
 
-    private void goalsCompleted( ContinuumProject project, ContinuumBuild build, ContinuumBuildResult result )
+    private void goalsCompleted( ContinuumProject project, ContinuumBuild build )
     {
-        if ( result != null )
+        if ( build.getError() == null )
         {
             out( project, build, "Goals completed. state: " + build.getState() );
         }
@@ -115,9 +112,9 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, ContinuumBuild build, ContinuumBuildResult result )
+    private void buildComplete( ContinuumProject project, ContinuumBuild build )
     {
-        if ( result != null )
+        if ( build.getError() == null )
         {
             out( project, build, "Build complete. state: " + build.getState() );
         }

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -29,7 +29,6 @@
 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.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStore;
@@ -155,8 +154,6 @@
 
         ContinuumBuild build = (ContinuumBuild) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD );
 
-        ContinuumBuildResult result = (ContinuumBuildResult) context.get( ContinuumNotificationDispatcher.CONTEXT_BUILD_RESULT );
-
         // ----------------------------------------------------------------------
         // If there wasn't any building done, don't notify
         // ----------------------------------------------------------------------
@@ -174,7 +171,7 @@
         {
             if ( source.equals( ContinuumNotificationDispatcher.MESSAGE_ID_BUILD_COMPLETE ) )
             {
-                buildComplete( project, build, result, source, recipients );
+                buildComplete( project, build, source, recipients );
             }
         }
         catch ( ContinuumException e )
@@ -183,8 +180,10 @@
         }
     }
 
-    private void buildComplete( ContinuumProject project, ContinuumBuild build, ContinuumBuildResult buildResult,
-                                String source, Set recipients )
+    private void buildComplete( ContinuumProject project,
+                                ContinuumBuild build,
+                                String source,
+                                Set recipients )
         throws ContinuumException
     {
         // ----------------------------------------------------------------------
@@ -226,8 +225,6 @@
 
             context.put( "previousBuild", previousBuild );
 
-            context.put( "buildResult", buildResult );
-
             // ----------------------------------------------------------------------
             // Tools
             // ----------------------------------------------------------------------
@@ -297,7 +294,7 @@
     private void sendMessage( ContinuumProject project, Set recipients, String subject, String content )
         throws ContinuumException
     {
-        String fromMailbox = getFromMailbox( project );
+        String fromMailbox = getFromMailbox();
 
         if ( fromMailbox == null )
         {
@@ -346,7 +343,7 @@
         }
     }
 
-    private String getFromMailbox( ContinuumProject project )
+    private String getFromMailbox()
     {
         if ( fromMailbox != null )
         {

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -43,10 +43,10 @@
 
     private static final String POM_PART = "/pom.xml";
 
-    /** @requirement */
+    /** @plexus.requirement */
     private MavenBuilderHelper builderHelper;
 
-    /** @configuration */
+    /** @plexus.configuration */
     private List excludedPackagingTypes;
 
     // ----------------------------------------------------------------------
@@ -70,6 +70,10 @@
         {
             throw new ContinuumProjectBuilderException( "Error while building Maven project.", e );
         }
+        catch ( MavenBuilderHelperException e )
+        {
+            throw new ContinuumProjectBuilderException( "Error while mapping Maven project to Continuum project.", e );
+        }
 
         return result;
     }
@@ -79,7 +83,7 @@
     // ----------------------------------------------------------------------
 
     private void readModules( URL url, ContinuumProjectBuildingResult result )
-        throws MalformedURLException, ContinuumProjectBuilderException
+        throws MalformedURLException, ContinuumProjectBuilderException, MavenBuilderHelperException
     {
         MavenProject mavenProject;
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java Wed Jun 15 09:32:41 2005
@@ -26,10 +26,9 @@
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
 
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumJPoxStore;
-import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
@@ -111,21 +110,21 @@
 
             List builds = project.getBuilds();
 
-            for ( Iterator it = builds.iterator(); it.hasNext(); )
-            {
-                ContinuumBuild build = (ContinuumBuild) it.next();
-
-                ContinuumBuildResult result = build.getBuildResult();
-
-                if ( result == null )
-                {
-                    continue;
-                }
-
-                result.setBuild( null );
-
-                pm.deletePersistent( result );
-            }
+//            for ( Iterator it = builds.iterator(); it.hasNext(); )
+//            {
+//                ContinuumBuild build = (ContinuumBuild) it.next();
+//
+//                ContinuumBuildResult result = build.getBuildResult();
+//
+//                if ( result == null )
+//                {
+//                    continue;
+//                }
+//
+//                result.setBuild( null );
+//
+//                pm.deletePersistent( result );
+//            }
 
             for ( Iterator it = builds.iterator(); it.hasNext(); )
             {
@@ -367,7 +366,10 @@
         }
     }
 
-    public void setBuildResult( String buildId, int state, ContinuumBuildResult result, UpdateScmResult scmResult,
+    public void setBuildResult( String buildId,
+                                int state,
+                                ContinuumBuildExecutionResult result,
+                                UpdateScmResult scmResult,
                                 Throwable error )
         throws ContinuumStoreException
     {
@@ -391,7 +393,17 @@
 
             build.setUpdateScmResult( scmResult );
 
-            build.setBuildResult( result );
+            // ----------------------------------------------------------------------
+            // Copy over the build result
+            // ----------------------------------------------------------------------
+
+            build.setSuccess( result.isSuccess() );
+
+            build.setStandardOutput( result.getStandardOutput() );
+
+            build.setStandardError( result.getStandardError() );
+
+            build.setExitCode( result.getExitCode() );
 
             store.commit();
         }
@@ -471,37 +483,37 @@
         }
     }
 
-    public ContinuumBuildResult getBuildResultForBuild( String buildId )
-        throws ContinuumStoreException
-    {
-        try
-        {
-            store.begin();
-
-            ContinuumBuild build = store.getContinuumBuild( buildId, false );
-
-            if ( build.getBuildResult() == null )
-            {
-                store.commit();
-
-                return null;
-            }
-
-            Object id = JDOHelper.getObjectId( build.getBuildResult() );
-
-            store.commit();
-
-            ContinuumBuildResult result = store.getContinuumBuildResultByJdoId( id, true );
-
-            return result;
-        }
-        catch ( Exception e )
-        {
-            rollback( store );
-
-            throw new ContinuumStoreException( "Error while getting build result.", e );
-        }
-    }
+//    public ContinuumBuildResult getBuildResultForBuild( String buildId )
+//        throws ContinuumStoreException
+//    {
+//        try
+//        {
+//            store.begin();
+//
+//            ContinuumBuild build = store.getContinuumBuild( buildId, false );
+//
+//            if ( build.getBuildResult() == null )
+//            {
+//                store.commit();
+//
+//                return null;
+//            }
+//
+//            Object id = JDOHelper.getObjectId( build.getBuildResult() );
+//
+//            store.commit();
+//
+//            ContinuumBuildResult result = store.getContinuumBuildResultByJdoId( id, true );
+//
+//            return result;
+//        }
+//        catch ( Exception e )
+//        {
+//            rollback( store );
+//
+//            throw new ContinuumStoreException( "Error while getting build result.", e );
+//        }
+//    }
 
     public List getChangedFilesForBuild( String buildId )
         throws ContinuumStoreException
@@ -512,12 +524,12 @@
 
             ContinuumBuild build = store.getContinuumBuild( buildId, false );
 
-            if ( build.getBuildResult() == null )
-            {
-                store.commit();
-
-                return null;
-            }
+//            if ( build.getBuildResult() == null )
+//            {
+//                store.commit();
+//
+//                return null;
+//            }
 
             // TODO: Having to copy the objects feels a /bit/ strange.
 
@@ -714,7 +726,7 @@
 
     public void setBuildComplete( String buildId,
                                   UpdateScmResult scmResult,
-                                  ContinuumBuildResult result )
+                                  ContinuumBuildExecutionResult result )
         throws ContinuumStoreException
     {
         try
@@ -732,7 +744,17 @@
 
             project.setState( state );
 
-            build.setBuildResult( result );
+            // ----------------------------------------------------------------------
+            // Copy over the build result
+            // ----------------------------------------------------------------------
+
+            build.setSuccess( result.isSuccess() );
+
+            build.setStandardOutput( result.getStandardOutput() );
+
+            build.setStandardError( result.getStandardError() );
+
+            build.setExitCode( result.getExitCode() );
 
             store.commit();
         }

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=190775&r1=190774&r2=190775&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 Wed Jun 15 09:32:41 2005
@@ -23,7 +23,6 @@
 import java.util.Set;
 
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellBuildResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumProject;
@@ -91,20 +90,6 @@
         build.setState( ContinuumProjectState.OK );
 
         context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD, build );
-
-        // ----------------------------------------------------------------------
-        // ShellBuildResult
-        // ----------------------------------------------------------------------
-
-        ShellBuildResult buildResult = new ShellBuildResult();
-
-        buildResult.setExitCode( 0 );
-
-        buildResult.setStandardOutput( "HABBA HABBA" );
-
-        buildResult.setStandardError( "HUBBA HUBBA" );
-
-        context.put( ContinuumNotificationDispatcher.CONTEXT_BUILD_RESULT, buildResult );
 
         // ----------------------------------------------------------------------
         //

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -51,6 +51,8 @@
 
         ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get( 0 );
 
+        assertEquals( "mail", notifier.getType() );
+
         assertEquals( "dev@maven.apache.org", notifier.getConfiguration().get( "address" ) );
 
         assertEquals( "1.1-SNAPSHOT", project.getVersion() );

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=190775&r1=190774&r2=190775&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 Jun 15 09:32:41 2005
@@ -58,6 +58,8 @@
 
         ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get(0);
 
+        assertEquals( "mail", notifier.getType() );
+
         assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );
     }
 
@@ -82,6 +84,8 @@
         assertEquals( 1, project.getNotifiers().size() );
 
         ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get(0);
+
+        assertEquals( "mail", notifier.getType() );
 
         assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );
     }

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java?rev=190775&r1=190774&r2=190775&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java Wed Jun 15 09:32:41 2005
@@ -24,11 +24,9 @@
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.maven.continuum.execution.shell.ShellBuildResult;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.execution.ant.AntBuildResult;
 import org.apache.maven.continuum.project.ContinuumBuild;
-import org.apache.maven.continuum.project.ContinuumBuildResult;
 import org.apache.maven.continuum.project.ContinuumJPoxStore;
 import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.ContinuumProject;
@@ -408,13 +406,26 @@
 
         scmResult.addUpdatedFile( file );
 
-        ContinuumBuildResult result = new ShellBuildResult();
-
-        store.setBuildResult( buildId, ContinuumProjectState.OK, result, scmResult, null );
+        store.setBuildResult( buildId,
+                              ContinuumProjectState.OK,
+                              makeContinuumBuildExecutionResult( true, "", "", 0 ),
+                              scmResult,
+                              null );
 
         store.removeProject( projectId );
     }
 
+    private ContinuumBuildExecutionResult makeContinuumBuildExecutionResult( boolean success,
+                                                                             String standardOutput,
+                                                                             String standardError,
+                                                                             int exitCode )
+    {
+        return new ContinuumBuildExecutionResult( success,
+                                                  standardOutput,
+                                                  standardError,
+                                                  exitCode );
+    }
+
     // ----------------------------------------------------------------------
     // Maven Two project tests
     // ----------------------------------------------------------------------
@@ -513,15 +524,9 @@
 
         updateScmResult.getUpdatedFiles().add( scmFile );
 
-        AntBuildResult buildResult = new AntBuildResult();
-
-        buildResult.setExitCode( 10 );
-
-        buildResult.setStandardError( "stderr" );
-
-        buildResult.setStandardOutput( "stdout" );
-
-        store.setBuildComplete( buildId, updateScmResult, buildResult );
+        store.setBuildComplete( buildId,
+                                updateScmResult,
+                                makeContinuumBuildExecutionResult( true, "stdout", "stderr", 10 ) );
 
         // ----------------------------------------------------------------------
         // Store and check the build object
@@ -708,23 +713,19 @@
         // Check the build result
         // ----------------------------------------------------------------------
 
-        ContinuumBuildResult result = store.getBuildResultForBuild( buildId );
+//        ContinuumBuildResult result = store.getBuildResultForBuild( buildId );
 
         assertIsCommitted( store );
 
-        assertNull( result );
+//        assertNull( result );
 
         UpdateScmResult scmResult = new UpdateScmResult();
 
-        ShellBuildResult shellBuildResult = new ShellBuildResult();
-
-        shellBuildResult.setExitCode( 1 );
-
-        shellBuildResult.setStandardOutput( "output" );
-
-        shellBuildResult.setStandardError( "error" );
-
-        store.setBuildResult( buildId, ContinuumProjectState.OK, shellBuildResult, scmResult, null );
+        store.setBuildResult( buildId,
+                              ContinuumProjectState.OK,
+                              makeContinuumBuildExecutionResult( true, "output", "error", 1 ),
+                              scmResult,
+                              null );
 
         assertIsCommitted( store );
 
@@ -732,15 +733,15 @@
         //
         // ----------------------------------------------------------------------
 
-        shellBuildResult = (ShellBuildResult) store.getBuildResultForBuild( buildId );
+        build = store.getBuild( buildId );
 
         assertIsCommitted( store );
 
-        assertEquals( 1, shellBuildResult.getExitCode() );
+        assertEquals( 1, build.getExitCode() );
 
-        assertEquals( "output", shellBuildResult.getStandardOutput() );
+        assertEquals( "output", build.getStandardOutput() );
 
-        assertEquals( "error", shellBuildResult.getStandardError() );
+        assertEquals( "error", build.getStandardError() );
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message