continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r171299 [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/execution/ant /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager /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/network /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/test-projects/project1 /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1 /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-core/src/test/resources/org/apache/maven/continuum/core /maven/continuum/trunk/continuum-model/src/main/resources /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
Date Sun, 22 May 2005 10:42:46 GMT
Author: trygvis
Date: Sun May 22 03:42:43 2005
New Revision: 171299

URL: http://svn.apache.org/viewcvs?rev=171299&view=rev
Log:
Fixing CONTINUUM-111: "add a mechanism for passing CLI parameters to build tools"
o Adding a "commandLineArguemnts" field to the ContinuumProject.
o Removed the "arguments" field on the ShellProjects as it inherits the new
  field on the ContinuumProject.
o Adding removeProject() to continuum.py
o Removing all arguments from it.py
o Moving out the duplicate project checks from the store to the core.

Added:
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java   (with props)
    maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/core/
    maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/core/ContinuumCoreTest.xml   (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/AbstractBuildExecutor.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/execution/ant/AntBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/BuildExecutorManager.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManager.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.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/DefaultShellCommandHelper.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/execution/shell/ShellCommandHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network/NetCat.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
    maven/continuum/trunk/continuum-core/src/test-projects/project1/pom.xml
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-core/src/test/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

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=171299&r1=171298&r2=171299&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 May 22 03:42:43 2005
@@ -43,7 +43,8 @@
     void updateProjectFromScm( String projectId )
         throws ContinuumException;
 
-    void updateProjectConfiguration( String projectId, Properties configuration )
+    void updateProjectConfiguration( String projectId,
+                                     Properties configuration )
         throws ContinuumException;
 
     ContinuumProject getProject( String projectId )

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java Sun May 22 03:42:43 2005
@@ -23,13 +23,13 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: AbstractContinuumBuilder.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public abstract class AbstractBuildExecutor
     extends AbstractLogEnabled
     implements ContinuumBuildExecutor
 {
-    protected String getConfigurationString( Properties configuration, String property )
+    protected String getConfiguration( Properties configuration, String property )
         throws ContinuumBuildExecutorException
     {
         String string = configuration.getProperty( property );
@@ -40,51 +40,5 @@
         }
 
         return string;
-    }
-
-    protected String getConfigurationString( Properties configuration, String property, String defaultValue )
-        throws ContinuumBuildExecutorException
-    {
-        String string = configuration.getProperty( property );
-
-        if ( StringUtils.isEmpty( string ) )
-        {
-            return defaultValue;
-        }
-
-        return string;
-    }
-
-    protected String[] getConfigurationStringArray( Properties configuration, String property, String separator )
-        throws ContinuumBuildExecutorException
-    {
-        String value = getConfigurationString( configuration, property );
-
-        return splitAndTrimString( value, "," );
-    }
-
-    protected String[] getConfigurationStringArray( Properties configuration, String property, String separator, String[] defaultValue )
-        throws ContinuumBuildExecutorException
-    {
-        String value = getConfigurationString( configuration, property, null );
-
-        if ( value == null )
-        {
-            return defaultValue;
-        }
-
-        return splitAndTrimString( value, separator );
-    }
-
-    protected String[] splitAndTrimString( String value, String separator )
-    {
-        String[] array = StringUtils.split( value, separator );
-
-        for ( int i = 0; i < array.length; i++ )
-        {
-            array[ i ] = array[ i ].trim();
-        }
-
-        return array;
     }
 }

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=171299&r1=171298&r2=171299&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 May 22 03:42:43 2005
@@ -28,23 +28,13 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: ContinuumStore.java,v 1.2 2005/04/03 21:31:33 trygvis Exp $
+ * @version $Id$
  */
 public interface ContinuumStore
 {
     String ROLE = ContinuumStore.class.getName();
 
     // ----------------------------------------------------------------------
-    // Database methods
-    // ----------------------------------------------------------------------
-
-    void createDatabase()
-        throws ContinuumStoreException;
-
-    void deleteDatabase()
-        throws ContinuumStoreException;
-
-    // ----------------------------------------------------------------------
     // ContinuumProject
     // ----------------------------------------------------------------------
 
@@ -52,6 +42,7 @@
                        String scmUrl,
                        String nagEmailAddress,
                        String version,
+                       String commandLineArguments,
                        String executorId,
                        String workingDirectory,
                        Properties properties )
@@ -67,7 +58,8 @@
                         String name,
                         String scmUrl,
                         String nagEmailAddress,
-                        String version )
+                        String version,
+                        String commandLineArguments )
         throws ContinuumStoreException;
 
     void updateProjectConfiguration( String projectId, Properties configuration )

Modified: maven/continuum/trunk/continuum-core-it/continuum.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/continuum.py?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum.py Sun May 22 03:42:43 2005
@@ -31,15 +31,20 @@
 
     def __str__( self ):
         return "Error while executing method." + os.linesep + \
-               "Method: " + map[ "method" ] + os.linesep + \
-               "Message: " + map[ "message" ] + os.linesep + \
-               "Stack trace: " + map[ "stackTrace" ] + os.linesep
+               "Method: " + self.method + os.linesep + \
+               "Message: " + self.message + os.linesep + \
+               "Stack trace: " + self.stackTrace + os.linesep
 
 def checkResult( map ):
     if ( map[ "result" ] == "ok" ):
         return map
 
-    raise XmlRpcException( map[ "method" ], map[ "message" ], map[ "stackTrace" ] )
+    ex = XmlRpcException( map[ "method" ], map[ "message" ], map[ "stackTrace" ] )
+
+    if 1:
+        print str( ex )
+
+    raise ex
 
 def decodeState( state ):
     if ( state == 1 ):
@@ -77,6 +82,9 @@
 def updateProjectFromScm( projectId ):
     checkResult( server.continuum.updateProjectFromScm( projectId ) )
 
+def updateProject( projectId, name, scmUrl, nagEmailAddress, version, arguments ):
+    checkResult( server.continuum.updateProject( projectId, name, scmUrl, nagEmailAddress, version, arguments ) )
+
 def updateProjectConfiguration( projectId, configuration ):
     checkResult( server.continuum.updateProjectConfiguration( projectId, configuration ) )
 
