org.apache.ant.dotnet
Class DotNetExecTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.ExecTask
org.apache.ant.dotnet.DotNetExecTask
- All Implemented Interfaces:
- java.lang.Cloneable
public class DotNetExecTask
- extends org.apache.tools.ant.taskdefs.ExecTask
Specialized that knows how to deal with Mono vs. Microsoft's
VM - and maybe Rotor at some point.
Fields inherited from class org.apache.tools.ant.taskdefs.ExecTask |
cmdl, failOnError, newEnvironment, redirector, redirectorElement |
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 |
Method Summary |
void |
execute()
Do the work. |
static DotNetExecTask |
getTask(org.apache.tools.ant.Task t,
java.lang.String vm,
java.lang.String executable,
org.apache.tools.ant.types.Environment env)
Creates an instance of this task based on a different tasks settings. |
void |
internalSetErrorProperty(java.lang.String name)
Sets the name of the property to set if execution fails. |
protected static boolean |
isMono(java.lang.String vm)
Whether the given vm looks like the Mono executable. |
protected void |
maybeSetResultPropertyValue(int result)
Overridden to support the error-property handling required by
NUnit, NAnt and friends. |
void |
setExecutable(java.lang.String value)
Set the name of the executable program. |
protected void |
setupCommandline()
If the inherited Commandline doesn't know about the executable
yet, set it and deal with the vm attribute. |
void |
setVm(java.lang.String value)
Set the name of the executable for the virtual machine or the
magic name "microsoft" which implies that we can invoke the
executable directly. |
Methods inherited from class org.apache.tools.ant.taskdefs.ExecTask |
addConfiguredRedirector, addEnv, checkConfiguration, createArg, createHandler, createWatchdog, getOs, getOsFamily, getResolveExecutable, isValidOs, logFlush, prepareExec, resolveExecutable, runExec, runExecute, setAppend, setCommand, setDir, setError, setErrorProperty, setFailIfExecutionFails, setFailonerror, setInput, setInputString, setLogError, setNewenvironment, setOs, setOsFamily, setOutput, setOutputproperty, setResolveExecutable, setResultProperty, setSearchPath, setSpawn, setTimeout, setTimeout, setupRedirector, setVMLauncher |
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, setProject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DotNetExecTask
public DotNetExecTask()
- Empty Constructor.
setExecutable
public void setExecutable(java.lang.String value)
- Set the name of the executable program.
- Overrides:
setExecutable
in class org.apache.tools.ant.taskdefs.ExecTask
- Parameters:
value
- the name of the executable program
setVm
public void setVm(java.lang.String value)
- Set the name of the executable for the virtual machine or the
magic name "microsoft" which implies that we can invoke the
executable directly.
- Parameters:
value
- the name of the executable for the virtual machine
internalSetErrorProperty
public void internalSetErrorProperty(java.lang.String name)
- Sets the name of the property to set if execution fails.
Not exposed as an attribute of the task, it just supports
tasks like <nunit> which delegate to instances of this
class.
- Since:
- 1.0 Beta 2
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Do the work.
- Overrides:
execute
in class org.apache.tools.ant.taskdefs.ExecTask
- Throws:
org.apache.tools.ant.BuildException
- if executable is empty or <exec>
throws an exception.
maybeSetResultPropertyValue
protected void maybeSetResultPropertyValue(int result)
- Overridden to support the error-property handling required by
NUnit, NAnt and friends.
- Overrides:
maybeSetResultPropertyValue
in class org.apache.tools.ant.taskdefs.ExecTask
- Since:
- 1.0 Beta 2
setupCommandline
protected void setupCommandline()
- If the inherited Commandline doesn't know about the executable
yet, set it and deal with the vm attribute.
The inherited Commandline may know the executable already if
this task instance is getting reused.
isMono
protected static final boolean isMono(java.lang.String vm)
- Whether the given vm looks like the Mono executable.
getTask
public static DotNetExecTask getTask(org.apache.tools.ant.Task t,
java.lang.String vm,
java.lang.String executable,
org.apache.tools.ant.types.Environment env)
- Creates an instance of this task based on a different tasks settings.