com.codemesh.terp.ant
Class TerpExec
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.codemesh.terp.ant.TerpAwareTask
com.codemesh.terp.ant.TerpExec
- All Implemented Interfaces:
- TerpAware, TerpContextHolder, java.lang.Cloneable
public class TerpExec
- extends TerpAwareTask
A terp executor that does not inherit from the ANT <exec> task.
| Fields inherited from class org.apache.tools.ant.Task |
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
| Methods inherited from class org.apache.tools.ant.Task |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
clone, getDescription, getLocation, getProject, setDescription, setLocation |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expression
protected java.lang.String expression
result
protected java.lang.String result
failOnError
protected boolean failOnError
showErr
protected boolean showErr
TerpExec
public TerpExec()
TerpExec
public TerpExec(org.apache.tools.ant.Project p)
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Overrides:
execute in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
getExpression
public java.lang.String getExpression()
setExpression
public void setExpression(java.lang.String expression)
getResult
public java.lang.String getResult()
setResult
public void setResult(java.lang.String result)
- Specify the name of a variable storing an instance of type
ProcesExecutor.Result
for the executed process.
This instance provides access to stdout, stderr, and exitcode of the executed process.
- Parameters:
result - a variable name that can be used in subsequent tasks.
isFailOnError
public boolean isFailOnError()
setFailOnError
public void setFailOnError(boolean failOnError)
- Specify whether to fail the task if the process invocation returns anything but 0
or throws an exception.
- Parameters:
failOnError - true to fail on error, false to continue.
getShowErr
public boolean getShowErr()
setShowErr
public void setShowErr(boolean showErr)
- Specifies whether the invoked process' stderr output should be logged or not.
Irrespective of the state of this flag, the task can store all outputs from
the process invocation in a result variable of type
ProcessExecutor.Result
whose name is provided via the setResult(String) method.
- Parameters:
showErr - true to log the error output, false to swallow it.
Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.