This service is useful for exploring, manipulating and executing an ant build script in its native object structure. Ant is maintained by the Jakarta project at apache.org.
The startTarget methods return a java.lang.Thread that contains the executing target. If the target needs to be stopped, call Thread.interrupt() and the thread will stop at a safe point. Copyright (c) 2002 BEA Systems, Inc.
Related Topics
AntSvc
Method Summary |
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public void |
|
public boolean |
|
Method Detail |
publicReturns an org.apache.tools.ant.Project for the given URI. The URI must point to a valid ant build.xml file, though the file can have any name.Project
getProject(URI
antURI)
publicReturns an org.apache.tools.ant.Project for the given Reader. The Reader must point to a valid ant xml stream. This method should only be used when the encoding of the Reader matches the declared encoding header in the xml. The default encoding is "UTF-8", so if in doubt, and the URI of the xml content is not known, create an InputStreamReader with UTF-8 as the encoding choice.Project
getProject(Reader
antIn)
publicReturns an org.apache.tools.ant.Project for the given String. The String must contain valid ant xml content.Project
getProject(String
antScript)
publicSame as getProject(URI), with the added parameter of an AntProjectConfigurator. This method is not normally used. See AntProjectConfigurator for details.Project
getProject(URI
antURI,AntSvc.AntProjectConfigurator
conf)
Related Topics
AntSvc.AntProjectConfigurator
AntSvc.I.getProject(URI)
publicSame as getProject(Reader), with the added parameter of an AntProjectConfigurator. This method is not normally used. See AntProjectConfigurator for details.Project
getProject(Reader
antIn,AntSvc.AntProjectConfigurator
conf)
Related Topics
AntSvc.AntProjectConfigurator
AntSvc.I.getProject(Reader)
publicSame as getProject(String), with the added parameter of an AntProjectConfigurator. This method is not normally used. See AntProjectConfigurator for details.Project
getProject(String
antScript,AntSvc.AntProjectConfigurator
conf)
Related Topics
AntSvc.AntProjectConfigurator
AntSvc.I.getProject(String)
publicReturns a target key for a given Ant Project and target name. This key is need for executing the StopAntAction action or for calling stopTarget.AntSvc.AntTargetKey
getTargetKey(Project
project,String
targetName)
Related Topics
StopAntAction
AntSvc.I.stopTarget(AntSvc.AntTargetKey)
publicBegins the execution of the specified ant target. Execution is in a separate Thread. Output will be sent to the Ant output window. All dependent targets will be executed before the target itelf.AntSvc.AntTargetKey
startTarget(Project
project,String
target)
publicSame as startTarget, except the output gets sent to the specified IOutputWindow.AntSvc.AntTargetKey
startTarget(Project
project,String
target,OutputSvc.IOutputWindow
window)
Related Topics
AntSvc.I.startTarget(Project, String)
OutputSvc.IOutputWindow
publicBegins the execution of an ant target in the given project, with output going to the out and err PrintStreams specified. Execution is in a separate Thread. All dependent targets will be executed before the target itself.AntSvc.AntTargetKey
startTarget(Project
project,String
target,PrintStream
out,PrintStream
err)
public void stopTarget(AntSvc.AntTargetKey
targetKey)
Stops the running target identified by the targetKey. This call blocks until
the target is stopped successfully. The targetKey can be obtained by calling
getTargetKey().
Related Topics
AntSvc.I.getTargetKey(Project, String)
public boolean waitForCompletion(AntSvc.AntTargetKey
targetKey)
Once a target has been started with startTarget, this call can be used to
wait for it to finish. The return value signifies if it was interrupted.