|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.module.api.AntTargetExecutor
public final class AntTargetExecutor
Executes an Ant target or list of targets asynchronously inside NetBeans.
Nested Class Summary | |
---|---|
static class |
AntTargetExecutor.Env
Class describing the environment in which the Ant target will be executed. |
Method Summary | |
---|---|
static AntTargetExecutor |
createTargetExecutor(AntTargetExecutor.Env env)
Factory method for creation of AntTargetExecutor with the given environment. |
ExecutorTask |
execute(AntProjectCookie antProject,
String[] targets)
Execute given target(s). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AntTargetExecutor createTargetExecutor(AntTargetExecutor.Env env)
env
- a configuration for the executor
public ExecutorTask execute(AntProjectCookie antProject, String[] targets) throws IOException
The AntProjectCookie.getFile()
must not be null, since Ant can only
run files present on disk.
The returned task may be used to wait for completion of the script and check result status.
The easiest way to get the project cookie is to get a DataObject
representing an Ant build script and to ask it for this cookie. Alternatively,
you may implement the cookie interface directly, where
getFile
is critical and other methods may do nothing
(returning null
as needed).
While the specification for AntProjectCookie
says that
getDocument
and getParseException
cannot
both return null
simultaneously, the current
executor implementation does not care; to be safe, return an
UnsupportedOperationException
from getParseException
.
antProject
- a representation of the project to runtargets
- non-empty list of target names to run; may be null to indicate default target
IOException
- if there is a problem running the script
|
org.apache.tools.ant.module/3 3.27.0 2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |