<modified> selector computes a value for a file, compares that to the value
stored in a cache and select the file, if these two values differ.
Because this selector is highly configurable the order in which the selection is done is:
The comparison, computing of the hashvalue and the store is done by implementation of special interfaces. Therefore they may provide additional parameters.
Table G.12: Attributes for the
|The type of algorithm should be used. Acceptable values are (further information see later):
|The type of cache should be used. Acceptable values are (further information see later):
|The type of comparator should be used. Acceptable values are:
|Classname of custom algorithm implementation. Lower priority than algorithm.||n/a||No|
|Classname of custom cache implementation. Lower priority than cache.||n/a||No|
|Classname of custom comparator implementation. Lower priority than comparator.||n/a||No|
|Should the cache be updated when values differ? (boolean)||No|
|Should directories be selected? (boolean)||No|
|If set to "true", the storage of the cache will be delayed until the next finished BuildEvent; task finished, target finished or build finished, whichever comes first. This is provided for increased performance. If set to "false", the storage of the cache will happen with each change. This attribute depends upon the update attribute. (boolean)||No|
All attributes of a <modified> selector an be set with nested <param/> tags. Additional values can be set with <param/> tags according to the rules below.
Table G.13: algorithm
|This Algorithm supports the following attribute:
|Uses the lastModified property of a file. No additional configuration is required.||n/a||No|
Here are some examples of how to use the Modified Selector:
<copy todir="dest"> <fileset dir="src"> <modified/> </fileset> </copy>
This will copy all files from src to dest which content has changed. Using an updating PropertyfileCache with cache.properties and MD5-FilehashAlgorithm.
<copy todir="dest"> <fileset dir="src"> <modified update="true" seldirs="true" cache="propertyfile" algorithm="digest" comparator="equal"> <param name="cache.cachefile" value="cache.properties"/> <param name="algorithm.algorithm" value="md5"/> </modified> </fileset> </copy>