开发者

ant target : copying directories and the respective files that are in it

开发者 https://www.devze.com 2023-03-17 18:11 出处:网络
Suppose I have a directory structure like the follo开发者_如何学编程wing /a/b/testB.xml /a/c/testC.xml

Suppose I have a directory structure like the follo开发者_如何学编程wing

/a/b/testB.xml
/a/c/testC.xml
/a/testD.xml

and I want to copy everything inside /a to /build

so that I will have

/build/b/testB.xml
/build/c/testC.xml
/build/testD.xml

What ant command should I use? I have tried using fileset and it looks like that it only copies the files that are specified in the includes to the todir directory.


Try this:

<copy todir="build">
  <fileset dir="a">
    <include name="**/*"/>
  </fileset>
</copy>

The docs on FileSet are here.

0

精彩评论

暂无评论...
验证码 换一张
取 消