You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eric Chow <ec...@macaucabletv.com> on 2004/08/13 06:04:18 UTC
File copying problem ???
Hello,
How can I copying some files with to a specific folder ???
Project structure:
-------------------------------
${basedir}/aaa/target/aaa-x.jar
${basedir}/bbb/target/bbb-x.jar
${basedir}/ccc/target/ccc-x.jar
${basedir}/xxx/target/xxx.jar
I want to copy all the *-x.jar into the ${basedir}/xxx/target/xxx/temp !!!
How can I do that ??
I tried to add some goal in maven.xml under subproject "xxx" :
<ant:copy todir="${xxx.dir}/temp" overwrite="true" quiet="true"
failonerror="false">
<fileset dir="..">
<include name="**/target/*-games-*.jar"/>
</fileset>
</ant:copy>
but it will copy those *-x.jar with some extra folders, how can I only copy
the exact files without folders.
Eric
==========================
If you know what you are doing,
it is not called RESEARCH!
==========================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: File copying problem ???
Posted by Shinobu Kawai <sh...@ieee.org>.
Hi Eric,
> <ant:copy todir="${xxx.dir}/temp" overwrite="true" quiet="true"
> failonerror="false">
> <fileset dir="..">
> <include name="**/target/*-games-*.jar"/>
> </fileset>
> </ant:copy>
>
> but it will copy those *-x.jar with some extra folders, how can I only copy
> the exact files without folders.
I think you might want to use the "flatten" attribute.
cf. http://ant.apache.org/manual/CoreTasks/copy.html
Good luck!
-- Shinobu Kawai
--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org