Ant copy with many mappers problem -
i want copy directory directory must rename 1 file. trying this:
<copy todir="destdir" enablemultiplemappings="true"> <fileset dir="sourcedir"/> <compositemapper> <identitymapper /> <globmapper from="oldfilename" to="newfilename"/> </compositemapper> </copy>
but task copy files, , copy renamed file. , in destdir directory have 2 files: destdir\oldfilename , destdir\newfilename. need destdir\newfilename. can me this?
edited: need copy files form sourcedir destdir, , rename file name "oldfilename".
set enablemultiplemappings="false"
, , swap order of mappers:
<copy todir="destdir"> <fileset dir="sourcedir" /> <compositemapper> <globmapper from="oldfilename" to="newfilename" /> <identitymapper /> </compositemapper> </copy>
without multiple mappings enabled first mapping produces filename 'wins'. files needing rename, glob apply. other files identity mapper name them as-is.
Comments
Post a Comment