1 package org.apache.continuum.buildagent.build.execution.shell;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.Map;
24
25 import org.apache.continuum.buildagent.build.execution.AbstractBuildExecutor;
26 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildCancelledException;
27 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutionResult;
28 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutor;
29 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutorException;
30 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
31 import org.apache.maven.continuum.model.project.BuildDefinition;
32 import org.apache.maven.continuum.model.project.Project;
33
34 public class ShellBuildExecutor
35 extends AbstractBuildExecutor
36 implements ContinuumAgentBuildExecutor
37 {
38 public static final String CONFIGURATION_EXECUTABLE = "executable";
39
40 public static final String ID = ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR;
41
42 public ShellBuildExecutor()
43 {
44 super( ID, false );
45 }
46
47 public ContinuumAgentBuildExecutionResult build( Project project, BuildDefinition buildDefinition,
48 File buildOutput, Map<String, String> environments,
49 String localRepository )
50 throws ContinuumAgentBuildExecutorException, ContinuumAgentBuildCancelledException
51 {
52 String executable = getBuildFileForProject( buildDefinition );
53
54 return executeShellCommand( project, executable, buildDefinition.getArguments(), buildOutput, environments );
55 }
56
57 public void updateProjectFromWorkingDirectory( File workingDirectory, Project project,
58 BuildDefinition buildDefinition )
59 throws ContinuumAgentBuildExecutorException
60 {
61
62 }
63 }