Class Project
- java.lang.Object
- 
- org.apache.tools.ant.Project
 
- 
- All Implemented Interfaces:
- ResourceFactory
 
 public class Project extends java.lang.Object implements ResourceFactory Central representation of an Ant project. This class defines an Ant project with all of its targets, tasks and various other properties. It also provides the mechanism to kick off a build using a particular target name.This class also encapsulates methods which allow files to be referred to using abstract path names which are translated to native system file paths at runtime. 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringJAVA_1_0Deprecated.since 1.5.x.static java.lang.StringJAVA_1_1Deprecated.since 1.5.x.static java.lang.StringJAVA_1_2Deprecated.since 1.5.x.static java.lang.StringJAVA_1_3Deprecated.since 1.5.x.static java.lang.StringJAVA_1_4Deprecated.since 1.5.x.static intMSG_DEBUGMessage priority of "debug".static intMSG_ERRMessage priority of "error".static intMSG_INFOMessage priority of "information".static intMSG_VERBOSEMessage priority of "verbose".static intMSG_WARNMessage priority of "warning".static java.lang.StringTOKEN_ENDDefault filter end token.static java.lang.StringTOKEN_STARTDefault filter start token.
 - 
Constructor SummaryConstructors Constructor Description Project()Create a new Ant project.
 - 
