1

I am using ANT task Copy to copy a zip file from one share to another

<copy file="\\server_share\nightly\xyz08022012.zip" todir="Z:\output\Nightly"/>

when this gets executed, I am getting the below exception

Failed to copy \server_share\nightly\xyz08022012.zip to Z:\output\Nightly\xyz08022012.zip due to java.io.FileNotFoundException Z:\output\Nightly\xyz08022012.zip (The system cannot find the path specified.)`

When I change the Z:\output\Nightly to C:\temp, the copy works

Z:\ points to a server share which is mounted on the server with different user credentials and the drive is made persistent. This work around is because of the fact that when the build runs, the build user does not have access to the output share

Hence I mapped the server share as a network drive with different credentials (the user who has read/write permission) and made this drive persistent

This is on a Windows 7 machine where the build is running.

I tried doing a copy manually and that worked

I looked into Ant Copy Task: Failed to copy due to java.io.FileNotFoundException but doesn't help me

Community
  • 1
  • 1
KK99
  • 1,971
  • 7
  • 31
  • 64
  • already asked and answered here = http://stackoverflow.com/q/1344930/130683 – Rebse Feb 08 '12 at 19:53
  • sorry - you found that question already, didn't check the link provided in your question. So did you try run ant in debuglevel to get more information ? Did you try to run ant as admin to check if it's a Windows 7 security issue ? – Rebse Feb 08 '12 at 20:13

0 Answers0