You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by tr...@apache.org on 2005/07/01 16:50:31 UTC

svn commit: r208761 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/execution/ continuum-core/ continuum-core/src/main/java/org/apache/maven/continuum/execution/ continuum-core/src/main/java/org/apache/maven/continuu...

Author: trygvis
Date: Fri Jul  1 07:50:29 2005
New Revision: 208761

URL: http://svn.apache.org/viewcvs?rev=208761&view=rev
Log:
o Moving out the shell utility component to o.a.m.c.utils.shell.
o Switching the Modello plugin to 1.0-alpha-3 release.
o Adding AbstractModelloTest. Collected some bits from the other test cases
  that was commonly useful. Might want to consider moving this to
  continuum-test.
o Moving lots of common stuff from all the build executors to the
  AbstractBuildExecutor.
o Started using the ExecutableResolver in the abstract builder to be able to
  give better feedback to the users when external commands are missing. This
  part might still need more work and will currently only warn about missing
  commands, not abort the build.

Added:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
      - copied, changed from r191649, maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java
      - copied, changed from r191649, 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/utils/shell/ExecutionResult.java
      - copied, changed from r191649, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ExecutionResult.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java
      - copied, changed from r191649, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AbstractContinuumTest.java   (with props)
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutorTest.java   (with props)
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/utils/
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/utils/shell/
Removed:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.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/ExecutionResult.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java
Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    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/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/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStoreTest.java
    maven/continuum/trunk/continuum-model/pom.xml
    maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/pom.xml?rev=208761&r1=208760&r2=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Fri Jul  1 07:50:29 2005
@@ -57,6 +57,11 @@
       <artifactId>plexus-action</artifactId>
       <version>1.0-alpha-1</version>
     </dependency>
