org.codehaus.groovy.grails.cli
Class GrailsScriptRunner

java.lang.Object
  extended by org.codehaus.groovy.grails.cli.GrailsScriptRunner

public class GrailsScriptRunner
extends java.lang.Object

Handles Grails command line interface for running scripts.

Since:
0.4

Field Summary
static groovy.lang.Closure DO_NOTHING_CLOSURE
           
 
Constructor Summary
GrailsScriptRunner()
           
GrailsScriptRunner(grails.util.BuildSettings settings)
           
GrailsScriptRunner(java.lang.String grailsHome)
           
 
Method Summary
 int executeCommand(java.lang.String scriptName, java.lang.String args)
           
 int executeCommand(java.lang.String scriptName, java.lang.String args, java.lang.String env)
           
 int executeScriptWithCaching(CommandLine commandLine)
           
 java.util.List<java.io.File> getAvailableScripts()
          Returns a list of all the executable Gant scripts available to this application.
static CommandLineParser getCommandLineParser()
           
 java.io.PrintStream getOut()
           
protected  void initializeLogging()
           
 void initializeState()
           
static void main(java.lang.String[] args)
          Evaluate the arguments to get the name of the script to execute, which environment to run it in, and the arguments to pass to the script.
 void setInteractive(boolean interactive)
           
 void setOut(java.io.PrintStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO_NOTHING_CLOSURE

public static final groovy.lang.Closure DO_NOTHING_CLOSURE
Constructor Detail

GrailsScriptRunner

public GrailsScriptRunner()

GrailsScriptRunner

public GrailsScriptRunner(java.lang.String grailsHome)

GrailsScriptRunner

public GrailsScriptRunner(grails.util.BuildSettings settings)
Method Detail

setInteractive

public void setInteractive(boolean interactive)

main

public static void main(java.lang.String[] args)
Evaluate the arguments to get the name of the script to execute, which environment to run it in, and the arguments to pass to the script. This also evaluates arguments of the form "-Dprop=value" and creates system properties from each one.

Parameters:
args - Command line arguments

getCommandLineParser

public static CommandLineParser getCommandLineParser()

getOut

public java.io.PrintStream getOut()

setOut

public void setOut(java.io.PrintStream outputStream)

executeCommand

public int executeCommand(java.lang.String scriptName,
                          java.lang.String args)

executeCommand

public int executeCommand(java.lang.String scriptName,
                          java.lang.String args,
                          java.lang.String env)

executeScriptWithCaching

public int executeScriptWithCaching(CommandLine commandLine)

initializeState

public void initializeState()

initializeLogging

protected void initializeLogging()

getAvailableScripts

public java.util.List<java.io.File> getAvailableScripts()
Returns a list of all the executable Gant scripts available to this application.