Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
public class: DependSet [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.MatchingTask
            org.apache.tools.ant.taskdefs.DependSet

All Implemented Interfaces:
    SelectorContainer, Cloneable

Examines and removes out of date target files. If any of the target files are out of date with respect to any of the source files, all target files are removed. This is useful where dependencies cannot be computed (for example, dynamically interpreted parameters or files that need to stay in synch but are not directly linked) or where the ant task in question could compute them but does not (for example, the linked DTD for an XML file using the XSLT task). nested arguments: At least one of both source and target entities is required.

This task will examine each of the sources against each of the target files. If any target files are out of date with respect to any of the sources, all targets are removed. If any sources or targets do not exist, all targets are removed. Hint: If missing files should be ignored, specify them as include patterns in filesets, rather than using filelists.

This task attempts to optimize speed of dependency checking by comparing only the dates of the oldest target file and the newest source.

Example uses:

Fields inherited from org.apache.tools.ant.taskdefs.MatchingTask:
fileset
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Method from org.apache.tools.ant.taskdefs.DependSet Summary:
addSrcfilelist,   addSrcfileset,   addTargetfilelist,   addTargetfileset,   createSources,   createTargets,   execute
Methods from org.apache.tools.ant.taskdefs.MatchingTask:
XsetIgnore,   XsetItems,   add,   addAnd,   addContains,   addContainsRegexp,   addCustom,   addDate,   addDepend,   addDepth,   addDifferent,   addFilename,   addMajority,   addModified,   addNone,   addNot,   addOr,   addPresent,   addSelector,   addSize,   addType,   appendSelector,   createExclude,   createExcludesFile,   createInclude,   createIncludesFile,   createPatternSet,   getDirectoryScanner,   getImplicitFileSet,   getSelectors,   hasSelectors,   selectorCount,   selectorElements,   setCaseSensitive,   setDefaultexcludes,   setExcludes,   setExcludesfile,   setFollowSymlinks,   setIncludes,   setIncludesfile,   setProject
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.DependSet Detail:
 public  void addSrcfilelist(FileList fl) 
    Add a list of source files.
 public  void addSrcfileset(FileSet fs) 
    Add a set of source files.
 public  void addTargetfilelist(FileList fl) 
    Add a list of target files.
 public  void addTargetfileset(FileSet fs) 
    Add a set of target files.
 public synchronized Union createSources() 
    Create a nested sources element.
 public synchronized Path createTargets() 
    Create a nested targets element.
 public  void execute() throws BuildException 
    Execute the task.