+    <dependency>
+      <groupId>plexus</groupId>
+      <artifactId>plexus-command-line</artifactId>
+      <version>1.0-alpha-1-SNAPSHOT</version>
+    </dependency>
 
     <!--
      |

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (from r191649, 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-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java&p1=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java&r1=191649&r2=208761&rev=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java Fri Jul  1 07:50:29 2005
@@ -16,10 +16,18 @@
  * limitations under the License.
  */
 
-import java.util.Properties;
+import java.util.List;
+import java.util.Iterator;
+import java.io.File;
+
+import org.apache.maven.continuum.utils.shell.ShellCommandHelper;
+import org.apache.maven.continuum.utils.shell.ExecutionResult;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.commandline.ExecutableResolver;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -27,18 +35,152 @@
  */
 public abstract class AbstractBuildExecutor
     extends AbstractLogEnabled
-    implements ContinuumBuildExecutor
+    implements ContinuumBuildExecutor, Initializable
 {
-    protected String getConfiguration( Properties configuration, String property )
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    /** @plexus.requirement */
+    private ShellCommandHelper shellCommandHelper;
+
+    /** @plexus.requirement */
+    private ExecutableResolver executableResolver;
+
+    /** @plexus.configuration */
+    private String defaultExecutable;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private String id;
+
+    private boolean resolveExecutable;
+
+    private File resolvedExecutable;
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    protected AbstractBuildExecutor( String id, boolean resolveExecutable )
+    {
+        this.id = id;
+
+        this.resolveExecutable = resolveExecutable;
+    }
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void initialize()
+        throws InitializationException
+    {
+        List path = executableResolver.getDefaultPath();
+
+        if ( resolveExecutable )
+        {
+            if ( StringUtils.isEmpty( defaultExecutable ) )
+            {
+                getLogger().warn( "The default executable for build executor '" + id + "' is not set. " +
+                                  "This will cause a problem unless the project has a executable configured." );
+            }
+            else
+            {
+                resolvedExecutable = executableResolver.findExecutable( defaultExecutable, path );
+
+                if ( resolvedExecutable == null )
+                {
+                    getLogger().warn( "Could not find the executable '" + defaultExecutable + "' in the path '" + path + "'" );
+                }
+                else
+                {
+                    getLogger().info( "Resolved the executable '" + defaultExecutable + "' to " +
+                                      "'" + resolvedExecutable.getAbsolutePath() + "'");
+                }
+            }
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    protected ContinuumBuildExecutionResult executeShellCommand( File workingDirectory,
+                                                                 String executable,
+                                                                 String arguments )
         throws ContinuumBuildExecutorException
     {
-        String string = configuration.getProperty( property );
+        File actualExecutable = resolvedExecutable;
+
+        // ----------------------------------------------------------------------
+        // If we're not searching the path for the executable, prefix the
+        // executable with the working directory to make sure the path is
+        // absolute and thus won't be tried resolved by using the PATH
+        // ----------------------------------------------------------------------
 
-        if ( StringUtils.isEmpty( string ) )
+        if ( !resolveExecutable )
         {
-            throw new ContinuumBuildExecutorException( "Missing configuration: '" + property + "'." );
+            actualExecutable = new File( workingDirectory, executable );
         }
 
-        return string;
+        // ----------------------------------------------------------------------
+        // Find the executable to execute in the path
+        // ----------------------------------------------------------------------
+
+        // TODO: actually use the resolved executable. This is disabled now until
+        //       I know that this code actually is working properly on all platforms
+        List path = executableResolver.getDefaultPath();
+
+        if ( resolveExecutable )
+        {
+            if ( StringUtils.isEmpty( executable ) )
+            {
+                executable = defaultExecutable;
+            }
+
+            File e = executableResolver.findExecutable( executable, path );
+
+            if ( e == null )
+            {
+                getLogger().warn( "Could not find the executable '" + executable + "' in this path: " );
+
+                for ( Iterator it = path.iterator(); it.hasNext(); )
+                {
+                    String element = (String) it.next();
+
+                    getLogger().warn( element );
+                }
+            }
+            else
+            {
+                getLogger().warn( "Using executable '" + e.getAbsolutePath() + "'." );
+            }
+
+            // TODO: remove comment when this code is working properly
+            actualExecutable = e;
+        }
+
+        // ----------------------------------------------------------------------
+        // Execute the build
+        // ----------------------------------------------------------------------
+
+        try
+        {
+            ExecutionResult result = shellCommandHelper.executeShellCommand( workingDirectory,
+                                                                             actualExecutable,
+                                                                             arguments );
+
+            return new ContinuumBuildExecutionResult( result.getExitCode() == 0,
+                                                      result.getStandardOutput(),
+                                                      result.getStandardError(),
+                                                      result.getExitCode() );
+        }
+        catch ( Exception e )
+        {
+            throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
+        }
     }
 }

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=208761&r1=208760&r2=208761&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 Fri Jul  1 07:50:29 2005
@@ -17,16 +17,13 @@
  */
 
 import java.io.File;
-import java.util.Properties;
 
 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.ContinuumBuildExecutionResult;
-import org.apache.maven.continuum.execution.shell.ExecutionResult;
-import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
-import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.AntProject;
+import org.apache.maven.continuum.project.ContinuumProject;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -50,8 +47,10 @@
     //
     // ----------------------------------------------------------------------
 
-    /** @requirement */
-    private ShellCommandHelper shellCommandHelper;
+    public AntBuildExecutor()
+    {
+        super( ID, true );
+    }
 
     // ----------------------------------------------------------------------
     // ContinuumBuilder Implementation
@@ -68,38 +67,19 @@
 
         String targets = project.getTargets();
 
-        ExecutionResult executionResult;
-
-        try
-        {
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
-                                                                      executable,
-                                                                      project.getCommandLineArguments() + " " + targets );
-        }
-        catch ( Exception e )
-        {
-            throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
-        }
-
-        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
-                                                  executionResult.getStandardOutput(),
-                                                  executionResult.getStandardError(),
-                                                  executionResult.getExitCode() );
+        return executeShellCommand( workingDirectory,
+                                    executable,
+                                    project.getCommandLineArguments() + " " + targets );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
-        Properties configuration = new Properties();
-
-        if ( !configuration.containsKey( CONFIGURATION_EXECUTABLE ) )
-        {
-            configuration.setProperty( CONFIGURATION_EXECUTABLE, "ant" );
-        }
+        AntProject project = (AntProject) p;
 
-        if ( !configuration.containsKey( CONFIGURATION_TARGETS ) )
+        if ( project.getTargets() == null )
         {
-            configuration.setProperty( CONFIGURATION_TARGETS, "" );
+            project.setTargets( "" );
         }
     }
 }

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=208761&r1=208760&r2=208761&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 Fri Jul  1 07:50:29 2005
@@ -22,11 +22,11 @@
 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.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 