Method SummaryModifier and Type Method Description voidaddBuildListener(BuildListener listener)Add a build listener to the list.voidaddDataTypeDefinition(java.lang.String typeName, java.lang.Class<?> typeClass)Add a new datatype definition.voidaddFilter(java.lang.String token, java.lang.String value)Deprecated.since 1.4.x.voidaddIdReference(java.lang.String id, java.lang.Object value)Add an id reference.voidaddOrReplaceTarget(java.lang.String targetName, Target target)Add a target to the project, or replaces one with the same name.voidaddOrReplaceTarget(Target target)Add a target to the project, or replaces one with the same name.voidaddReference(java.lang.String referenceName, java.lang.Object value)Add a reference to the project.voidaddTarget(java.lang.String targetName, Target target)Add a new target to the project.voidaddTarget(Target target)Add a new target to the project.voidaddTaskDefinition(java.lang.String taskName, java.lang.Class<?> taskClass)Add a new task definition to the project.voidcheckTaskClass(java.lang.Class<?> taskClass)Check whether or not a class is suitable for serving as Ant task.voidcopyFile(java.io.File sourceFile, java.io.File destFile)Deprecated.since 1.4.xvoidcopyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering)Deprecated.since 1.4.xvoidcopyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering, boolean overwrite)Deprecated.since 1.4.xvoidcopyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified)Deprecated.since 1.4.xvoidcopyFile(java.lang.String sourceFile, java.lang.String destFile)Deprecated.since 1.4.xvoidcopyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering)Deprecated.since 1.4.xvoidcopyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering, boolean overwrite)Deprecated.since 1.4.xvoidcopyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering, boolean overwrite, boolean preserveLastModified)Deprecated.since 1.4.xvoidcopyInheritedProperties(Project other)Copy all user properties that have not been set on the command line or a GUI tool from this instance to the Project instance given as the argument.voidcopyUserProperties(Project other)Copy all user properties that have been set on the command line or a GUI tool from this instance to the Project instance given as the argument.AntClassLoadercreateClassLoader(java.lang.ClassLoader parent, Path path)Factory method to create a class loader for loading classes from a given path.AntClassLoadercreateClassLoader(Path path)Factory method to create a class loader for loading classes from a given path.java.lang.ObjectcreateDataType(java.lang.String typeName)Create a new instance of a data type.ProjectcreateSubProject()Create and initialize a subproject.TaskcreateTask(java.lang.String taskType)Create a new instance of a task, adding it to a list of created tasks for later invalidation.intdefaultInput(byte[] buffer, int offset, int length)Read data from the default input stream.voiddemuxFlush(java.lang.String output, boolean isError)Demultiplex flush operations so that each task receives the appropriate messages.intdemuxInput(byte[] buffer, int offset, int length)Demux an input request to the correct task.voiddemuxOutput(java.lang.String output, boolean isWarning)Demultiplex output so that each task receives the appropriate messages.voidexecuteSortedTargets(java.util.Vector<Target> sortedTargets)Execute aVectorof sorted targets.voidexecuteTarget(java.lang.String targetName)Execute the specified target and any targets it depends on.voidexecuteTargets(java.util.Vector<java.lang.String> names)Execute the specified sequence of targets, and the targets they depend on.voidfireBuildFinished(java.lang.Throwable exception)Send a "build finished" event to the build listeners for this project.voidfireBuildStarted()Send a "build started" event to the build listeners for this project.protected voidfireMessageLogged(Project project, java.lang.String message, int priority)Send a "message logged" project level event to the build listeners for this project.protected voidfireMessageLogged(Project project, java.lang.String message, java.lang.Throwable throwable, int priority)Send a "message logged" project level event to the build listeners for this project.protected voidfireMessageLogged(Target target, java.lang.String message, int priority)Send a "message logged" target level event to the build listeners for this project.protected voidfireMessageLogged(Target target, java.lang.String message, java.lang.Throwable throwable, int priority)Send a "message logged" target level event to the build listeners for this project.protected voidfireMessageLogged(Task task, java.lang.String message, int priority)Send a "message logged" task level event to the build listeners for this project.protected voidfireMessageLogged(Task task, java.lang.String message, java.lang.Throwable throwable, int priority)Send a "message logged" task level event to the build listeners for this project.voidfireSubBuildFinished(java.lang.Throwable exception)Send a "subbuild finished" event to the build listeners for this project.voidfireSubBuildStarted()Send a "subbuild started" event to the build listeners for this project.protected voidfireTargetFinished(Target target, java.lang.Throwable exception)Send a "target finished" event to the build listeners for this project.protected voidfireTargetStarted(Target target)Send a "target started" event to the build listeners for this project.protected voidfireTaskFinished(Task task, java.lang.Throwable exception)Send a "task finished" event to the build listeners for this project.protected voidfireTaskStarted(Task task)Send a "task started" event to the build listeners for this project.java.io.FilegetBaseDir()Return the base directory of the project as a file object.java.util.Vector<BuildListener>getBuildListeners()Return a copy of the list of build listeners for the project.java.util.Map<java.lang.String,java.lang.Class<?>>getCopyOfDataTypeDefinitions()Return the current datatype definition map.java.util.Map<java.lang.String,java.lang.Object>getCopyOfReferences()Return a map of the references in the project (String to Object).java.util.Map<java.lang.String,Target>getCopyOfTargets()Return the map of targets.java.util.Map<java.lang.String,java.lang.Class<?>>getCopyOfTaskDefinitions()Return the current task definition map.java.lang.ClassLoadergetCoreLoader()Return the core classloader to use for this project.java.util.Hashtable<java.lang.String,java.lang.Class<?>>getDataTypeDefinitions()Return the current datatype definition hashtable.java.io.InputStreamgetDefaultInputStream()Get this project's input stream.java.lang.StringgetDefaultTarget()Return the name of the default target of the project.java.lang.StringgetDescription()Return the project description, if one has been set.java.lang.StringgetElementName(java.lang.Object element)Return a description of the type of the given element, with special handling for instances of tasks and data types.ExecutorgetExecutor()Get this Project's Executor (setting it if necessary).java.util.Hashtable<java.lang.String,java.lang.String>getFilters()Deprecated.since 1.4.x Use getGlobalFilterSet().getFilterHash().FilterSetgetGlobalFilterSet()Return the set of global filters.java.util.Hashtable<java.lang.String,java.lang.Object>getInheritedProperties()Return a copy of the inherited property hashtable.InputHandlergetInputHandler()Retrieve the current input handler.static java.lang.StringgetJavaVersion()Deprecated.since 1.5.x.java.lang.StringgetName()Return the project name, if one has been set.static ProjectgetProject(java.lang.Object o)Get the Project instance associated with the specified object.java.util.Hashtable<java.lang.String,java.lang.Object>getProperties()Return a copy of the properties table.java.lang.StringgetProperty(java.lang.String propertyName)Return the value of a property, if it is set.<T> TgetReference(java.lang.String key)Look up a reference by its key (ID).java.util.Hashtable<java.lang.String,java.lang.Object>getReferences()Return a map of the references in the project (String to Object).ResourcegetResource(java.lang.String name)Resolve the file relative to the project's basedir and return it as a FileResource.java.util.Hashtable<java.lang.String,Target>getTargets()Return the hashtable of targets.java.util.Hashtable<java.lang.String,java.lang.Class<?>>getTaskDefinitions()Return the current task definition hashtable.TaskgetThreadTask(java.lang.Thread thread)Get the current task associated with a thread, if any.java.util.Hashtable<java.lang.String,java.lang.Object>getUserProperties()Return a copy of the user property hashtable.java.lang.StringgetUserProperty(java.lang.String propertyName)Return the value of a user property, if it is set.booleanhasReference(java.lang.String key)Does the project know this reference?voidinheritIDReferences(Project parent)Inherit the id references.voidinit()Initialise the project.voidinitProperties()Initializes the properties.voidinitSubProject(Project subProject)Initialize a subproject.booleanisKeepGoingMode()Return the keep-going mode.voidlog(java.lang.String message)Write a message to the log with the default log level of MSG_INFO .voidlog(java.lang.String message, int msgLevel)Write a project level message to the log with the given log level.voidlog(java.lang.String message, java.lang.Throwable throwable, int msgLevel)Write a project level message to the log with the given log level.voidlog(Target target, java.lang.String message, int msgLevel)Write a target level message to the log with the given log level.voidlog(Target target, java.lang.String message, java.lang.Throwable throwable, int msgLevel)Write a target level message to the log with the given log level.voidlog(Task task, java.lang.String message, int msgLevel)Write a task level message to the log with the given log level.voidlog(Task task, java.lang.String message, java.lang.Throwable throwable, int msgLevel)Write a task level message to the log with the given log level.voidregisterThreadTask(java.lang.Thread thread, Task task)Register a task as the current task for a thread.voidremoveBuildListener(BuildListener listener)Remove a build listener from the list.java.lang.StringreplaceProperties(java.lang.String value)Replace ${} style constructions in the given value with the string value of the corresponding data types.java.io.FileresolveFile(java.lang.String fileName)Return the canonical form of a filename.java.io.FileresolveFile(java.lang.String fileName, java.io.File rootDir)Deprecated.since 1.4.xvoidsetBasedir(java.lang.String baseD)Set the base directory for the project, checking that the given filename exists and is a directory.voidsetBaseDir(java.io.File baseDir)Set the base directory for the project, checking that the given file exists and is a directory.voidsetCoreLoader(java.lang.ClassLoader coreLoader)Set the core classloader for the project.voidsetDefault(java.lang.String defaultTarget)Set the default target of the project.voidsetDefaultInputStream(java.io.InputStream defaultInputStream)Set the default System input stream.voidsetDefaultTarget(java.lang.String defaultTarget)Deprecated.since 1.5.x.voidsetDescription(java.lang.String description)Set the project description.voidsetExecutor(Executor e)Set the Executor instance for this Project.voidsetFileLastModified(java.io.File file, long time)Deprecated.since 1.4.xvoidsetInheritedProperty(java.lang.String name, java.lang.String value)Set a user property, which cannot be overwritten by set/unset property calls.voidsetInputHandler(InputHandler handler)Set the input handler.voidsetJavaVersionProperty()Set theant.java.versionproperty and tests for unsupported JVM versions.voidsetKeepGoingMode(boolean keepGoingMode)Set "keep-going" mode.voidsetName(java.lang.String name)Set the name of the project, also setting the user propertyant.project.name.voidsetNewProperty(java.lang.String name, java.lang.String value)Set a property if no value currently exists.voidsetProjectReference(java.lang.Object obj)Set a reference to this Project on the parameterized object.voidsetProperty(java.lang.String name, java.lang.String value)Set a property.voidsetSystemProperties()Add all system properties which aren't already defined as user properties to the project properties.voidsetUserProperty(java.lang.String name, java.lang.String value)Set a user property, which cannot be overwritten by set/unset property calls.static booleantoBoolean(java.lang.String s)Return the boolean equivalent of a string, which is consideredtrueif either"on","true", or"yes"is found, ignoring case.java.util.Vector<Target>topoSort(java.lang.String[] roots, java.util.Hashtable<java.lang.String,Target> targetTable, boolean returnAll)Topologically sort a set of targets.java.util.Vector<Target>topoSort(java.lang.String root, java.util.Hashtable<java.lang.String,Target> targetTable)Topologically sort a set of targets.java.util.Vector<Target>topoSort(java.lang.String root, java.util.Hashtable<java.lang.String,Target> targetTable, boolean returnAll)Topologically sort a set of targets.static java.lang.StringtranslatePath(java.lang.String toProcess)Deprecated.since 1.7 Use FileUtils.translatePath instead.
 
