net.sourceforge.cruisecontrol.builders
Class RakeScript

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.builders.RakeScript
All Implemented Interfaces:
Script, StreamConsumer

public class RakeScript
extends java.lang.Object
implements Script, StreamConsumer

Rake script class. Contains all the details related to running a Rake based build.

Author:
Kirk Knoernschild

Constructor Summary
RakeScript()
           
 
Method Summary
 Commandline buildCommandline()
          construct the command that we're going to execute.
 void consumeLine(java.lang.String line)
          Ugly parsing of Rake output into some Elements.
 int getExitCode()
           
 void setArgs(java.lang.String args)
           
 void setBuildFile(java.lang.String buildFile)
           
 void setBuildLogHeader(org.jdom.Element buildLogElement)
          set the "header" for this part of the build log.
 void setExitCode(int exitCode)
          exitCode is what is returned from running the script
 void setTarget(java.lang.String target)
           
 void setWindows(boolean isWindows)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RakeScript

public RakeScript()
Method Detail

buildCommandline

public Commandline buildCommandline()
                             throws CruiseControlException
construct the command that we're going to execute.

Specified by:
buildCommandline in interface Script
Returns:
Commandline holding command to be executed
Throws:
CruiseControlException - on unquotable attributes

setBuildLogHeader

public void setBuildLogHeader(org.jdom.Element buildLogElement)
set the "header" for this part of the build log.

Parameters:
buildLogElement - the element of the build log
Returns:
updated element

setArgs

public void setArgs(java.lang.String args)
Parameters:
args - The args to set.

setWindows

public void setWindows(boolean isWindows)
Parameters:
isWindows - The isWindows to set.

setBuildFile

public void setBuildFile(java.lang.String buildFile)
Parameters:
buildFile - The buildFile to set.

setTarget

public void setTarget(java.lang.String target)
Parameters:
target - The target to set.

getExitCode

public int getExitCode()
Specified by:
getExitCode in interface Script
Returns:
Returns the exitCode.

setExitCode

public void setExitCode(int exitCode)
Description copied from interface: Script
exitCode is what is returned from running the script

Specified by:
setExitCode in interface Script
Parameters:
exitCode - The exitCode to set.

consumeLine

public void consumeLine(java.lang.String line)
Ugly parsing of Rake output into some Elements. Gets called from StreamPumper.

Specified by:
consumeLine in interface StreamConsumer