+import org.codehaus.plexus.util.StringUtils;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -39,14 +39,17 @@
 
     public final static String ID = "maven-1";
 
-    /** @requirement */
-    private ShellCommandHelper shellCommandHelper;
-
-    /** @requirement */
+    /** @plexus.requirement */
     private MavenOneMetadataHelper metadataHelper;
 
-    /** @configuration */
-    private String mavenCommand;
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    public MavenOneBuildExecutor()
+    {
+        super( ID, true );
+    }
 
     // ----------------------------------------------------------------------
     // Builder Implementation
@@ -59,25 +62,10 @@
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 
-        String commandLine = project.getCommandLineArguments() + " " + project.getGoals();
-
-        ExecutionResult executionResult;
+        String commandLine = StringUtils.clean( project.getCommandLineArguments() ) + " " +
+                             StringUtils.clean( project.getGoals() );
 
-        try
-        {
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
-                                                                      mavenCommand,
-                                                                      commandLine );
-        }
-        catch ( Exception e )
-        {
-            throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
-        }
-
-        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
-                                                  executionResult.getStandardOutput(),
-                                                  executionResult.getStandardError(),
-                                                  executionResult.getExitCode() );
+        return executeShellCommand( workingDirectory, null, commandLine );
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )

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=208761&r1=208760&r2=208761&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 Fri Jul  1 07:50:29 2005
@@ -22,8 +22,6 @@
 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.ContinuumProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
 
@@ -47,14 +45,17 @@
     //
     // ----------------------------------------------------------------------
 
-    /** @requirement */
-    private ShellCommandHelper shellCommandHelper;
-
-    /** @requirement */
+    /** @plexus.requirement */
     private MavenBuilderHelper builderHelper;
 
-    /** @configuration */
-    private String executable;
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    public MavenTwoBuildExecutor()
+    {
+        super( ID, true );
+    }
 
     // ----------------------------------------------------------------------
     // ContinuumBuilder Implementation
@@ -67,25 +68,11 @@
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 
-        ExecutionResult executionResult;
+        String arguments = project.getCommandLineArguments() + " " + project.getGoals();
 
-        try
-        {
-            String arguments = project.getCommandLineArguments() + " " + project.getGoals();
-
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
-                                                                      executable,
-                                                                      arguments );
-        }
-        catch ( Exception e )
-        {
-            throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
-        }
-
-        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
-                                                  executionResult.getStandardOutput(),
-                                                  executionResult.getStandardError(),
-                                                  executionResult.getExitCode() );
+        return executeShellCommand( workingDirectory,
+                                    null,
+                                    arguments );
     }
 
     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=208761&r1=208760&r2=208761&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 Fri Jul  1 07:50:29 2005
@@ -19,9 +19,9 @@
 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.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.ShellProject;
 
@@ -45,8 +45,10 @@
     //
     // ----------------------------------------------------------------------
 
-    /** @requirement */
-    private ShellCommandHelper shellCommandHelper;
+    public ShellBuildExecutor()
+    {
+        super( ID, false );
+    }
 
     // ----------------------------------------------------------------------
     // ContinuumBuilder implementation