- 
- 
- 
Field Detail- 
MSG_ERRpublic static final int MSG_ERR Message priority of "error".- See Also:
- Constant Field Values
 
 - 
MSG_WARNpublic static final int MSG_WARN Message priority of "warning".- See Also:
- Constant Field Values
 
 - 
MSG_INFOpublic static final int MSG_INFO Message priority of "information".- See Also:
- Constant Field Values
 
 - 
MSG_VERBOSEpublic static final int MSG_VERBOSE Message priority of "verbose".- See Also:
- Constant Field Values
 
 - 
MSG_DEBUGpublic static final int MSG_DEBUG Message priority of "debug".- See Also:
- Constant Field Values
 
 - 
JAVA_1_0@Deprecated public static final java.lang.String JAVA_1_0 Deprecated.since 1.5.x. UseJavaEnvUtils.JAVA_1_0instead.Version constant for Java 1.0 .- See Also:
- Constant Field Values
 
 - 
JAVA_1_1@Deprecated public static final java.lang.String JAVA_1_1 Deprecated.since 1.5.x. UseJavaEnvUtils.JAVA_1_1instead.Version constant for Java 1.1 .- See Also:
- Constant Field Values
 
 - 
JAVA_1_2@Deprecated public static final java.lang.String JAVA_1_2 Deprecated.since 1.5.x. UseJavaEnvUtils.JAVA_1_2instead.Version constant for Java 1.2 .- See Also:
- Constant Field Values
 
 - 
JAVA_1_3@Deprecated public static final java.lang.String JAVA_1_3 Deprecated.since 1.5.x. UseJavaEnvUtils.JAVA_1_3instead.Version constant for Java 1.3 .- See Also:
- Constant Field Values
 
 - 
JAVA_1_4@Deprecated public static final java.lang.String JAVA_1_4 Deprecated.since 1.5.x. UseJavaEnvUtils.JAVA_1_4instead.Version constant for Java 1.4 .- See Also:
- Constant Field Values
 
 - 
TOKEN_STARTpublic static final java.lang.String TOKEN_START Default filter start token.- See Also:
- Constant Field Values
 
 - 
TOKEN_ENDpublic static final java.lang.String TOKEN_END Default filter end token.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setInputHandlerpublic void setInputHandler(InputHandler handler) Set the input handler.- Parameters:
- handler- the InputHandler instance to use for gathering input.
 
 - 
setDefaultInputStreampublic void setDefaultInputStream(java.io.InputStream defaultInputStream) Set the default System input stream. Normally this stream is set to System.in. This inputStream is used when no task input redirection is being performed.- Parameters:
- defaultInputStream- the default input stream to use when input is requested.
- Since:
- Ant 1.6
 
 - 
getDefaultInputStreampublic java.io.InputStream getDefaultInputStream() Get this project's input stream.- Returns:
- the InputStream instance in use by this Project instance to read input.
 
 - 
getInputHandlerpublic InputHandler getInputHandler() Retrieve the current input handler.- Returns:
- the InputHandler instance currently in place for the project instance.
 
 - 
createSubProjectpublic Project createSubProject() Create and initialize a subproject. By default the subproject will be of the same type as its parent. If a no-arg constructor is unavailable, theProjectclass will be used.- Returns:
- a Project instance configured as a subproject of this Project.
- Since:
- Ant 1.7
 
 - 
initSubProjectpublic void initSubProject(Project subProject) Initialize a subproject.- Parameters:
- subProject- the subproject to initialize.
 
 - 
initpublic void init() throws BuildExceptionInitialise the project. This involves setting the default task definitions and loading the system properties.- Throws:
- BuildException- if the default task list cannot be loaded.
 
 - 
initPropertiespublic void initProperties() throws BuildExceptionInitializes the properties.- Throws:
- BuildException- if an vital property could not be set.
- Since:
- Ant 1.7
 
 - 
createClassLoaderpublic AntClassLoader createClassLoader(Path path) Factory method to create a class loader for loading classes from a given path.- Parameters:
- path- the path from which classes are to be loaded.
- Returns:
- an appropriate classloader.
 
 - 
createClassLoaderpublic AntClassLoader createClassLoader(java.lang.ClassLoader parent, Path path) Factory method to create a class loader for loading classes from a given path.- Parameters:
- parent- the parent classloader for the new loader.
- path- the path from which classes are to be loaded.
- Returns:
- an appropriate classloader.
 
 - 
setCoreLoaderpublic void setCoreLoader(java.lang.ClassLoader coreLoader) Set the core classloader for the project. If anullclassloader is specified, the parent classloader should be used.- Parameters:
- coreLoader- The classloader to use for the project. May be- null.
 
 - 
getCoreLoaderpublic java.lang.ClassLoader getCoreLoader() Return the core classloader to use for this project. This may benull, indicating that the parent classloader should be used.- Returns:
- the core classloader to use for this project.
 
 - 
addBuildListenerpublic void addBuildListener(BuildListener listener) Add a build listener to the list. This listener will be notified of build events for this project.- Parameters:
- listener- The listener to add to the list. Must not be- null.
 
 - 
removeBuildListenerpublic void removeBuildListener(BuildListener listener) Remove a build listener from the list. This listener will no longer be notified of build events for this project.- Parameters:
- listener- The listener to remove from the list. Should not be- null.
 
 - 
getBuildListenerspublic java.util.Vector<BuildListener> getBuildListeners() Return a copy of the list of build listeners for the project.- Returns:
- a list of build listeners for the project
 
 - 
logpublic void log(java.lang.String message) Write a message to the log with the default log level of MSG_INFO .- Parameters:
- message- The text to log. Should not be- null.
 
 - 