@@ -145,8 +153,8 @@
 # Ant project
 ####################################################################
 
-def addAntProject( scmUrl, projectName, nagEmailAddress, version, configuration ):
-    result = checkResult( server.continuum.addAntProject( scmUrl, projectName, nagEmailAddress, version, configuration ) )
+def addAntProject( scmUrl, projectName, nagEmailAddress, version, commandLineArguments, configuration ):
+    result = checkResult( server.continuum.addAntProject( scmUrl, projectName, nagEmailAddress, version, commandLineArguments, configuration ) )
 
     return result[ "projectId" ]
 
@@ -154,21 +162,27 @@
 # Shell project
 ####################################################################
 
-def addShellProject( scmUrl, projectName, nagEmailAddress, version, configuration ):
-    result = checkResult( server.continuum.addShellProject( scmUrl, projectName, nagEmailAddress, version, configuration ) )
+def addShellProject( scmUrl, projectName, nagEmailAddress, version, commandLineArguments, configuration ):
+    result = checkResult( server.continuum.addShellProject( scmUrl, projectName, nagEmailAddress, version, commandLineArguments, configuration ) )
 
     return result[ "projectId" ]
 
 class Project:
     def __init__( self, map ):
         map[ "state" ] = decodeState( int( map[ "state" ] ) )
-
         self.map = map
         self.id = map[ "id" ]
         self.name = map[ "name" ]
         self.nagEmailAddress = map[ "nagEmailAddress" ]
         self.state = map[ "state" ]
         self.version = map[ "version" ]
+        self.scmUrl = map[ "scmUrl" ]
+
+        if ( map.has_key( "commandLineArguments" ) ):
+            self.commandLineArguments = map[ "commandLineArguments" ]
+        else:
+            self.commandLineArguments = ""
+
         self.executorId = map[ "executorId" ]
         self.configuration = map[ "configuration" ]
 

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=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/continuum_cli.py (original)
+++ maven/continuum/trunk/continuum-core-it/continuum_cli.py Sun May 22 03:42:43 2005
@@ -22,6 +22,9 @@
 # history.
 ##########################################################
 
+def isEmpty( str ):
+    return str == None or str == ""
+
 class ContinuumXmlRpcClient(cli.cli):
     def __init__(self):
         cli.cli.__init__(self)
@@ -72,7 +75,7 @@
 Executor type:      %(executorId)s
 SCM URL:            %(scmUrl)s""" % project.map
 
-        if ( project.checkOutErrorMessage != None or project.checkOutErrorException != None ):
+        if ( not isEmpty( project.checkOutErrorMessage ) or not isEmpty( project.checkOutErrorException ) ):
             print ""
             print "There was a error while checking out the project:"
             if ( project.checkOutErrorMessage != None ):
@@ -81,7 +84,6 @@
                 print "Exception: " + project.checkOutErrorException
         else:
             print ""
-            print "Checked out files:"
             print project.checkOutScmResult
 
             print "Project Configuration:"
@@ -108,6 +110,11 @@
         for project in projects:
             print "%(id)4s | %(state)12s | %(executorId)s | %(name)s" % project.map
 
+    def do_removeProject(self,args):
+        """Removes a project."""
+
+        continuum.removeProject( args[0] )
+
     def do_buildProject(self, args):
         """Build a Continuum project.
         Use this command to signal a build for a Continuum project."""
@@ -130,6 +137,7 @@
 
         buildResult = continuum.getBuildResult( args[ 0 ] );
 
+        print "Build result:"
         print buildResult
 
     def do_run(self, args):

Modified: maven/continuum/trunk/continuum-core-it/it.py
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/it.py?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it.py (original)
+++ maven/continuum/trunk/continuum-core-it/it.py Sun May 22 03:42:43 2005
@@ -42,7 +42,7 @@
     maven1Id = getProjectId( continuum.addMavenOneProject( "file:" + maven1Project + "/project.xml" ) )
     waitForSuccessfulCheckOut( maven1Id );
     maven1 = continuum.getProject( maven1Id )
-    assertProject( maven1Id, "Maven 1 Project", email, continuum.STATE_NEW, "1.0", "maven-1", maven1 )
+    assertProject( maven1Id, "Maven 1 Project", email, continuum.STATE_NEW, "1.0", "", "maven-1", maven1 )
     assertCheckedOutFiles( maven1, [ "/project.xml", "/src/main/java/Foo.java" ] )
 
     progress( "Building Maven 1 project" )
@@ -79,7 +79,7 @@
     maven2Id = getProjectId( continuum.addMavenTwoProject( "file:" + maven2Project + "/pom.xml" ) )
     waitForSuccessfulCheckOut( maven2Id );
     maven2 = continuum.getProject( maven2Id )
-    assertProject( maven2Id, "Maven 2 Project", email, continuum.STATE_NEW, "2.0-SNAPSHOT", "maven2", maven2 )
+    assertProject( maven2Id, "Maven 2 Project", email, continuum.STATE_NEW, "2.0-SNAPSHOT", "", "maven2", maven2 )
 
     progress( "Building Maven 2 project" )
     buildId = buildProject( maven2.id ).id
@@ -106,14 +106,14 @@
     svnImport( antProject, svnroot, "ant-svn" )
 
     progress( "Adding Ant SVN project" )
-    antSvnId = continuum.addAntProject( "scm:svn:file://" + svnroot + "/ant-svn", "Ant SVN Project", email, "3.0",
+    antSvnId = continuum.addAntProject( "scm:svn:file://" + svnroot + "/ant-svn", "Ant SVN Project", email, "3.0", "-v",
                                         {
                                             "executable": "ant",
-                                            "targets" : "clean, build"
+                                            "targets" : "clean build"
                                         } )
     waitForSuccessfulCheckOut( antSvnId );
     antSvn = continuum.getProject( antSvnId )
-    assertProject( antSvnId, "Ant SVN Project", email, continuum.STATE_NEW, "3.0", "ant", antSvn )
+    assertProject( antSvnId, "Ant SVN Project", email, continuum.STATE_NEW, "3.0", "-v", "ant", antSvn )
     progress( "Building SVN Ant project" )
     buildId = buildProject( antSvn.id ).id
     assertSuccessfulAntBuild( buildId )
@@ -124,11 +124,11 @@
     progress( "Initializing Ant CVS project" )
     initAntProject( antProject )
     cvsImport( antProject, cvsroot, "ant-cvs" )
-    antCvsId = continuum.addAntProject( "scm:cvs:local:" + basedir + "/cvsroot:ant-cvs", "Ant CVS Project", email, "3.0",
-                                      { "executable": "ant", "targets" : "clean, build"} )
+    antCvsId = continuum.addAntProject( "scm:cvs:local:" + basedir + "/cvsroot:ant-cvs", "Ant CVS Project", email, "3.0", "-d",
+                                      { "executable": "ant", "targets" : "clean build"} )
     waitForSuccessfulCheckOut( antCvsId );
     antCvs = continuum.getProject( antCvsId )
-    assertProject( antCvsId, "Ant CVS Project", email, continuum.STATE_NEW, "3.0", "ant", antCvs )
+    assertProject( antCvsId, "Ant CVS Project", email, continuum.STATE_NEW, "3.0", "-d", "ant", antCvs )
     progress( "Building CVS Ant project" )
     buildId = buildProject( antCvs.id ).id
     assertSuccessfulAntBuild( buildId )
@@ -140,14 +140,13 @@
     cvsImport( shellProject, cvsroot, "shell" )
 
     progress( "Adding CVS Shell project" )
-    shellId = continuum.addShellProject( "scm:cvs:local:" + basedir + "/cvsroot:shell", "Shell Project", email, "3.0",
+    shellId = continuum.addShellProject( "scm:cvs:local:" + basedir + "/cvsroot:shell", "Shell Project", email, "3.0", "",
                                          { 
                                             "executable": "script.sh", 
-                                            "arguments" : ""
                                          } )
     waitForSuccessfulCheckOut( shellId );
     shell = continuum.getProject( shellId )
-    assertProject( shellId, "Shell Project", email, continuum.STATE_NEW, "3.0", "shell", shell )
+    assertProject( shellId, "Shell Project", email, continuum.STATE_NEW, "3.0", "", "shell", shell )
 
     progress( "Building Shell project" )
     buildId = buildProject( shell.id ).id
@@ -169,9 +168,7 @@
 
     output = cvsCommit( coDir )
 
-    configuration = shell.configuration
-    configuration[ "arguments" ] = "a b";
-    continuum.updateProjectConfiguration( shell.id, configuration );
+    continuum.updateProject( shell.id, shell.name, shell.scmUrl, shell.nagEmailAddress, shell.version, "a b" )
     shell = continuum.getProject( shell.id )
     buildId = buildProject( shell.id ).id
     assertSuccessfulShellBuild( buildId, """a

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=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/it_utils.py (original)
+++ maven/continuum/trunk/continuum-core-it/it_utils.py Sun May 22 03:42:43 2005
@@ -66,12 +66,13 @@
 
     assertionFailed( message, "Not None", condition )
 
