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 org.apache.continuum.buildagent.build.execution.AbstractBuildExecutor;
23 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildCancelledException;
24 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutionResult;
25 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutor;
26 import org.apache.continuum.buildagent.build.execution.ContinuumAgentBuildExecutorException;
27 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
28 import org.apache.maven.continuum.model.project.BuildDefinition;
29 import org.apache.maven.continuum.model.project.Project;
30
31 import java.io.File;
32 import java.util.Map;
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, File buildOutput,
48 Map<String, String> environments, String localRepository )
49 throws ContinuumAgentBuildExecutorException, ContinuumAgentBuildCancelledException
50 {
51 String executable = getBuildFileForProject( buildDefinition );
52
53 return executeShellCommand( project, executable, buildDefinition.getArguments(), buildOutput, environments );
54 }
55
56 public void updateProjectFromWorkingDirectory( File workingDirectory, Project project,
57 BuildDefinition buildDefinition )
58 throws ContinuumAgentBuildExecutorException
59 {
60
61 }
62 }