logpublic void log(java.lang.String message, int msgLevel)Write a project level message to the log with the given log level.- Parameters:
- message- The text to log. Should not be- null.
- msgLevel- The log priority level to use.
 
 - 
logpublic void log(java.lang.String message, java.lang.Throwable throwable, int msgLevel)Write a project level message to the log with the given log level.- Parameters:
- message- The text to log. Should not be- null.
- throwable- The exception causing this log, may be- null.
- msgLevel- The log priority level to use.
- Since:
- 1.7
 
 - 
logpublic void log(Task task, java.lang.String message, int msgLevel) Write a task level message to the log with the given log level.- Parameters:
- task- The task to use in the log. Must not be- null.
- message- The text to log. Should not be- null.
- msgLevel- The log priority level to use.
 
 - 
logpublic void log(Task task, java.lang.String message, java.lang.Throwable throwable, int msgLevel) Write a task level message to the log with the given log level.- Parameters:
- task- The task to use in the log. Must not be- null.
- message- The text to log. Should not be- null.
- throwable- The exception causing this log, may be- null.
- msgLevel- The log priority level to use.
- Since:
- 1.7
 
 - 
logpublic void log(Target target, java.lang.String message, int msgLevel) Write a target level message to the log with the given log level.- Parameters:
- target- The target to use in the log. Must not be- null.
- message- The text to log. Should not be- null.
- msgLevel- The log priority level to use.
 
 - 
logpublic void log(Target target, java.lang.String message, java.lang.Throwable throwable, int msgLevel) Write a target level message to the log with the given log level.- Parameters:
- target- The target to use in the log. Must not be- null.
- message- The text to log. Should not be- null.
- throwable- The exception causing this log, may be- null.
- msgLevel- The log priority level to use.
- Since:
- 1.7
 
 - 
getGlobalFilterSetpublic FilterSet getGlobalFilterSet() Return the set of global filters.- Returns:
- the set of global filters.
 
 - 
setPropertypublic void setProperty(java.lang.String name, java.lang.String value)Set a property. Any existing property of the same name is overwritten, unless it is a user property.- Parameters:
- name- The name of property to set. Must not be- null.
- value- The new value of the property. Must not be- null.
 
 - 
setNewPropertypublic void setNewProperty(java.lang.String name, java.lang.String value)Set a property if no value currently exists. If the property exists already, a message is logged and the method returns with no other effect.- Parameters:
- name- The name of property to set. Must not be- null.
- value- The new value of the property. Must not be- null.
- Since:
- 1.5
 
 - 
setUserPropertypublic void setUserProperty(java.lang.String name, java.lang.String value)Set a user property, which cannot be overwritten by set/unset property calls. Any previous value is overwritten.- Parameters:
- name- The name of property to set. Must not be- null.
- value- The new value of the property. Must not be- null.
- See Also:
- setProperty(String,String)
 
 - 
setInheritedPropertypublic void setInheritedProperty(java.lang.String name, java.lang.String value)Set a user property, which cannot be overwritten by set/unset property calls. Any previous value is overwritten. Also marks these properties as properties that have not come from the command line.- Parameters:
- name- The name of property to set. Must not be- null.
- value- The new value of the property. Must not be- null.
- See Also:
- setProperty(String,String)
 
 - 
getPropertypublic java.lang.String getProperty(java.lang.String propertyName) Return the value of a property, if it is set.- Parameters:
- propertyName- The name of the property. May be- null, in which case the return value is also- null.
- Returns:
- the property value, or nullfor no match or if anullname is provided.
 
 - 
replacePropertiespublic java.lang.String replaceProperties(java.lang.String value) throws BuildExceptionReplace ${} style constructions in the given value with the string value of the corresponding data types.- Parameters:
- value- The string to be scanned for property references. May be- null.
- Returns:
- the given string with embedded property names replaced
         by values, or nullif the given string isnull.