-def assertProject( projectId, name, nagEmailAddress, state, version, executorId, project ):
+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 )
 
 def assertCheckedOutFiles( project, expectedCheckedOutFiles ):
@@ -79,7 +80,7 @@
     if ( len( expectedCheckedOutFiles ) != len( actualCheckedOutFiles ) ):
         print "Expected files: "
         for expectedFile in expectedCheckedOutFiles:
-            print " " + expectedFile.path
+            print " " + expectedFile
 
         print "Actual files: "
         for actualFile in actualCheckedOutFiles:

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=171299&r1=171298&r2=171299&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 May 22 03:42:43 2005
@@ -226,6 +226,7 @@
                                 project.getName(),
                                 project.getNagEmailAddress(),
                                 project.getVersion(),
+                                project.getCommandLineArguments(),
                                 configuration );
     }
 
@@ -287,6 +288,7 @@
                                 project.getName(),
                                 project.getNagEmailAddress(),
                                 project.getVersion(),
+                                project.getCommandLineArguments(),
                                 configuration );
     }
 
@@ -338,6 +340,7 @@
                                 project.getName(),
                                 project.getNagEmailAddress(),
                                 project.getVersion(),
+                                project.getCommandLineArguments(),
                                 configuration );
     }
 
@@ -374,16 +377,12 @@
 
         configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
 
-        if ( project.getArguments() != null )
-        {
-            configuration.setProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS, project.getArguments() );
-        }
-
         core.addProjectFromScm( project.getScmUrl(),
                                 ShellBuildExecutor.ID,
                                 project.getName(),
                                 project.getNagEmailAddress(),
                                 project.getVersion(),
+                                project.getCommandLineArguments(),
                                 configuration );
     }
 
@@ -398,8 +397,6 @@
 
         sp.setExecutable( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE ) );
 
-        sp.setArguments( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS ) );
-
         return sp;
     }
 
@@ -412,11 +409,6 @@
 
         configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
 
-        if ( project.getArguments() != null )
-        {
-            configuration.setProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS, project.getArguments() );
-        }
-
         updateProjectConfiguration( project.getId(), configuration );
     }
 
@@ -431,7 +423,8 @@
                             project.getName(),
                             project.getScmUrl(),
                             project.getNagEmailAddress(),
-                            project.getVersion() );
+                            project.getVersion(),
+                            project.getCommandLineArguments() );
     }
 
     private void copyProject( ContinuumProject p1, ContinuumProject p2 )

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=171299&r1=171298&r2=171299&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 May 22 03:42:43 2005
@@ -37,7 +37,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: DefaultBuildController.java,v 1.4 2005/04/07 23:27:38 trygvis Exp $
+ * @version $Id$
  */
 public class DefaultBuildController
     extends AbstractLogEnabled
