org.apache.continuum.buildagent.build.execution
Class AbstractBuildExecutor
java.lang.Object
org.apache.continuum.buildagent.build.execution.AbstractBuildExecutor
- All Implemented Interfaces:
- ContinuumAgentBuildExecutor, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- Direct Known Subclasses:
- AntBuildExecutor, MavenOneBuildExecutor, MavenTwoBuildExecutor, ShellBuildExecutor
public abstract class AbstractBuildExecutor
- extends Object
- implements ContinuumAgentBuildExecutor, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Field Summary |
protected static org.slf4j.Logger |
log
|
Method Summary |
protected ContinuumAgentBuildExecutionResult |
executeShellCommand(org.apache.maven.continuum.model.project.Project project,
String executable,
String arguments,
File output,
Map<String,String> environments)
|
protected String |
findExecutable(String executable,
String defaultExecutable,
boolean resolveExecutable,
File workingDirectory)
Find the actual executable path to be used |
BuildAgentConfigurationService |
getBuildAgentConfigurationService()
|
BuildAgentInstallationService |
getBuildAgentInstallationService()
|
BuildAgentManager |
getBuildAgentManager()
|
protected String |
getBuildFileForProject(org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
|
protected Properties |
getContinuumSystemProperties(org.apache.maven.continuum.model.project.Project project)
|
String |
getDefaultExecutable()
|
List<org.apache.maven.artifact.Artifact> |
getDeployableArtifacts(org.apache.maven.continuum.model.project.Project project,
File workingDirectory,
org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
|
org.codehaus.plexus.commandline.ExecutableResolver |
getExecutableResolver()
|
org.apache.maven.project.MavenProject |
getMavenProject(File workingDirectory,
org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
|
protected List<Map<String,Object>> |
getProjectDependencies(List<org.apache.maven.continuum.model.project.ProjectDependency> dependencies)
|
protected List<Map<String,String>> |
getProjectDevelopers(List<org.apache.maven.continuum.model.project.ProjectDeveloper> developers)
|
protected List<Map<String,Object>> |
getProjectNotifiers(List<org.apache.maven.continuum.model.project.ProjectNotifier> notifiers)
|
protected Map<String,Object> |
getProjectParent(org.apache.maven.continuum.model.project.ProjectDependency parent)
|
org.apache.continuum.utils.shell.ShellCommandHelper |
getShellCommandHelper()
|
File |
getWorkingDirectory(int projectId)
|
void |
initialize()
|
boolean |
isBuilding(org.apache.maven.continuum.model.project.Project project)
|
boolean |
isResolveExecutable()
|
void |
killProcess(org.apache.maven.continuum.model.project.Project project)
|
void |
setBuildAgentConfigurationService(BuildAgentConfigurationService buildAgentConfigurationService)
|
void |
setBuildAgentInstallationService(BuildAgentInstallationService buildAgentInstallationService)
|
void |
setBuildAgentManager(BuildAgentManager buildAgentManager)
|
void |
setDefaultExecutable(String defaultExecutable)
|
void |
setExecutableResolver(org.codehaus.plexus.commandline.ExecutableResolver executableResolver)
|
void |
setResolveExecutable(boolean resolveExecutable)
|
void |
setShellCommandHelper(org.apache.continuum.utils.shell.ShellCommandHelper shellCommandHelper)
|
protected void |
updateProject(org.apache.maven.continuum.model.project.Project project)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.slf4j.Logger log
AbstractBuildExecutor
protected AbstractBuildExecutor(String id,
boolean resolveExecutable)
setShellCommandHelper
public void setShellCommandHelper(org.apache.continuum.utils.shell.ShellCommandHelper shellCommandHelper)
getShellCommandHelper
public org.apache.continuum.utils.shell.ShellCommandHelper getShellCommandHelper()
setDefaultExecutable
public void setDefaultExecutable(String defaultExecutable)
getBuildAgentConfigurationService
public BuildAgentConfigurationService getBuildAgentConfigurationService()
setBuildAgentConfigurationService
public void setBuildAgentConfigurationService(BuildAgentConfigurationService buildAgentConfigurationService)
getBuildAgentInstallationService
public BuildAgentInstallationService getBuildAgentInstallationService()
setBuildAgentInstallationService
public void setBuildAgentInstallationService(BuildAgentInstallationService buildAgentInstallationService)
getBuildAgentManager
public BuildAgentManager getBuildAgentManager()
setBuildAgentManager
public void setBuildAgentManager(BuildAgentManager buildAgentManager)
getDefaultExecutable
public String getDefaultExecutable()
initialize
public void initialize()
throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
- Specified by:
initialize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
findExecutable
protected String findExecutable(String executable,
String defaultExecutable,
boolean resolveExecutable,
File workingDirectory)
- Find the actual executable path to be used
- Parameters:
defaultExecutable
-
- Returns:
- The executable path
executeShellCommand
protected ContinuumAgentBuildExecutionResult executeShellCommand(org.apache.maven.continuum.model.project.Project project,
String executable,
String arguments,
File output,
Map<String,String> environments)
throws ContinuumAgentBuildExecutorException,
ContinuumAgentBuildCancelledException
- Throws:
ContinuumAgentBuildExecutorException
ContinuumAgentBuildCancelledException
getContinuumSystemProperties
protected Properties getContinuumSystemProperties(org.apache.maven.continuum.model.project.Project project)
getBuildFileForProject
protected String getBuildFileForProject(org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
updateProject
protected void updateProject(org.apache.maven.continuum.model.project.Project project)
throws ContinuumAgentBuildExecutorException
- Throws:
ContinuumAgentBuildExecutorException
getProjectDevelopers
protected List<Map<String,String>> getProjectDevelopers(List<org.apache.maven.continuum.model.project.ProjectDeveloper> developers)
getProjectParent
protected Map<String,Object> getProjectParent(org.apache.maven.continuum.model.project.ProjectDependency parent)
getProjectDependencies
protected List<Map<String,Object>> getProjectDependencies(List<org.apache.maven.continuum.model.project.ProjectDependency> dependencies)
getProjectNotifiers
protected List<Map<String,Object>> getProjectNotifiers(List<org.apache.maven.continuum.model.project.ProjectNotifier> notifiers)
isBuilding
public boolean isBuilding(org.apache.maven.continuum.model.project.Project project)
- Specified by:
isBuilding
in interface ContinuumAgentBuildExecutor
killProcess
public void killProcess(org.apache.maven.continuum.model.project.Project project)
- Specified by:
killProcess
in interface ContinuumAgentBuildExecutor
getDeployableArtifacts
public List<org.apache.maven.artifact.Artifact> getDeployableArtifacts(org.apache.maven.continuum.model.project.Project project,
File workingDirectory,
org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
throws ContinuumAgentBuildExecutorException
- Specified by:
getDeployableArtifacts
in interface ContinuumAgentBuildExecutor
- Throws:
ContinuumAgentBuildExecutorException
getMavenProject
public org.apache.maven.project.MavenProject getMavenProject(File workingDirectory,
org.apache.maven.continuum.model.project.BuildDefinition buildDefinition)
throws ContinuumAgentBuildExecutorException
- Specified by:
getMavenProject
in interface ContinuumAgentBuildExecutor
- Throws:
ContinuumAgentBuildExecutorException
getWorkingDirectory
public File getWorkingDirectory(int projectId)
isResolveExecutable
public boolean isResolveExecutable()
setResolveExecutable
public void setResolveExecutable(boolean resolveExecutable)
setExecutableResolver
public void setExecutableResolver(org.codehaus.plexus.commandline.ExecutableResolver executableResolver)
getExecutableResolver
public org.codehaus.plexus.commandline.ExecutableResolver getExecutableResolver()
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.