- Throws:
- BuildException- if the given value has an unclosed property name, e.g.- ${xxx.
 
 - 
getUserPropertypublic java.lang.String getUserProperty(java.lang.String propertyName) Return the value of a user property, if it is set.- Parameters:
- propertyName- The name of the property. May be- null, in which case the return value is also- null.
- Returns:
- the property value, or nullfor no match or if anullname is provided.
 
 - 
getPropertiespublic java.util.Hashtable<java.lang.String,java.lang.Object> getProperties() Return a copy of the properties table.- Returns:
- a hashtable containing all properties (including user properties).
 
 - 
getUserPropertiespublic java.util.Hashtable<java.lang.String,java.lang.Object> getUserProperties() Return a copy of the user property hashtable.- Returns:
- a hashtable containing just the user properties.
 
 - 
getInheritedPropertiespublic java.util.Hashtable<java.lang.String,java.lang.Object> getInheritedProperties() Return a copy of the inherited property hashtable.- Returns:
- a hashtable containing just the inherited properties.
- Since:
- Ant 1.8.0
 
 - 
copyUserPropertiespublic void copyUserProperties(Project other) Copy all user properties that have been set on the command line or a GUI tool from this instance to the Project instance given as the argument.To copy all "user" properties, you will also have to call copyInheritedProperties.- Parameters:
- other- the project to copy the properties to. Must not be null.
- Since:
- Ant 1.5
 
 - 
copyInheritedPropertiespublic void copyInheritedProperties(Project other) Copy all user properties that have not been set on the command line or a GUI tool from this instance to the Project instance given as the argument.To copy all "user" properties, you will also have to call copyUserProperties.- Parameters:
- other- the project to copy the properties to. Must not be null.
- Since:
- Ant 1.5
 
 - 
setDefaultTarget@Deprecated public void setDefaultTarget(java.lang.String defaultTarget) Deprecated.since 1.5.x. Use setDefault.Set the default target of the project.- Parameters:
- defaultTarget- The name of the default target for this project. May be- null, indicating that there is no default target.
- See Also:
- setDefault(String)
 
 - 
getDefaultTargetpublic java.lang.String getDefaultTarget() Return the name of the default target of the project.- Returns:
- name of the default target or
         nullif no default has been set.
 
 - 
setDefaultpublic void setDefault(java.lang.String defaultTarget) Set the default target of the project.- Parameters:
- defaultTarget- The name of the default target for this project. May be- null, indicating that there is no default target.
 
 - 
setNamepublic void setName(java.lang.String name) Set the name of the project, also setting the user propertyant.project.name.- Parameters:
- name- The name of the project. Must not be- null.
 
 - 
getNamepublic java.lang.String getName() Return the project name, if one has been set.- Returns:
- the project name, or nullif it hasn't been set.
 
 - 
setDescriptionpublic void setDescription(java.lang.String description) Set the project description.- Parameters:
- description- The description of the project. May be- null.
 
 - 
getDescriptionpublic java.lang.String getDescription() Return the project description, if one has been set.- Returns:
- the project description, or nullif it hasn't been set.
 
 - 
addFilter@Deprecated public void addFilter(java.lang.String token, java.lang.String value)Deprecated.since 1.4.x. Use getGlobalFilterSet().addFilter(token,value)Add a filter to the set of global filters.- Parameters:
- token- The token to filter. Must not be- null.
- value- The replacement value. Must not be- null.
- See Also:
- getGlobalFilterSet(),- FilterSet.addFilter(String,String)
 
 - 
getFilters@Deprecated public java.util.Hashtable<java.lang.String,java.lang.String> getFilters() Deprecated.since 1.4.x Use getGlobalFilterSet().getFilterHash().Return a hashtable of global filters, mapping tokens to values.- Returns:
- a hashtable of global filters, mapping tokens to values (String to String).
- See Also:
- getGlobalFilterSet(),- FilterSet.getFilterHash()
 
 - 
setBasedirpublic void setBasedir(java.lang.String baseD) throws BuildExceptionSet the base directory for the project, checking that the given filename exists and is a directory.- Parameters:
- baseD- The project base directory. Must not be- null.
- Throws:
- BuildException- if the directory if invalid.
 
 - 
setBaseDirpublic void setBaseDir(java.io.File baseDir) throws BuildExceptionSet the base directory for the project, checking that the given file exists and is a directory.- Parameters:
- baseDir- The project base directory. Must not be- null.
- Throws:
- BuildException- if the specified file doesn't exist or isn't a directory.
 
 - 
getBaseDirpublic java.io.File getBaseDir() Return the base directory of the project as a file object.- Returns:
- the project base directory, or nullif the base directory has not been successfully set to a valid value.
 
 - 
setKeepGoingModepublic void setKeepGoingMode(boolean keepGoingMode) Set "keep-going" mode. In this mode Ant will try to execute as many targets as possible. All targets that do not depend on failed target(s) will be executed. If the keepGoing setter/getter methods are used in conjunction with theant.executor.classproperty, they will have no effect.- Parameters:
- keepGoingMode- "keep-going" mode
- Since:
- Ant 1.6
 
 - 
isKeepGoingModepublic boolean isKeepGoingMode() Return the keep-going mode. If the keepGoing setter/getter methods are used in conjunction with theant.executor.classproperty, they will have no effect.- Returns:
- "keep-going" mode
- Since:
- Ant 1.6
 
 - 
getJavaVersion@Deprecated public static java.lang.String getJavaVersion() Deprecated.since 1.5.x. Use org.apache.tools.ant.util.JavaEnvUtils instead.Return the version of Java this class is running under.- Returns:
- the version of Java as a String, e.g. "1.1" .
- See Also:
- JavaEnvUtils.getJavaVersion()
 
 - 
setJavaVersionPropertypublic void setJavaVersionProperty() throws BuildExceptionSet theant.java.versionproperty and tests for unsupported JVM versions. If the version is supported, verbose log messages are generated to record the Java version and operating system name.- Throws:
- BuildException- if this Java version is not supported.
- See Also:
- JavaEnvUtils.getJavaVersion()
 
 - 
setSystemPropertiespublic void setSystemProperties() Add all system properties which aren't already defined as user properties to the project properties.
 - 
addTaskDefinitionpublic void addTaskDefinition(java.lang.String taskName, java.lang.Class<?> taskClass) throws BuildExceptionAdd a new task definition to the project. Attempting to override an existing definition with an equivalent one (i.e. with the same classname) results in a verbose log message. Attempting to override an existing definition with a different one results in a warning log message and invalidates any tasks which have already been created with the old definition.- Parameters:
- taskName- The name of the task to add. Must not be- null.
- taskClass- The full name of the class implementing the task. Must not be- null.
- Throws:
- BuildException- if the class is unsuitable for being an Ant task. An error level message is logged before this exception is thrown.
- See Also:
- checkTaskClass(Class)
 
 - 
checkTaskClasspublic void checkTaskClass(java.lang.Class<?> taskClass) throws BuildExceptionCheck whether or not a class is suitable for serving as Ant task. Ant task implementation classes must be public, concrete, and have a no-arg constructor.- Parameters:
- taskClass- The class to be checked. Must not be- null.
- Throws:
- BuildException- if the class is unsuitable for being an Ant task. An error level message is logged before this exception is thrown.
 
 - 
getTaskDefinitionspublic java.util.Hashtable<java.lang.String,java.lang.Class<?>> getTaskDefinitions() Return the current task definition hashtable. The returned hashtable is "live" and so should not be modified.- Returns:
- a map of from task name to implementing class (String to Class).
 
 - 
getCopyOfTaskDefinitionspublic java.util.Map<java.lang.String,java.lang.Class<?>> getCopyOfTaskDefinitions() Return the current task definition map. The returned map is a copy of the "live" definitions.- Returns:
- a map of from task name to implementing class (String to Class).
- Since:
- Ant 1.8.1
 
 - 
addDataTypeDefinitionpublic void addDataTypeDefinition(java.lang.String typeName, java.lang.Class<?> typeClass)Add a new datatype definition. Attempting to override an existing definition with an equivalent one (i.e. with the same classname) results in a verbose log message. Attempting to override an existing definition with a different one results in a warning log message, but the definition is changed.- Parameters:
- typeName- The name of the datatype. Must not be- null.
- typeClass- The full name of the class implementing the datatype. Must not be- null.
 
 - 
getDataTypeDefinitionspublic java.util.Hashtable<java.lang.String,java.lang.Class<?>> getDataTypeDefinitions() Return the current datatype definition hashtable. The returned hashtable is "live" and so should not be modified.- Returns:
- a map of from datatype name to implementing class (String to Class).
 
 - 
getCopyOfDataTypeDefinitionspublic java.util.Map<java.lang.String,java.lang.Class<?>> getCopyOfDataTypeDefinitions() Return the current datatype definition map. The returned map is a copy pf the "live" definitions.- Returns:
- a map of from datatype name to implementing class (String to Class).
- Since:
- Ant 1.8.1
 
 - 
addTargetpublic void addTarget(Target target) throws BuildException Add a new target to the project.- Parameters:
- target- The target to be added to the project. Must not be- null.
- Throws:
- BuildException- if the target already exists in the project
- See Also:
- addOrReplaceTarget(Target)
 
 - 
addTargetpublic void addTarget(java.lang.String targetName, Target target) throws BuildExceptionAdd a new target to the project.- Parameters:
- targetName- The name to use for the target. Must not be- null.
- target- The target to be added to the project. Must not be- null.
- Throws:
- BuildException- if the target already exists in the project.
- See Also:
- addOrReplaceTarget(String, Target)
 
 - 
addOrReplaceTargetpublic void addOrReplaceTarget(Target target) Add a target to the project, or replaces one with the same name.- Parameters:
- target- The target to be added or replaced in the project. Must not be- null.
 
 - 
addOrReplaceTargetpublic void addOrReplaceTarget(java.lang.String targetName, Target target)Add a target to the project, or replaces one with the same name.- Parameters:
- targetName- The name to use for the target. Must not be- null.
- target- The target to be added or replaced in the project. Must not be- null.
 
 - 
getTargetspublic java.util.Hashtable<java.lang.String,Target> getTargets() Return the hashtable of targets. The returned hashtable is "live" and so should not be modified.- Returns:
- a map from name to target (String to Target).
 
 - 
getCopyOfTargetspublic java.util.Map<java.lang.String,Target> getCopyOfTargets() Return the map of targets. The returned map is a copy of the "live" targets.- Returns:
- a map from name to target (String to Target).
- Since:
- Ant 1.8.1
 
 - 
createTaskpublic Task createTask(java.lang.String taskType) throws BuildException Create a new instance of a task, adding it to a list of created tasks for later invalidation. This causes all tasks to be remembered until the containing project is removed- Parameters:
- taskType- The name of the task to create an instance of. Must not be- null.
- Returns:
- an instance of the specified task, or nullif the task name is not recognised.
- Throws:
- BuildException- if the task name is recognised but task creation fails.
 
 - 
createDataTypepublic java.lang.Object createDataType(java.lang.String typeName) throws BuildExceptionCreate a new instance of a data type.- Parameters:
- typeName- The name of the data type to create an instance of. Must not be- null.
- Returns:
- an instance of the specified data type, or nullif the data type name is not recognised.
- Throws:
- BuildException- if the data type name is recognised but instance creation fails.
 
 - 
setExecutorpublic void setExecutor(Executor e) Set the Executor instance for this Project.- Parameters:
- e- the Executor to use.
 
 - 
getExecutorpublic Executor getExecutor() Get this Project's Executor (setting it if necessary).- Returns:
- an Executor instance.
 
 - 
executeTargetspublic void executeTargets(java.util.Vector<java.lang.String> names) throws BuildExceptionExecute the specified sequence of targets, and the targets they depend on.- Parameters:
- names- A vector of target name strings to execute. Must not be- null.
- Throws:
- BuildException- if the build failed.
 
 - 
demuxOutputpublic void demuxOutput(java.lang.String output, boolean isWarning)Demultiplex output so that each task receives the appropriate messages. If the current thread is not currently executing a task, the message is logged directly.- Parameters:
- output- Message to handle. Should not be- null.
- isWarning- Whether the text represents an warning (- true) or information (- false).
 
 - 
defaultInputpublic int defaultInput(byte[] buffer, int offset, int length) throws java.io.IOExceptionRead data from the default input stream. If no default has been specified, System.in is used.- Parameters:
- buffer- the buffer into which data is to be read.
- offset- the offset into the buffer at which data is stored.
- length- the amount of data to read.
- Returns:
- the number of bytes read.
- Throws:
- java.io.IOException- if the data cannot be read.
- Since:
- Ant 1.6
 
 - 
demuxInputpublic int demuxInput(byte[] buffer, int offset, int length) throws java.io.IOExceptionDemux an input request to the correct task.- Parameters:
- buffer- the buffer into which data is to be read.
- offset- the offset into the buffer at which data is stored.
- length- the amount of data to read.
- Returns:
- the number of bytes read.
- Throws:
- java.io.IOException- if the data cannot be read.
- Since:
- Ant 1.6
 
 - 
demuxFlushpublic void demuxFlush(java.lang.String output, boolean isError)Demultiplex flush operations so that each task receives the appropriate messages. If the current thread is not currently executing a task, the message is logged directly.- Parameters:
- output- Message to handle. Should not be- null.
- isError- Whether the text represents an error (- true) or information (- false).
- Since:
- Ant 1.5.2
 
 - 
executeTargetpublic void executeTarget(java.lang.String targetName) throws BuildExceptionExecute the specified target and any targets it depends on.- Parameters:
- targetName- The name of the target to execute. Must not be- null.
- Throws:
- BuildException- if the build failed.
 
 - 
executeSortedTargetspublic void executeSortedTargets(java.util.Vector<Target> sortedTargets) throws BuildException Execute aVectorof sorted targets.- Parameters:
- sortedTargets- the aforementioned- Vector.
- Throws:
- BuildException- on error.
 
 - 
resolveFile@Deprecated public java.io.File resolveFile(java.lang.String fileName, java.io.File rootDir)Deprecated.since 1.4.xReturn the canonical form of a filename.If the specified file name is relative it is resolved with respect to the given root directory. - Parameters:
- fileName- The name of the file to resolve. Must not be- null.
- rootDir- The directory respective to which relative file names are resolved. May be- null, in which case the current directory is used.
- Returns:
- the resolved File.
 
 - 
resolveFilepublic java.io.File resolveFile(java.lang.String fileName) Return the canonical form of a filename.If the specified file name is relative it is resolved with respect to the project's base directory. - Parameters:
- fileName- The name of the file to resolve. Must not be- null.
- Returns:
- the resolved File.
 
 - 
translatePath@Deprecated public static java.lang.String translatePath(java.lang.String toProcess) Deprecated.since 1.7 Use FileUtils.translatePath instead.Translate a path into its native (platform specific) format.This method uses PathTokenizer to separate the input path into its components. This handles DOS style paths in a relatively sensible way. The file separators are then converted to their platform specific versions. - Parameters:
- toProcess- The path to be translated. May be- null.
- Returns:
- the native version of the specified path or
         an empty string if the path is nullor empty.
- See Also:
- PathTokenizer
 
 - 
copyFile@Deprecated public void copyFile(java.lang.String sourceFile, java.lang.String destFile) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination. No filtering is performed.- Parameters:
- sourceFile- Name of file to copy from. Must not be- null.
- destFile- Name of file to copy to. Must not be- null.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used.- Parameters:
- sourceFile- Name of file to copy from. Must not be- null.
- destFile- Name of file to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering, boolean overwrite) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.- Parameters:
- sourceFile- Name of file to copy from. Must not be- null.
- destFile- Name of file to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- overwrite- Whether or not the destination file should be overwritten if it already exists.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.lang.String sourceFile, java.lang.String destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.- Parameters:
- sourceFile- Name of file to copy from. Must not be- null.
- destFile- Name of file to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- overwrite- Whether or not the destination file should be overwritten if it already exists.
- preserveLastModified- Whether or not the last modified time of the resulting file should be set to that of the source file.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.io.File sourceFile, java.io.File destFile) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination. No filtering is performed.- Parameters:
- sourceFile- File to copy from. Must not be- null.
- destFile- File to copy to. Must not be- null.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used.- Parameters:
- sourceFile- File to copy from. Must not be- null.
- destFile- File to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- Throws:
- java.io.IOException- if the copying fails.
 
 - 