@@ -111,7 +111,7 @@
 
         try
         {
-            context.builder = buildExecutorManager.getBuilder( context.project.getExecutorId() );
+            context.builder = buildExecutorManager.getBuildExecutor( context.project.getExecutorId() );
         }
         catch ( ContinuumException e )
         {
@@ -293,7 +293,7 @@
                                  Throwable e )
         throws ContinuumStoreException
     {
-        System.err.println( "Setting the build id '" + buildId + "' state to " + state );
+        getLogger().info( "Setting the build id '" + buildId + "' state to " + state );
 
         store.setBuildResult( buildId, state, result, scmResult, e );
     }

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -19,6 +19,7 @@
 import java.net.URL;
 import java.util.Collection;
 import java.util.Properties;
+import java.util.List;
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.project.ContinuumBuild;
@@ -48,6 +49,7 @@
                               String projectName,
                               String nagEmailAddress,
                               String version,
+                              String commandLineArugments,
                               Properties configuration )
         throws ContinuumException;
 
@@ -61,7 +63,8 @@
                         String name,
                         String scmUrl,
                         String nagEmailAddress,
-                        String version )
+                        String version,
+                        String commandLineArguments )
         throws ContinuumException;
 
     void updateProjectConfiguration( String projectId, Properties configuration )

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -39,10 +39,10 @@
 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;
 import org.apache.maven.continuum.project.MavenTwoProject;
 import org.apache.maven.continuum.project.ShellProject;
-import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
@@ -191,10 +191,17 @@
             throw logAndCreateException( "Error while creating projects from URL.", e );
         }
 
-        // TODO: Update from metadata in the initial checkout?
+        for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
+        {
+            ContinuumProject project = (ContinuumProject) it.next();
+
+            validateProject( project );
+        }
 
         List ids = new ArrayList( result.getProjects().size() );
 
+        // TODO: Update from metadata in the initial checkout?
+
         for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
         {
             ContinuumProject project = (ContinuumProject) it.next();
@@ -212,6 +219,7 @@
                                      String projectName,
                                      String nagEmailAddress,
                                      String version,
+                                     String commandLineArugments,
                                      Properties configuration )
         throws ContinuumException
     {
@@ -231,17 +239,15 @@
 
         project.setVersion( version );
 
+        project.setCommandLineArguments( commandLineArugments );
+
         project.setConfiguration( configuration );
 
         // ----------------------------------------------------------------------
-        // Make sure that the builder id is correct before starting to check
-        // stuff out
+        // Validate the project
         // ----------------------------------------------------------------------
 
-        if ( !buildExecutorManager.hasBuilder( executorId ) )
-        {
-            logAndCreateException( "No such executor with id '" + executorId + "'." );
-        }
+        validateProject( project );
 
         // ----------------------------------------------------------------------
         //
@@ -282,8 +288,8 @@
 
             if ( !workingDirectory.exists() )
             {
-                logAndCreateException( "Could not make missing working directory for " +
-                                       "project '" + project.getName() + "'." );
+                throw logAndCreateException( "Could not make missing working directory for " +
+                                             "project '" + project.getName() + "'." );
             }
         }
 
@@ -303,7 +309,12 @@
         updateProjectFromCheckOut( project );
     }
 
-    public void updateProject( String projectId, String name, String scmUrl, String nagEmailAddress, String version )
+    public void updateProject( String projectId,
+                               String name,
+                               String scmUrl,
+                               String nagEmailAddress,
+                               String version,
+                               String commandLineArguments )
         throws ContinuumException
     {
         try
@@ -312,7 +323,8 @@
                                  name,
                                  scmUrl,
                                  nagEmailAddress,
-                                 version );
+                                 version,
+                                 commandLineArguments );
         }
         catch ( ContinuumStoreException e )
         {
@@ -482,6 +494,7 @@
                            project.getName(),
                            project.getNagEmailAddress(),
                            project.getVersion(),
+                           project.getCommandLineArguments(),
                            configuration );
     }
 
@@ -533,6 +546,7 @@
                            project.getName(),
                            project.getNagEmailAddress(),
                            project.getVersion(),
+                           project.getCommandLineArguments(),
                            configuration );
     }
 
@@ -574,6 +588,7 @@
                            project.getName(),
                            project.getNagEmailAddress(),
                            project.getVersion(),
+                           project.getCommandLineArguments(),
                            configuration );
     }
 
@@ -610,16 +625,12 @@
 
         configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
 
-        if ( project.getArguments() != null )
-        {
-            configuration.setProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS, project.getArguments() );
-        }
-
         addProjectFromScm( project.getScmUrl(),
                            ShellBuildExecutor.ID,
                            project.getName(),
                            project.getNagEmailAddress(),
                            project.getVersion(),
+                           project.getCommandLineArguments(),
                            configuration );
     }
 
@@ -634,8 +645,6 @@
 
         sp.setExecutable( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE ) );
 
-        sp.setArguments( p.getConfiguration().getProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS ) );
-
         return sp;
     }
 
@@ -648,14 +657,13 @@
 
         configuration.setProperty( ShellBuildExecutor.CONFIGURATION_EXECUTABLE, project.getExecutable() );
 
-        if ( project.getArguments() != null )
-        {
-            configuration.setProperty( ShellBuildExecutor.CONFIGURATION_ARGUMENTS, project.getArguments() );
-        }
-
         updateProjectConfiguration( project.getId(), configuration );
     }
 
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     private void updateProject( ContinuumProject project )
         throws ContinuumException
     {
@@ -665,7 +673,8 @@
                                  project.getName(),
                                  project.getScmUrl(),
                                  project.getNagEmailAddress(),
-                                 project.getVersion() );
+                                 project.getVersion(),
+                                 project.getCommandLineArguments() );
         }
         catch ( ContinuumStoreException e )
         {
@@ -705,6 +714,43 @@
         }
     }
 
