You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adrian Herscu <bm...@axentra.net> on 2005/05/14 15:59:09 UTC
Problem with global mapper
Hi all,
I have a ${src.dir} like:
src/main/mylang
+treeofpackages
+file1.xxx
+file2.xxx
+file1.yyy
...
Now, I want to write a Maven goal to copy this directory
structure into a ${dest.dir} while appending an ".xml" extension
to all files (but not to directories).
I tried to use:
<ant:copy todir="${dest.dir}">
<!--
this line alone copies the directory
structure and files as expected
-->
<ant:fileset dir="${src.dir}" />
<!--
this line has no effect (?)
(from Ant's User Manual)
-->
<ant:globmapper from="*" to="*.xml" />
<!--
this line appends ".xml" both to
files and directories (?)
-->
<and:mapper type="glob" from="*" to="*.xml" />
<!--
this line does not copy anything,
only the ${dest.dir} is created (?)
-->
<ant:mapper type="glob" from="*.*" to="*.*.xml" />
<!--
this line works as expected :)
-->
<ant:mapper type="glob" from="*.xxx" to="*.xxx.xml" />
</ant:copy>
Is it possible to write this task using only one <ant:copy> task
and without specifying a mapper for each source file extension?
Thanks for your time,
Adrian.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org