copyFile@Deprecated public void copyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering, boolean overwrite) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used and if source files may overwrite newer destination files.- Parameters:
- sourceFile- File to copy from. Must not be- null.
- destFile- File to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- overwrite- Whether or not the destination file should be overwritten if it already exists.
- Throws:
- java.io.IOException- if the file cannot be copied.
 
 - 
copyFile@Deprecated public void copyFile(java.io.File sourceFile, java.io.File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws java.io.IOExceptionDeprecated.since 1.4.xConvenience method to copy a file from a source to a destination specifying if token filtering should be used, if source files may overwrite newer destination files, and if the last modified time of the resulting file should be set to that of the source file.- Parameters:
- sourceFile- File to copy from. Must not be- null.
- destFile- File to copy to. Must not be- null.
- filtering- Whether or not token filtering should be used during the copy.
- overwrite- Whether or not the destination file should be overwritten if it already exists.
- preserveLastModified- Whether or not the last modified time of the resulting file should be set to that of the source file.
- Throws:
- java.io.IOException- if the file cannot be copied.
 
 - 
setFileLastModified@Deprecated public void setFileLastModified(java.io.File file, long time) throws BuildExceptionDeprecated.since 1.4.xCall File.setLastModified(long time) on Java above 1.1, and logs a warning on Java 1.1.- Parameters:
- file- The file to set the last modified time on. Must not be- null.
- time- the required modification time.
- Throws:
- BuildException- if the last modified time cannot be set despite running on a platform with a version above 1.1.
 
 - 
toBooleanpublic static boolean toBoolean(java.lang.String s) Return the boolean equivalent of a string, which is consideredtrueif either"on","true", or"yes"is found, ignoring case.- Parameters:
- s- The string to convert to a boolean value.
- Returns:
- trueif the given string is- "on",- "true"or- "yes", or- falseotherwise.
 
 - 
getProjectpublic static Project getProject(java.lang.Object o) Get the Project instance associated with the specified object.- Parameters:
- o- the object to query.
- Returns:
- Project instance, if any.
- Since:
- Ant 1.7.1
 
 - 
topoSortpublic final java.util.Vector<Target> topoSort(java.lang.String root, java.util.Hashtable<java.lang.String,Target> targetTable) throws BuildException Topologically sort a set of targets. Equivalent to callingtopoSort(new String[] {root}, targets, true).- Parameters:
- root- The name of the root target. The sort is created in such a way that the sequence of Targets up to the root target is the minimum possible such sequence. Must not be- null.
- targetTable- A Hashtable mapping names to Targets. Must not be- null.
- Returns:
- a Vector of ALL Target objects in sorted order.
- Throws:
- BuildException- if there is a cyclic dependency among the targets, or if a named target does not exist.
 
 - 
topoSortpublic final java.util.Vector<Target> topoSort(java.lang.String root, java.util.Hashtable<java.lang.String,Target> targetTable, boolean returnAll) throws BuildException Topologically sort a set of targets. Equivalent to callingtopoSort(new String[] {root}, targets, returnAll).- Parameters:
- root- The name of the root target. The sort is created in such a way that the sequence of Targets up to the root target is the minimum possible such sequence. Must not be- null.
- targetTable- A Hashtable mapping names to Targets. Must not be- null.
- returnAll-- booleanindicating whether to return all targets, or the execution sequence only.
- Returns:
- a Vector of Target objects in sorted order.
- Throws:
- BuildException- if there is a cyclic dependency among the targets, or if a named target does not exist.
- Since:
- Ant 1.6.3
 
 - 
topoSortpublic final java.util.Vector<Target> topoSort(java.lang.String[] roots, java.util.Hashtable<java.lang.String,Target> targetTable, boolean returnAll) throws BuildException Topologically sort a set of targets.- Parameters:
- roots-- String[]containing the names of the root targets. The sort is created in such a way that the ordered sequence of Targets is the minimum possible such sequence to the specified root targets. Must not be- null.
- targetTable- A map of names to targets (String to Target). Must not be- null.
- returnAll-- booleanindicating whether to return all targets, or the execution sequence only.
- Returns:
- a Vector of Target objects in sorted order.
- Throws:
- BuildException- if there is a cyclic dependency among the targets, or if a named target does not exist.
- Since:
- Ant 1.6.3
 
 - 
inheritIDReferencespublic void inheritIDReferences(Project parent) Inherit the id references.- Parameters:
- parent- the parent project of this project.
 
 - 
addIdReferencepublic void addIdReference(java.lang.String id, java.lang.Object value)Add an id reference. Used for broken build files.- Parameters:
- id- the id to set.
- value- the value to set it to (Unknown element in this case.
 
 - 
addReferencepublic void addReference(java.lang.String referenceName, java.lang.Object value)Add a reference to the project.- Parameters:
- referenceName- The name of the reference. Must not be- null.
- value- The value of the reference.
 
 - 
getReferencespublic java.util.Hashtable<java.lang.String,java.lang.Object> getReferences() Return a map of the references in the project (String to Object). The returned hashtable is "live" and so must not be modified.- Returns:
- a map of the references in the project (String to Object).
 
 - 
hasReferencepublic boolean hasReference(java.lang.String key) Does the project know this reference?- Parameters:
- key- String
- Returns:
- boolean
- Since:
- Ant 1.8.0
 
 - 
getCopyOfReferencespublic java.util.Map<java.lang.String,java.lang.Object> getCopyOfReferences() Return a map of the references in the project (String to Object). The returned hashtable is a copy of the "live" references.- Returns:
- a map of the references in the project (String to Object).
- Since:
- Ant 1.8.1
 
 - 
getReferencepublic <T> T getReference(java.lang.String key) Look up a reference by its key (ID).- Type Parameters:
- T- desired type
- Parameters:
- key- The key for the desired reference. Must not be- null.
- Returns:
- the reference with the specified ID, or nullif there is no such reference in the project, with type inference.
 
 - 
getElementNamepublic java.lang.String getElementName(java.lang.Object element) Return a description of the type of the given element, with special handling for instances of tasks and data types.This is useful for logging purposes. - Parameters:
- element- The element to describe. Must not be- null.
- Returns:
- a description of the element type.
- Since:
- 1.95, Ant 1.5
 
 - 
fireBuildStartedpublic void fireBuildStarted() Send a "build started" event to the build listeners for this project.
 - 
fireBuildFinishedpublic void fireBuildFinished(java.lang.Throwable exception) Send a "build finished" event to the build listeners for this project.- Parameters:
- exception- an exception indicating a reason for a build failure. May be- null, indicating a successful build.
 
 - 
fireSubBuildStartedpublic void fireSubBuildStarted() Send a "subbuild started" event to the build listeners for this project.- Since:
- Ant 1.6.2
 
 - 
fireSubBuildFinishedpublic void fireSubBuildFinished(java.lang.Throwable exception) Send a "subbuild finished" event to the build listeners for this project.- Parameters:
- exception- an exception indicating a reason for a build failure. May be- null, indicating a successful build.
- Since:
- Ant 1.6.2
 
 - 
fireTargetStartedprotected void fireTargetStarted(Target target) Send a "target started" event to the build listeners for this project.- Parameters:
- target- The target which is starting to build. Must not be- null.
 
 - 
fireTargetFinishedprotected void fireTargetFinished(Target target, java.lang.Throwable exception) Send a "target finished" event to the build listeners for this project.- Parameters:
- target- The target which has finished building. Must not be- null.
- exception- an exception indicating a reason for a build failure. May be- null, indicating a successful build.
 
 - 
fireTaskStartedprotected void fireTaskStarted(Task task) Send a "task started" event to the build listeners for this project.- Parameters:
- task- The target which is starting to execute. Must not be- null.
 
 - 
fireTaskFinishedprotected void fireTaskFinished(Task task, java.lang.Throwable exception) Send a "task finished" event to the build listeners for this project.- Parameters:
- task- The task which has finished executing. Must not be- null.
- exception- an exception indicating a reason for a build failure. May be- null, indicating a successful build.
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Project project, java.lang.String message, int priority) Send a "message logged" project level event to the build listeners for this project.- Parameters:
- project- The project generating the event. Should not be- null.
- message- The message to send. Should not be- null.
- priority- The priority of the message.
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Project project, java.lang.String message, java.lang.Throwable throwable, int priority) Send a "message logged" project level event to the build listeners for this project.- Parameters:
- project- The project generating the event. Should not be- null.
- message- The message to send. Should not be- null.
- throwable- The exception that caused this message. May be- null.
- priority- The priority of the message.
- Since:
- 1.7
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Target target, java.lang.String message, int priority) Send a "message logged" target level event to the build listeners for this project.- Parameters:
- target- The target generating the event. Must not be- null.
- message- The message to send. Should not be- null.
- priority- The priority of the message.
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Target target, java.lang.String message, java.lang.Throwable throwable, int priority) Send a "message logged" target level event to the build listeners for this project.- Parameters:
- target- The target generating the event. Must not be- null.
- message- The message to send. Should not be- null.
- throwable- The exception that caused this message. May be- null.
- priority- The priority of the message.
- Since:
- 1.7
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Task task, java.lang.String message, int priority) Send a "message logged" task level event to the build listeners for this project.- Parameters:
- task- The task generating the event. Must not be- null.
- message- The message to send. Should not be- null.
- priority- The priority of the message.
 
 - 