+    private void validateProject( ContinuumProject project )
+        throws ContinuumException
+    {
+        // ----------------------------------------------------------------------
+        // Make sure that the builder id is correct before starting to check
+        // stuff out
+        // ----------------------------------------------------------------------
+
+        if ( !buildExecutorManager.hasBuildExecutor( project.getExecutorId() ) )
+        {
+            throw logAndCreateException( "No such executor with id '" + project.getExecutorId() + "'." );
+        }
+
+        try
+        {
+            if ( store.getProjectByName( project.getName() ) != null )
+            {
+                throw new ContinuumException( "A project with the name '" + project.getName() + "' already exist." );
+            }
+
+//            if ( getProjectByScmUrl( scmUrl ) != null )
+//            {
+//                throw new ContinuumStoreException( "A project with the scm url '" + scmUrl + "' already exist." );
+//            }
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw new ContinuumException( "Error while validating the project.", e );
+        }
+
+        // ----------------------------------------------------------------------
+        // Validate each field
+        // ----------------------------------------------------------------------
+
+        project.setCommandLineArguments( StringUtils.clean( project.getCommandLineArguments() ) );
+    }
+
     private ContinuumProject addProjectAndCheckOutSources( ContinuumProject project, String executorId )
         throws ContinuumException
     {
@@ -722,6 +768,7 @@
                                           project.getScmUrl(),
                                           project.getNagEmailAddress(),
                                           project.getVersion(),
+                                          project.getCommandLineArguments(),
                                           executorId,
                                           null,
                                           project.getConfiguration() );
