Ant Copy task: failed to copy due to java.io.FileNotFoundException

I am trying to compile a Flex application in Ant (there is no problem here, I can do it well). When I try to publish the contents of a 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)

What a nipple. I can’t find a way to get rid of this problem, and it is very important for my project that I get this job. I know for sure that I have read / write / execute permissions on a network drive, I can create / edit / delete files on a drive, just in Windows Explorer.

Drive Z is a network connection to a virtual box, which allows me to access my Ubuntu host OS. I double checked that he has write permissions. Any ideas?

+3
source share
5 answers

This was a problem on the VirtualBox public folder system. It was fixed several releases ago on 3.0.X.

0
source

Seeing that Z is a network connection, checking that it works (for example, you can create / write files) through Windows Explorer may not be the same as checking that it works from Ant:

  • You may have indicated the required password / password in the past, and Explorer will remember it (so it won’t ask you again). Ant obviously won't.
  • Ant , .

java , Z: ? , . Ant -debug , . , , Ant , .

+3

. - , Windows 7.

, Eclipse.

, , Eclipse - Eclipse, .

+1

Is it possible to say that the file really exists? Regardless of whether you can have permission, does the process actually perform the ant task?

0
source

of course you thought about it, but did you try

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

I always use /instead \even on Windows and cannot remember the problem with the Copy object.

0
source

Source: https://habr.com/ru/post/1716267/


All Articles