fireMessageLoggedprotected void fireMessageLogged(Task task, java.lang.String message, java.lang.Throwable throwable, int priority) Send a "message logged" task level event to the build listeners for this project.- Parameters:
- task- The task generating the event. Must not be- null.
- message- The message to send. Should not be- null.
- throwable- The exception that caused this message. May be- null.
- priority- The priority of the message.
- Since:
- 1.7
 
 - 
registerThreadTaskpublic void registerThreadTask(java.lang.Thread thread, Task task)Register a task as the current task for a thread. If the task is null, the thread's entry is removed.- Parameters:
- thread- the thread on which the task is registered.
- task- the task to be registered.
- Since:
- Ant 1.5
 
 - 
getThreadTaskpublic Task getThreadTask(java.lang.Thread thread) Get the current task associated with a thread, if any.- Parameters:
- thread- the thread for which the task is required.
- Returns:
- the task which is currently registered for the given thread or null if no task is registered.
 
 - 
setProjectReferencepublic final void setProjectReference(java.lang.Object obj) Set a reference to this Project on the parameterized object. Need to set the project before other set/add elements are called.- Parameters:
- obj- the object to invoke setProject(this) on.
 
 - 
getResourcepublic Resource getResource(java.lang.String name) Resolve the file relative to the project's basedir and return it as a FileResource.- Specified by:
- getResourcein interface- ResourceFactory
- Parameters:
- name- the name of the file to resolve.
- Returns:
- the file resource.
- Since:
- Ant 1.7
 
 
- 
 
-