@@ -734,8 +781,8 @@
 
             if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs() )
             {
-                logAndCreateException( "Could not make the working directory for the project " +
-                                       "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
+                throw logAndCreateException( "Could not make the working directory for the project " +
+                                             "'" + projectWorkingDirectory.getAbsolutePath() + "'." );
             }
 
             project.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
@@ -808,11 +855,14 @@
     {
         getLogger().info( "Updating project '" + project.getName() + "'." );
 
+        // Save the ID now in case the builder fucks it up
+        String id = project.getId();
+
         // ----------------------------------------------------------------------
         // Make a new descriptor
         // ----------------------------------------------------------------------
 
-        ContinuumBuildExecutor builder = buildExecutorManager.getBuilder( project.getExecutorId() );
+        ContinuumBuildExecutor builder = buildExecutorManager.getBuildExecutor( project.getExecutorId() );
 
         try
         {
@@ -829,13 +879,12 @@
 
         try
         {
-            String id = project.getId();
-
             store.updateProject( id,
                                  project.getName(),
                                  project.getScmUrl(),
                                  project.getNagEmailAddress(),
-                                 project.getVersion() );
+                                 project.getVersion(),
+                                 project.getCommandLineArguments() );
 
             store.updateProjectConfiguration( id, project.getConfiguration() );
         }

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -29,18 +29,26 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: AntBuilder.java,v 1.3 2005/04/07 23:27:39 trygvis Exp $
+ * @version $Id$
  */
 public class AntBuildExecutor
     extends AbstractBuildExecutor
     implements ContinuumBuildExecutor
 {
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     public static final String CONFIGURATION_EXECUTABLE = "executable";
 
     public static final String CONFIGURATION_TARGETS = "targets";
 
     public static final String ID = "ant";
 
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     /** @requirement */
     private ShellCommandHelper shellCommandHelper;
 
@@ -55,15 +63,17 @@
 
         Properties configuration = project.getConfiguration();
 
-        String executable = getConfigurationString( configuration, CONFIGURATION_EXECUTABLE );
+        String executable = getConfiguration( configuration, CONFIGURATION_EXECUTABLE );
 
-        String[] targets = getConfigurationStringArray( configuration, CONFIGURATION_TARGETS, "," );
+        String targets = getConfiguration( configuration, CONFIGURATION_TARGETS );
 
         ExecutionResult executionResult;
 
         try
         {
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory, executable, targets );
+            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
+                                                                      executable,
+                                                                      project.getCommandLineArguments() + " " + targets );
         }
         catch ( Exception e )
         {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/BuildExecutorManager.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/BuildExecutorManager.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/BuildExecutorManager.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/BuildExecutorManager.java Sun May 22 03:42:43 2005
@@ -21,14 +21,14 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: BuilderManager.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public interface BuildExecutorManager
 {
     String ROLE = BuildExecutorManager.class.getName();
 
-    ContinuumBuildExecutor getBuilder( String builderType )
+    ContinuumBuildExecutor getBuildExecutor( String executorId )
         throws ContinuumException;
 
-    boolean hasBuilder( String builderType );
+    boolean hasBuildExecutor( String executorId );
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManager.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManager.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManager.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManager.java Sun May 22 03:42:43 2005
@@ -28,7 +28,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: DefaultBuilderManager.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public class DefaultBuildExecutorManager
     extends AbstractLogEnabled
@@ -49,11 +49,11 @@
 
         if ( executors.size() == 0 )
         {
-            getLogger().warn( "No builders defined." );
+            getLogger().warn( "No build executors defined." );
         }
         else
         {
-            getLogger().info( "Builders:" );
+            getLogger().info( "Build executors:" );
 
             for ( Iterator it = executors.keySet().iterator(); it.hasNext(); )
             {
@@ -63,24 +63,24 @@
     }
 
     // ----------------------------------------------------------------------
-    // BuilderManager Implementation
+    // BuildExecutorManager Implementation
     // ----------------------------------------------------------------------
 
-    public ContinuumBuildExecutor getBuilder( String builderType )
+    public ContinuumBuildExecutor getBuildExecutor( String builderType )
         throws ContinuumException
     {
-        ContinuumBuildExecutor builder = (ContinuumBuildExecutor) executors.get( builderType );
+        ContinuumBuildExecutor executor = (ContinuumBuildExecutor) executors.get( builderType );
 
-        if ( builder == null )
+        if ( executor == null )
         {
-            throw new ContinuumException( "No such builder: '" + builderType + "'." );
+            throw new ContinuumException( "No such executor: '" + builderType + "'." );
         }
 
-        return builder;
+        return executor;
     }
 
-    public boolean hasBuilder( String builderType )
+    public boolean hasBuildExecutor( String executorId )
     {
-        return executors.containsKey( builderType );
+        return executors.containsKey( executorId );
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java Sun May 22 03:42:43 2005
@@ -29,7 +29,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id:$
+ * @version $Id$
  */
 public class DefaultMavenOneMetadataHelper
     extends AbstractLogEnabled
@@ -130,9 +130,9 @@
         // Goals
         Properties configuration = new Properties();
 
-        if ( !configuration.containsKey( MavenOneBuildExecutor.CONFIGURATION_GOALS ) )
+        if ( StringUtils.isEmpty( configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) ) )
         {
-            configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean, jar:install" );
+            configuration.setProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
         }
 
         // ----------------------------------------------------------------------

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -29,7 +29,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: Maven1Builder.java,v 1.2 2005/04/03 21:27:17 trygvis Exp $
+ * @version $Id$
  */
 public class MavenOneBuildExecutor
     extends AbstractBuildExecutor
@@ -59,13 +59,15 @@
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 
-        String[] goals = getConfigurationStringArray( configuration, CONFIGURATION_GOALS, "," );
+        String goals = getConfiguration( configuration, CONFIGURATION_GOALS );
 
         ExecutionResult executionResult;
 
         try
         {
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory, mavenCommand, goals );
+            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
+                                                                      mavenCommand,
+                                                                      project.getCommandLineArguments() + " " + goals );
         }
         catch ( Exception e )
         {

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -37,7 +37,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: DefaultMavenBuilderHelper.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public class DefaultMavenBuilderHelper
     extends AbstractLogEnabled
@@ -80,9 +80,9 @@
 
         Properties configuration = continuumProject.getConfiguration();
 
-        if ( !configuration.containsKey( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) )
+        if ( StringUtils.isEmpty( configuration.getProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) ) )
         {
-            configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean, install" );
+            configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean install" );
         }
     }
 

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -28,16 +28,24 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: MavenShellBuilder.java,v 1.2 2005/04/07 23:27:39 trygvis Exp $
+ * @version $Id$
  */
 public class MavenTwoBuildExecutor
     extends AbstractBuildExecutor
     implements ContinuumBuildExecutor
 {
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     public final static String CONFIGURATION_GOALS = "goals";
 
     public final static String ID = "maven2";
 
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
     /** @requirement */
     private ShellCommandHelper shellCommandHelper;
 
@@ -61,10 +69,11 @@
 
         ExecutionResult executionResult;
 
-        String[] arguments = getArguments( project );
-
         try
         {
+            String arguments = project.getCommandLineArguments() + " " +
+                               getConfiguration( project.getConfiguration(), CONFIGURATION_GOALS );
+
             executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
                                                                       executable,
                                                                       arguments );
@@ -100,27 +109,7 @@
         }
         catch ( MavenBuilderHelperException e )
         {
-            throw new ContinuumBuildExecutorException( "Error while mapping metadata" );
+            throw new ContinuumBuildExecutorException( "Error while mapping metadata.", e );
         }
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    private String[] getArguments( ContinuumProject project )
-        throws ContinuumBuildExecutorException
-    {
-        String[] a = splitAndTrimString( this.arguments, " " );
-
-        String[] goals = getConfigurationStringArray( project.getConfiguration(), CONFIGURATION_GOALS, "," );
-
-        String[] arguments = new String[ a.length + goals.length ];
-
-        System.arraycopy( a, 0, arguments, 0, a.length );
-
-        System.arraycopy( goals, 0, arguments, a.length, goals.length );
-
-        return arguments;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/DefaultShellCommandHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/DefaultShellCommandHelper.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/DefaultShellCommandHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/DefaultShellCommandHelper.java Sun May 22 03:42:43 2005
@@ -24,7 +24,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: DefaultShellCommandHelper.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public class DefaultShellCommandHelper
     extends AbstractLogEnabled
@@ -34,21 +34,38 @@
     // ShellCommandHelper Implementation
     // ----------------------------------------------------------------------
 
-    public ExecutionResult executeShellCommand( File workingDirectory, String shellCommand, String[] arguments )
+    public ExecutionResult executeShellCommand( File workingDirectory, String executable, String arguments )
         throws Exception
     {
-        Commandline cl = createCommandline( workingDirectory, shellCommand, arguments );
+        // ----------------------------------------------------------------------
+        // Make the command line
+        // ----------------------------------------------------------------------
+
+        Commandline cl = new Commandline();
+
+        cl.setExecutable( executable );
+
+        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
+
+        cl.createArgument().setLine( arguments );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
 
         CommandLineUtils.StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
 
-        int exitCode;
-
         getLogger().info( "Executing: " + cl );
+
         getLogger().info( "Working directory: " + workingDirectory.getAbsolutePath() );
 
-        exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr );
+        int exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
 
         String out = stdout.getOutput();
 
@@ -57,25 +74,5 @@
         ExecutionResult result = new ExecutionResult( out, err, exitCode );
 
         return result;
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    private Commandline createCommandline( File workingDirectory, String shellCommand, String[] arguments )
-    {
-        Commandline cl = new Commandline();
-
-        cl.setExecutable( shellCommand );
-
-        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
-
-        for ( int i = 0; i < arguments.length; i++ )
-        {
-            cl.createArgument().setValue( arguments[ i ] );
-        }
-
-        return cl;
     }
 }

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -28,41 +28,26 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: ShellBuilder.java,v 1.2 2005/04/07 23:27:40 trygvis Exp $
+ * @version $Id$
  */
 public class ShellBuildExecutor
     extends AbstractBuildExecutor
     implements ContinuumBuildExecutor
 {
-    public static final String CONFIGURATION_EXECUTABLE = "executable";
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
 
-    public final static String CONFIGURATION_ARGUMENTS = "arguments";
+    public static final String CONFIGURATION_EXECUTABLE = "executable";
 
     public final static String ID = "shell";
 
-    /** @requirement */
-    private ShellCommandHelper shellCommandHelper;
-
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    protected boolean prependWorkingDirectoryIfMissing()
-    {
-        return true;
-    }
-
-    protected String getExecutable( ContinuumProject project )
-        throws ContinuumBuildExecutorException
-    {
-        return getConfigurationString( project.getConfiguration(), CONFIGURATION_EXECUTABLE );
-    }
-
-    protected String[] getArguments( ContinuumProject project )
-        throws ContinuumBuildExecutorException
-    {
-        return getConfigurationStringArray( project.getConfiguration(), CONFIGURATION_ARGUMENTS, " ", new String[ 0 ] );
-    }
+    /** @requirement */
+    private ShellCommandHelper shellCommandHelper;
 
     // ----------------------------------------------------------------------
     // ContinuumBuilder implementation
@@ -75,13 +60,10 @@
 
         ExecutionResult executionResult;
 
-        String executable = getExecutable( project );
-
-        String[] arguments = getArguments( project );
+        String executable = getConfiguration( project.getConfiguration(), CONFIGURATION_EXECUTABLE );
 
         if ( executable.charAt( 0 ) != '/' &&
-             executable.charAt( 0 ) != '\\' &&
-             prependWorkingDirectoryIfMissing() )
+             executable.charAt( 0 ) != '\\' )
         {
             executable = workingDirectory + File.separator + executable;
         }
@@ -90,7 +72,7 @@
         {
             executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
                                                                       executable,
-                                                                      arguments );
+                                                                      project.getCommandLineArguments() );
         }
         catch ( Exception e )
         {
@@ -115,29 +97,5 @@
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
     {
         // Not much to do.
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    protected Commandline createCommandline( ContinuumProject project, String executable, String[] arguments )
-    {
-        Commandline cl = new Commandline();
-
-        cl.setExecutable( executable );
-
-        cl.setWorkingDirectory( new File( project.getWorkingDirectory() ).getAbsolutePath() );
-
-        for ( int i = 1; i < arguments.length; i++ )
-        {
-            cl.createArgument().setValue( arguments[i] );
-        }
-
-        getLogger().warn( "Executing external command '" + executable + "'." );
-
-        getLogger().warn( "Executing external command. Working directory: " + cl.getWorkingDirectory().getAbsolutePath() );
-
-        return cl;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java Sun May 22 03:42:43 2005
@@ -20,12 +20,14 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: ShellCommandHelper.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public interface ShellCommandHelper
 {
     String ROLE = ShellCommandHelper.class.getName();
 
-    ExecutionResult executeShellCommand( File workingDirectory, String shellCommand, String[] arguments )
+    ExecutionResult executeShellCommand( File workingDirectory,
+                                         String executable,
+                                         String arguments )
         throws Exception;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network/NetCat.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network/NetCat.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network/NetCat.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/network/NetCat.java Sun May 22 03:42:43 2005
@@ -29,7 +29,7 @@
  * This class emulates the unix tool <code>nc</code>.
  *
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: NetCat.java,v 1.1.1.1 2005/03/29 20:42:01 trygvis Exp $
+ * @version $Id$
  */
 public class NetCat
 {
@@ -67,8 +67,6 @@
 //                    System.err.print( (char)buffer[i] );
                 output.write( buffer, 0, n );
             }
-
-            System.err.println( "Reading return value" );
 
             while ( ( n = input.read( buffer ) ) != -1 )
             {

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/state/DefaultContinuumProjectStateGuard.java Sun May 22 03:42:43 2005
@@ -23,7 +23,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id:$
+ * @version $Id$
  */
 public class DefaultContinuumProjectStateGuard
     extends AbstractLogEnabled
@@ -39,18 +39,11 @@
 
     private final static int[] ERROR_PREVIOUS_STATES = {
         ContinuumProjectState.CHECKING_OUT,
+        ContinuumProjectState.UPDATING,
+        ContinuumProjectState.BUILDING,
     };
 
-//    private final static int[] BUILD_SIGNALED_PREVIOUS_STATES = {
-//        ContinuumProjectState.NEW,
-//        ContinuumProjectState.ERROR,
-//        ContinuumProjectState.OK,
-//        ContinuumProjectState.FAILED,
-//        ContinuumProjectState.BUILD_SIGNALED,
-//    };
-
     private final static int[] UPDATING_PREVIOUS_STATES = {
-//        ContinuumProjectState.BUILD_SIGNALED,
         ContinuumProjectState.NEW,
         ContinuumProjectState.ERROR,
         ContinuumProjectState.OK,
@@ -120,10 +113,6 @@
         {
             assertInStates( project.getState(), UPDATING_PREVIOUS_STATES, "updating" );
         }
-//        else if ( newState == ContinuumProjectState.BUILD_SIGNALED )
-//        {
-//            assertInStates( project.getState(), BUILD_SIGNALED_PREVIOUS_STATES, "build signaled" );
-//        }
         else if ( newState == ContinuumProjectState.BUILDING )
         {
             assertInStates( project.getState(), BUILDING_PREVIOUS_STATES, "building" );
@@ -270,8 +259,6 @@
                 return "failed";
             case ContinuumProjectState.ERROR:
                 return "error";
-//            case ContinuumProjectState.BUILD_SIGNALED:
-//                return "build signaled";
             case ContinuumProjectState.BUILDING:
                 return "building";
             case ContinuumProjectState.CHECKING_OUT:

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -70,20 +70,6 @@
     // ----------------------------------------------------------------------
 
     // ----------------------------------------------------------------------
-    // Database methods
-    // ----------------------------------------------------------------------
-
-    public void createDatabase()
-        throws ContinuumStoreException
-    {
-    }
-
-    public void deleteDatabase()
-        throws ContinuumStoreException
-    {
-    }
-
-    // ----------------------------------------------------------------------
     // ContinuumProject
     // ----------------------------------------------------------------------
 
@@ -91,32 +77,19 @@
                               String scmUrl,
                               String nagEmailAddress,
                               String version,
+                              String commandLineArguments,
                               String executorId,
                               String workingDirectory,
                               Properties configuration )
         throws ContinuumStoreException
     {
-        // TODO: this code should not be here, it belongs in the application or we would have to duplicate this
-        // code in every store we implemented.
-
-        if ( getProjectByName( name ) != null )
-        {
-            throw new ContinuumStoreException( "A project with the name '" + name + "' already exist." );
-        }
-
-        /*
-        if ( getProjectByScmUrl( scmUrl ) != null )
-        {
-            throw new ContinuumStoreException( "A project with the scm url '" + scmUrl + "' already exist." );
-        }
-        */
-
         ContinuumProject project = new ContinuumProject();
 
         project.setName( name );
         project.setScmUrl( scmUrl );
         project.setNagEmailAddress( nagEmailAddress );
         project.setVersion( version );
+        project.setCommandLineArguments( commandLineArguments );
         project.setExecutorId( executorId );
         project.setWorkingDirectory( workingDirectory );
         project.setState( ContinuumProjectState.CHECKING_OUT );
@@ -143,8 +116,6 @@
         {
             store.begin();
 
-            getLogger().info( "Removing project with id '" + projectId + "'." );
-
 //            System.err.println( "**********************************" );
 //            System.err.println( "**********************************" );
 //            System.err.println( "**********************************" );
@@ -242,7 +213,12 @@
         }
     }
 
-    public void updateProject( String projectId, String name, String scmUrl, String nagEmailAddress, String version )
+    public void updateProject( String projectId,
+                               String name,
+                               String scmUrl,
+                               String nagEmailAddress,
+                               String version,
+                               String commandLineArguments )
         throws ContinuumStoreException
     {
         try
@@ -257,6 +233,7 @@
             project.setScmUrl( scmUrl );
             project.setNagEmailAddress( nagEmailAddress );
             project.setVersion( version );
+            project.setCommandLineArguments( commandLineArguments );
 
             store.commit();
         }

Modified: maven/continuum/trunk/continuum-core/src/test-projects/project1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test-projects/project1/pom.xml?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test-projects/project1/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/src/test-projects/project1/pom.xml Sun May 22 03:42:43 2005
@@ -1,4 +1,4 @@
-<model>
+<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>plexus</groupId>
   <artifactId>continuum-project1</artifactId>
@@ -6,7 +6,15 @@
   <name>Continuum Test Project 1</name>
   <version>1.0</version>
   <scm>
-    <connection>scm:cvs:local:ignored:/cvs/root:project1</connection>
+    <connection>scm:local:src/test-projects:project1</connection>
     <url>http://cvs.plexus.codehaus.org/plexus-components/native/continuum/src/test-projects/project1</url>
   </scm>
-</model>
\ No newline at end of file
+  <ciManagement>
+    <notifiers>
+      <notifier>
+        <type>mail</type>
+        <address>foo@bar</address>
+      </notifier>
+    </notifiers>
+  </ciManagement>
+</project>

Added: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java?rev=171299&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java (added)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java Sun May 22 03:42:43 2005
@@ -0,0 +1,66 @@
+package org.apache.maven.continuum.core;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
+import org.apache.maven.continuum.store.ContinuumStore;
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class ContinuumCoreTest
+    extends PlexusTestCase
+{
+    public void testAddDuplicateProject()
+        throws Exception
+    {
+        ContinuumCore core = (ContinuumCore) lookup( ContinuumCore.ROLE );
+
+        ContinuumStore store = (ContinuumStore) lookup( ContinuumStore.ROLE );
+
+        // ----------------------------------------------------------------------
+        // Test projects with duplicate names
+        // ----------------------------------------------------------------------
+
+        String projectId = (String) core.addProjectsFromUrl( getTestFile( "src/test-projects/project1/pom.xml" ).toURL(),
+                                                             MavenTwoContinuumProjectBuilder.ID ).iterator().next();
+
+        ContinuumProject project = store.getProjectByName( "Continuum Test Project 1" );
+
+        assertNotNull( project );
+
+        assertEquals( projectId, project.getId() );
+
+        try
+        {
+            core.addProjectsFromUrl( getTestFile( "src/test-projects/project1/pom.xml" ).toURL(),
+                                     MavenTwoContinuumProjectBuilder.ID ).iterator().next();
+
+            fail( "Expected a ContinuumException." );
+        }
+        catch ( ContinuumException e )
+        {
+            assertTrue( e.getMessage().indexOf( "project with the name" ) != -1 );
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/core/ContinuumCoreTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java?rev=171299&r1=171298&r2=171299&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutorTest.java Sun May 22 03:42:43 2005
@@ -27,7 +27,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: Maven1BuilderTest.java,v 1.3 2005/04/06 13:57:20 trygvis Exp $
+ * @version $Id$
  */
 public class MavenOneBuildExecutorTest
     extends PlexusTestCase
@@ -37,7 +37,7 @@
     {
         BuildExecutorManager builderManager = (BuildExecutorManager) lookup( BuildExecutorManager.ROLE );
 
-        MavenOneBuildExecutor executor = (MavenOneBuildExecutor) builderManager.getBuilder( MavenOneBuildExecutor.ID );
+        MavenOneBuildExecutor executor = (MavenOneBuildExecutor) builderManager.getBuildExecutor( MavenOneBuildExecutor.ID );
 
         // ----------------------------------------------------------------------
         // Make a checkout
@@ -70,7 +70,7 @@
 
         Properties expectedConfiguration = new Properties();
 
-        expectedConfiguration.put( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean, jar:install" );
+        expectedConfiguration.put( MavenOneBuildExecutor.CONFIGURATION_GOALS, "clean:clean jar:install" );
 
         // ----------------------------------------------------------------------
         //
@@ -98,6 +98,6 @@
 
         assertEquals( 1, configuration.size() );
 
-        assertEquals( "clean:clean, jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+        assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
     }
 }

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -27,7 +27,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: Maven1BuilderTest.java,v 1.3 2005/04/06 13:57:20 trygvis Exp $
+ * @version $Id$
  */
 public class MavenOneContinuumProjectBuilderTest
     extends PlexusTestCase
@@ -61,6 +61,6 @@
 
         assertEquals( 1, configuration.size() );
 
-        assertEquals( "clean:clean, jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
+        assertEquals( "clean:clean jar:install", configuration.getProperty( MavenOneBuildExecutor.CONFIGURATION_GOALS ) );
     }
 }

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=171299&r1=171298&r2=171299&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 Sun May 22 03:42:43 2005
@@ -31,7 +31,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: MavenBuilderHelperTest.java,v 1.1.1.1 2005/03/29 20:42:04 trygvis Exp $
+ * @version $Id$
  */
 public class MavenTwoContinuumProjectBuilderTest
     extends PlexusTestCase
@@ -124,7 +124,7 @@
 
         assertEquals( 1, project.getConfiguration().size() );
 
-        assertEquals( "clean:clean, install",
+        assertEquals( "clean:clean install",
                       project.getConfiguration().get( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
     }
 }



Mime
View raw message