net.sourceforge.cruisecontrol.builders
Class MavenScript

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

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

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

Author:
Eric Pugh

Constructor Summary
MavenScript()
           
 
Method Summary
 Commandline buildCommandline()
          construct the command that we're going to execute.
 void consumeLine(java.lang.String line)
          Ugly parsing of Maven output into some Elements.
protected  void flushCurrentElement()
           
 int getExitCode()
           
 void setBuildLogElement(org.jdom.Element buildLogElement)
           
 void setBuildProperties(java.util.Map buildProperties)
           
 void setExitCode(int exitCode)
          exitCode is what is returned from running the script
 void setGoalset(java.lang.String goalset)
           
 void setMavenScript(java.lang.String mavenScript)
           
 void setProjectFile(java.lang.String projectFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenScript

public MavenScript()
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

consumeLine

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

Specified by:
consumeLine in interface StreamConsumer

flushCurrentElement

protected void flushCurrentElement()

setBuildProperties

public void setBuildProperties(java.util.Map buildProperties)
Parameters:
buildProperties - The buildProperties to set.

setGoalset

public void setGoalset(java.lang.String goalset)
Parameters:
goalset - The goalset to set.

setMavenScript

public void setMavenScript(java.lang.String mavenScript)
Parameters:
mavenScript - The mavenScript to set.

setProjectFile

public void setProjectFile(java.lang.String projectFile)
Parameters:
projectFile - The projectFile 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.

setBuildLogElement

public void setBuildLogElement(org.jdom.Element buildLogElement)
Parameters:
buildLogElement - The buildLogElement to set.