@@ -59,35 +61,24 @@
 
         File workingDirectory = new File( project.getWorkingDirectory() );
 
-        ExecutionResult executionResult;
-
         String executable = project.getExecutable();
 
-        if ( executable.charAt( 0 ) != '/' &&
-             executable.charAt( 0 ) != '\\' )
-        {
-            executable = workingDirectory + File.separator + executable;
-        }
-
-        try
-        {
-            executionResult = shellCommandHelper.executeShellCommand( workingDirectory,
-                                                                      executable,
-                                                                      project.getCommandLineArguments() );
-        }
-        catch ( Exception e )
-        {
-            throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
-        }
-
-        return new ContinuumBuildExecutionResult( executionResult.getExitCode() == 0,
-                                                  executionResult.getStandardOutput(),
-                                                  executionResult.getStandardError(),
-                                                  executionResult.getExitCode() );
+        return executeShellCommand( workingDirectory,
+                                    executable,
+                                    project.getCommandLineArguments() );
     }
 
-    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
+    public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject p )
+        throws ContinuumBuildExecutorException
     {
-        // Not much to do.
+        ShellProject project = (ShellProject) p;
+
+        String executable = project.getExecutable();
+
+        if ( new File( executable ).isAbsolute() )
+        {
+            throw new ContinuumBuildExecutorException( "The shell script must be a relative path. " +
+                                                       "It will be relative to the checkout" );
+        }
     }
 }

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java (from r191649, 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/utils/shell/DefaultShellCommandHelper.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/DefaultShellCommandHelper.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/DefaultShellCommandHelper.java&r1=191649&r2=208761&rev=208761&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/utils/shell/DefaultShellCommandHelper.java Fri Jul  1 07:50:29 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum.execution.shell;
+package org.apache.maven.continuum.utils.shell;
 
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
@@ -34,7 +34,25 @@
     // ShellCommandHelper Implementation
     // ----------------------------------------------------------------------
 
-    public ExecutionResult executeShellCommand( File workingDirectory, String executable, String arguments )
+    public ExecutionResult executeShellCommand( File workingDirectory,
+                                                File executable,
+                                                String arguments )
+        throws Exception
+    {
+        Commandline cl = new Commandline();
+
+        Commandline.Argument argument = cl.createArgument();
+
+        argument.setLine( arguments );
+
+        return executeShellCommand( workingDirectory,
+                                    executable,
+                                    argument.getParts() );
+    }
+
+    public ExecutionResult executeShellCommand( File workingDirectory,
+                                                File executable,
+                                                String[] arguments )
         throws Exception
     {
         // ----------------------------------------------------------------------
@@ -43,11 +61,16 @@
 
         Commandline cl = new Commandline();
 
-        cl.setExecutable( executable );
+        cl.setExecutable( executable.getAbsolutePath() );
 
         cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
 
-        cl.createArgument().setLine( arguments );
+        for ( int i = 0; i < arguments.length; i++ )
+        {
+            String argument = arguments[ i ];
+
+            cl.createArgument().setValue( argument );
+        }
 
         // ----------------------------------------------------------------------
         //

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ExecutionResult.java (from r191649, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ExecutionResult.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ExecutionResult.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ExecutionResult.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ExecutionResult.java&r1=191649&r2=208761&rev=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ExecutionResult.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ExecutionResult.java Fri Jul  1 07:50:29 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum.execution.shell;
+package org.apache.maven.continuum.utils.shell;
 
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
@@ -18,7 +18,7 @@
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id: ExecutionResult.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
+ * @version $Id$
  */
 public class ExecutionResult
 {

Copied: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java (from r191649, 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/utils/shell/ShellCommandHelper.java?p2=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/shell/ShellCommandHelper.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellCommandHelper.java&r1=191649&r2=208761&rev=208761&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/utils/shell/ShellCommandHelper.java Fri Jul  1 07:50:29 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.continuum.execution.shell;
+package org.apache.maven.continuum.utils.shell;
 
 /*
  * Copyright 2004-2005 The Apache Software Foundation.
@@ -27,7 +27,12 @@
     String ROLE = ShellCommandHelper.class.getName();
 
     ExecutionResult executeShellCommand( File workingDirectory,
-                                         String executable,
+                                         File executable,
                                          String arguments )
+        throws Exception;
+
+    ExecutionResult executeShellCommand( File workingDirectory,
+                                         File executable,
+                                         String[] arguments )
         throws Exception;
 }

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=208761&r1=208760&r2=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Fri Jul  1 07:50:29 2005
@@ -186,11 +186,14 @@
       <role-hint>maven2</role-hint>
       <implementation>org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor</implementation>
       <configuration>
-        <executable>m2</executable>
+        <default-executable>m2</default-executable>
       </configuration>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.execution.shell.ShellCommandHelper</role>
+          <role>org.apache.maven.continuum.utils.shell.ShellCommandHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
         <requirement>
           <role>org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper</role>
@@ -232,11 +235,14 @@
       <role-hint>maven-1</role-hint>
       <implementation>org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor</implementation>
       <configuration>
-        <maven-command>maven</maven-command>
+        <default-executable>maven</default-executable>
       </configuration>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.execution.shell.ShellCommandHelper</role>
+          <role>org.apache.maven.continuum.utils.shell.ShellCommandHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
         <requirement>
           <role>org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper</role>
@@ -250,8 +256,8 @@
     </component>
 
     <component>
-      <role>org.apache.maven.continuum.execution.shell.ShellCommandHelper</role>
-      <implementation>org.apache.maven.continuum.execution.shell.DefaultShellCommandHelper</implementation>
+      <role>org.apache.maven.continuum.utils.shell.ShellCommandHelper</role>
+      <implementation>org.apache.maven.continuum.utils.shell.DefaultShellCommandHelper</implementation>
     </component>
 
     <component>
@@ -260,9 +266,15 @@
       <implementation>org.apache.maven.continuum.execution.ant.AntBuildExecutor</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.execution.shell.ShellCommandHelper</role>
+          <role>org.apache.maven.continuum.utils.shell.ShellCommandHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
       </requirements>
+      <configuration>
+        <default-executable>ant</default-executable>
+      </configuration>
     </component>
 
     <component>
@@ -271,7 +283,10 @@
       <implementation>org.apache.maven.continuum.execution.shell.ShellBuildExecutor</implementation>
       <requirements>
         <requirement>
-          <role>org.apache.maven.continuum.execution.shell.ShellCommandHelper</role>
+          <role>org.apache.maven.continuum.utils.shell.ShellCommandHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.commandline.ExecutableResolver</role>
         </requirement>
       </requirements>
     </component>

Added: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AbstractContinuumTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=208761&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AbstractContinuumTest.java (added)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AbstractContinuumTest.java Fri Jul  1 07:50:29 2005
@@ -0,0 +1,155 @@
+package org.apache.maven.continuum;
+
+/*
+ * 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 java.util.List;
+import java.util.Properties;
+import java.util.ArrayList;
+
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.project.MavenTwoProject;
+import org.apache.maven.continuum.project.ContinuumNotifier;
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.ShellProject;
+
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public abstract class AbstractContinuumTest
+    extends PlexusTestCase
+{
+    // ----------------------------------------------------------------------
+    // Build Executor
+    // ----------------------------------------------------------------------
+
+    protected ContinuumBuildExecutor getBuildExecutor( String id )
+        throws Exception
+    {
+        ContinuumBuildExecutor buildExecutor = (ContinuumBuildExecutor) lookup( ContinuumBuildExecutor.ROLE, id );
+
+        assertNotNull( "Could not look up build executor '" + id + "'", buildExecutor );
+
+        return buildExecutor;
+    }
+
+    protected ShellBuildExecutor getShellBuildExecutor()
+        throws Exception
+    {
+        return (ShellBuildExecutor) getBuildExecutor( ShellBuildExecutor.ID );
+    }
+
+    // ----------------------------------------------------------------------
+    // Maven 2 Project Generators
+    // ----------------------------------------------------------------------
+
+    public static MavenTwoProject makeStubMavenTwoProject( String name, String scmUrl )
+    {
+        return makeMavenTwoProject( name,
+                                    scmUrl,
+                                    "foo@bar.com",
+                                    "1.0",
+                                    "",
+                                    getTestFile( "plexus-temp" ).getAbsolutePath() );
+    }
+
+    public static MavenTwoProject makeMavenTwoProject( String name,
+                                                       String scmUrl,
+                                                       String emailAddress,
+                                                       String version,
+                                                       String commandLineArguments,
+                                                       String workingDirectory )
+    {
+        MavenTwoProject project = new MavenTwoProject();
+
+        makeProject( project,
+                     name,
+                     scmUrl,
+                     version,
+                     commandLineArguments,
+                     workingDirectory,
+                     MavenTwoBuildExecutor.ID );
+
+        List notifiers = createMailNotifierList( emailAddress );
+
+        project.setNotifiers( notifiers );
+
+        return project;
+    }
+
+    // ----------------------------------------------------------------------
+    // Shell Project Generators
+    // ----------------------------------------------------------------------
+
+    public static ShellProject makeStubShellProject( String name, String scmUrl )
+    {
+        ShellProject project = new ShellProject();
+
+        makeProject( project,
+                     name,
+                     scmUrl,
+                     "1.0",
+                     "",
+                     getTestFile( "plexus-temp" ).getAbsolutePath(),
+                     ShellBuildExecutor.ID );
+
+        project.setExecutable( "script.sh" );
+
+        return project;
+    }
+
+    public static ContinuumProject makeProject( ContinuumProject project,
+                                                String name,
+                                                String scmUrl,
+                                                String version,
+                                                String commandLineArguments,
+                                                String workingDirectory,
+                                                String executorId )
+    {
+        project.setName( name );
+        project.setScmUrl( scmUrl );
+        project.setVersion( version );
+        project.setCommandLineArguments( commandLineArguments );
+        project.setWorkingDirectory( workingDirectory );
+        project.setExecutorId( executorId );
+
+        return project;
+    }
+
+    protected static List createMailNotifierList( String emailAddress )
+    {
+        ContinuumNotifier notifier = new ContinuumNotifier();
+
+        notifier.setType( "mail" );
+
+        Properties props = new Properties();
+
+        props.put( "address", emailAddress );
+
+        notifier.setConfiguration( props );
+
+        List notifiers = new ArrayList();
+
+        notifiers.add( notifier );
+
+        return notifiers;
+    }
+}

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

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

Added: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutorTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutorTest.java?rev=208761&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutorTest.java (added)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutorTest.java Fri Jul  1 07:50:29 2005
@@ -0,0 +1,62 @@
+package org.apache.maven.continuum.execution.shell;
+
+/*
+ * 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.AbstractContinuumTest;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
+import org.apache.maven.continuum.project.ShellProject;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class ShellBuildExecutorTest
+    extends AbstractContinuumTest
+{
+    public void testNonAbsolutePath()
+        throws Exception
+    {
+        ShellBuildExecutor buildExecutor = getShellBuildExecutor();
+
+        ShellProject project = makeStubShellProject( "Shell project", "scm:foo" );
+
+        String script = project.getExecutable();
+
+        buildExecutor.updateProjectFromCheckOut( null, project );
+
+        assertEquals( script, project.getExecutable() );
+    }
+
+    public void testAbsolutePath()
+        throws Exception
+    {
+        ShellProject project = makeStubShellProject( "Shell project", "scm:foo" );
+
+        project.setExecutable( getTestFile( "foo.sh" ).getAbsolutePath() );
+
+        try
+        {
+            getShellBuildExecutor().updateProjectFromCheckOut( null, project );
+
+            fail( "Expected ContinuumBuildExecutorException" );
+        }
+        catch ( ContinuumBuildExecutorException e )
+        {
+            // expected
+        }
+    }
+}

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

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

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=208761&r1=208760&r2=208761&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 Fri Jul  1 07:50:29 2005
@@ -18,15 +18,16 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Date;
 
+import org.apache.maven.continuum.AbstractContinuumTest;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.project.ContinuumBuild;
 import org.apache.maven.continuum.project.ContinuumJPoxStore;
 import org.apache.maven.continuum.project.ContinuumNotifier;
@@ -37,7 +38,6 @@
 import org.apache.maven.continuum.scm.ScmFile;
 import org.apache.maven.continuum.scm.UpdateScmResult;
 
-import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.jdo.JdoFactory;
 
 /**
@@ -45,7 +45,7 @@
  * @version $Id$
  */
 public class ModelloJPoxContinuumStoreTest
-    extends PlexusTestCase
+    extends AbstractContinuumTest
 {
     private ContinuumStore store;
 
@@ -175,7 +175,6 @@
                                                                   "foo@bar.com",
                                                                   "1.0",
                                                                   "a b",
-                                                                  "maven2",
                                                                   "/tmp" ) );
 
         assertNotNull( "The project id is null.", projectId );
@@ -187,7 +186,6 @@
                                                              "foo@bar.com",
                                                              "1.0",
                                                              "a b",
-                                                             "maven2",
                                                              "/tmp" ), actual );
     }
 
@@ -219,7 +217,6 @@
         String nagEmailAddress = "foo@bar.com";
         String version = "1.0";
         String commandLineArguments = "";
-        String builderId = "maven2";
         String workingDirectory = "/tmp";
 
         ContinuumProject project = makeMavenTwoProject( name,
@@ -227,7 +224,6 @@
                                                         nagEmailAddress,
                                                         version,
                                                         commandLineArguments,
-                                                        builderId,
                                                         workingDirectory );
 
         String projectId = store.addProject( project );
@@ -298,7 +294,7 @@
                              notifiers,
                              version2,
                              commandLineArguments2,
-                             builderId,
+                             MavenTwoBuildExecutor.ID,
                              workingDirectory,
                              project );
 
