0

Iam using Jenkins to build my project. In build.xml, I have written the following code to copy the files from src to dest folder...

<copydir src="../image_files/Ace/drawable-hdpi" dest="../IgnitorACE/res/drawable-hdpi"/>

The problem is that, in src having the only two image files with same name as in dest folder but the pattern/design of images are differnt. So, whenever i run my build, jenkins has to copy and replace the image files with new image but same name.

The above command is working but getting warning as

[copydir] DEPRECATED - The copydir task is deprecated.  Use copy instead.
[copydir] Copying 2 files to /var/lib/jenkins/workspace/Ace Build/IgnitorACE/res/drawable-hdpi

So, any solution will be appreciated.

Thanks

user3297196
  • 47
  • 2
  • 11

1 Answers1

1

As the warning clearly states that [copydir] DEPRECATED - The copydir task is deprecated. Use copy instead, you should use copy instead of copydir command.

So, instead of

<copydir src="../image_files/Ace/drawable-hdpi" dest="../IgnitorACE/res/drawable-hdpi"/>

use

<copy file="../image_files/Ace/drawable-hdpi" tofile="../IgnitorACE/res/drawable-hdpi"/>

Also go through the official link for more details.

Technext
  • 7,887
  • 9
  • 48
  • 76
  • I have used the above tag along with overwrite = "true" – user3297196 Sep 15 '14 at 09:58
  • Glad to see it worked. :) However, there is one thing that i would like to mention: we are here to help each other but it's always good to first search such issues on Google. If you really cannot find a solution, then you should post your query here. I hope you understand my point. :) – Technext Sep 15 '14 at 11:58
  • 6
    this doesnt work. for the correct answer use: `` see [this thread](http://stackoverflow.com/questions/1685442/how-to-copy-the-directory-using-ant) – aviv Oct 13 '15 at 11:51