From e2dfffecc55b55682f0ad2e43bb84ce1324b7216 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
You can define file name transformations by using a nested mapper element. The default mapper used by
+<copy>
is the identity.
Copy a single file
@@ -1595,6 +1602,14 @@ To use a fileset, the todir attribute must be set. <fileset dir="src_dir" excludes="**/*.java" /> </copy>+
Copy a set of files to a directory appending
+".bak
" to the file name on the fly
+ <copy todir="../backup/dir" > + <fileset dir="src_dir" /> + <mapper type="glob" from="*" to="*.bak" /> + </copy> +
You can define file name transformations by using a nested mapper element. The default mapper used by
+<copy>
is the identity.
Move a single file (rename a file)
@@ -3696,6 +3718,16 @@ to move to the todir directory. </fileset> </move>+
Append ".bak"
to the names of all files
+in a directory.
+ <move todir="my/src/dir" > + <fileset dir="my/src/dir" > + <exclude name="**/*.bak" /> + </fileset> + <mapper type="glob" from="*" to="*.bak" /> + </move> +
Sets a property if a Target file is more up to date than a set of +
Sets a property if a target files are more up to date than a set of Source files. Source files are specified by nested <srcfiles> -elements, these are FileSets.
-The value part of the property being set is true if the timestamp of the -Target file is more recent than the timestamp of every Source file.
+elements, these are FileSets, while target +files are specified using a nested mapper +element. +The value part of the property being set is true if the +timestamp of the target files is more recent than the timestamp of +every corresponding source file.
+The default behavior is to use a merge
+mapper whith the to
attribute set to the value of the
+targetfile attribute.
Normally, this task is used to set properties that are useful to avoid target execution depending on the relative age of the specified files.
sets the property xmlBuild.notRequired
to the value "true"
if the ${deploy}/xmlClasses.jar is more up to date than any of the DTD files in the ${src}/xml directory.
This can be written as +
<uptodate property="xmlBuild.notRequired" > + <srcfiles dir= "${src}/xml" includes="**/*.dtd" /> + <mapper type="merge" to="${deploy}\xmlClasses.jar" /> + </uptodate>+
as well.