@@ -334,7 +330,6 @@
         String nagEmailAddress1 = "foo@bar.com";
         String version1 = "1.0";
         String commandLineArguments1 = "";
-        String builderId1 = "maven2";
         String workingDirectory1 = "/tmp";
 
         String id1 = addMavenTwoProject( store,
@@ -343,7 +338,6 @@
                                  nagEmailAddress1,
                                  version1,
                                  commandLineArguments1,
-                                 builderId1,
                                  workingDirectory1 );
 
         String name2 = "Test Project 2";
@@ -351,7 +345,6 @@
         String nagEmailAddress2 = "foo@bar.com";
         String version2 = "1.0";
         String commandLineArguments2 = "";
-        String builderId2 = "maven2";
         String workingDirectory2 = "/tmp";
 
         String id2 = addMavenTwoProject( store,
@@ -360,7 +353,6 @@
                                  nagEmailAddress2,
                                  version2,
                                  commandLineArguments2,
-                                 builderId2,
                                  workingDirectory2 );
 
         Map projects = new HashMap();
@@ -384,7 +376,7 @@
                              nagEmailAddress1,
                              version1,
                              commandLineArguments1,
-                             builderId1,
+                             MavenTwoBuildExecutor.ID,
                              workingDirectory1,
                              project1 );
 
