views:

592

answers:

4

I'm trying to compile a Flex application in Ant (no problems here, I can do it fine). When I try to publish the contents of the project to a Windows network drive (known as "Z:\" on my system), I get the following LAME exception thrown by Java/Ant:

BUILD FAILED
C:\workspace\bkeller\build.xml:42: Failed to copy C:\workspace\bkeller\web\assets\text\biography.html to Z:\web\bkeller\assets\text\biography.html due to java.io.FileNotFoundException Z:\web\bkeller\assets\text\biography.html (The system cannot find the file specified)

Which kind of sucks. I can't find any way to get rid of this problem and it's pretty crucial to my project that I get this working. I know for sure that I have read/write/execute permissions on the network drive, I can create/edit/delete files on the drive just fine through Windows explorer.

Drive Z is a network mount to virtualbox, allowing me to get access to my host OS, Ubuntu. I've double checked that it has write permissions. Any ideas?

A: 

Does it go without saying that the file actually exists? Regardless, while you may have permission, does the process that is actually running the ant task have permission?

Noon Silk
The files do actually exist, trust me I've checked ;)This problem is the weirdest thing I've ever seen.
TK Kocheran
+2  A: 

Seeing as how Z is a network mount, verifying that it works (e.g. that you can create / write files) through Windows Explorer may not be the same thing as verifying that it works from within Ant:

  1. You may have specified the necessary user / password sometime in the past and Explorer remembered it (so it doesn't ask you again). Ant obviously wouldn't.
  2. Ant may run as a different user, especially if you spawn another process inside the build.

Can you write a simple test in java and see if it can create a file on your Z: drive? Perhaps that'll provide some insight. You can also run ant with -debug switch and see if it provides a more detailed info. At the very least it would print a stack trace and you can download Ant source and see what's happening.

ChssPly76
A: 

you certainly thought about it, but have you tried

Z:/web/bkeller/assets/text/biography.html

I always use the / instead of \ even on Windows and can't remember having a problem with the Copy target.

Vladimir
A: 

It was a problem in VirtualBox's shared folder system. It's was fixed a few releases ago by 3.0.X.

TK Kocheran