@@ -396,7 +388,7 @@
                              nagEmailAddress2,
                              version2,
                              commandLineArguments2,
-                             builderId2,
+                             MavenTwoBuildExecutor.ID,
                              workingDirectory2,
                              project2 );
     }
@@ -799,60 +791,6 @@
     // Public utility methods
     // ----------------------------------------------------------------------
 
-    public static MavenTwoProject makeStubMavenTwoProject( String name, String scmUrl )
-    {
-        return makeMavenTwoProject( name,
-                                    scmUrl,
-                                    "foo@bar.com",
-                                    "1.0",
-                                    "",
-                                    ContinuumBuildExecutor.MAVEN_TWO_EXECUTOR_ID,
-                                    "/tmp" );
-    }
-
-    public static MavenTwoProject makeMavenTwoProject( String name,
-                                                       String scmUrl,
-                                                       String emailAddress,
-                                                       String version,
-                                                       String commandLineArguments,
-                                                       String executorId,
-                                                       String workingDirectory )
-    {
-        MavenTwoProject project = new MavenTwoProject();
-
-        project.setName( name );
-        project.setScmUrl( scmUrl );
-
-        List notifiers = createNotifiers( emailAddress );
-        project.setNotifiers( notifiers );
-
-        project.setVersion( version );
-        project.setCommandLineArguments( commandLineArguments );
-        project.setExecutorId( executorId );
-        project.setWorkingDirectory( workingDirectory );
-
-        return project;
-    }
-
-    private static List createNotifiers( String emailAddress )
-    {
-        ContinuumNotifier notifier = new ContinuumNotifier();
-
-        notifier.setType( "mail" );
-
-        Properties props = new Properties();
-
-        props.put( "address", emailAddress );
-
-        notifier.setConfiguration( props );
-
-        List notifiers = new ArrayList();
-
-        notifiers.add( notifier );
-
-        return notifiers;
-    }
-
     public static String addMavenTwoProject( ContinuumStore store,
                                              ContinuumProject project )
         throws Exception
@@ -898,7 +836,6 @@
                                              String nagEmailAddress,
                                              String version,
                                              String commandLineArguments,
-                                             String executorId,
                                              String workingDirectory )
         throws Exception
     {
@@ -907,7 +844,6 @@
                                                                   nagEmailAddress,
                                                                   version,
                                                                   commandLineArguments,
-                                                                  executorId,
                                                                   workingDirectory ) );
 
         CheckOutScmResult checkOutScmResult = new CheckOutScmResult();
@@ -920,8 +856,6 @@
 
         assertNotNull( project );
 
-//        assertEquals( ContinuumProjectState.NEW, project.getState() );
-
         return projectId;
     }
 
@@ -1043,7 +977,7 @@
         assertProjectEquals( projectId,
                              name,
                              scmUrl,
-                             createNotifiers( emailAddress),
+                             createMailNotifierList( emailAddress),
                              version,
                              commandLineArguments,
                              builderId,

Modified: maven/continuum/trunk/continuum-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/pom.xml?rev=208761&r1=208760&r2=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/pom.xml (original)
+++ maven/continuum/trunk/continuum-model/pom.xml Fri Jul  1 07:50:29 2005
@@ -32,7 +32,7 @@
       <plugin>
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
-        <version>1.0-alpha-3-SNAPSHOT</version>
+        <version>1.0-alpha-3</version>
         <configuration>
           <version>1.0.0</version>
           <packageWithVersion>false</packageWithVersion>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo?rev=208761&r1=208760&r2=208761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Fri Jul  1 07:50:29 2005
@@ -22,6 +22,7 @@
         <field>
           <name>id</name>
           <required>true</required>
+          <identifier>true</identifier>
           <version>1.0.0</version>
           <type>String</type>
         </field>
@@ -173,6 +174,7 @@
       <fields>
         <field>
           <name>id</name>
+          <identifier>true</identifier>
           <version>1.0.0</version>
           <type>String</type>
         </field>
@@ -270,6 +272,7 @@
         </field>
         <field>
           <name>id</name>
+          <identifier>true</identifier>
           <version>1.0.0</version>
           <type>String</type>
         </field>