蚂蚁复制任务:未能由于java.io.FileNotFoundException复制(Ant Cop

2019-07-03 23:07发布

我试图编译蚂蚁Flex应用程序(没有问题在这里,我可以做到这一点罚款)。 当我尝试这个项目的内容发布到Windows网络驱动器(称为“Z:\”我的系统上),我得到的Java /蚂蚁扔到下面的LAME异常:

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)

哪一种吮吸。 我找不到任何办法摆脱这个问题,它是很重要的,以我的项目,我得到这个工作。 我肯定知道,我已经在网络驱动器上的读/写/执行权限,我可以创建/编辑/通过Windows资源管理器的驱动器上删除文件就好了。

驱动器Z是一个网络安装到VirtualBox的,让我去我的主机操作系统,Ubuntu的访问。 我仔细检查过,它有写权限。 有任何想法吗?

Answer 1:

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.



Answer 2:

刚刚经历过同样的问题。 复制目标是连接到我的Windows 7机器一个普通的网络驱动器。

我可以通过重新启动Eclipse来解决这个问题。

其原因可能是了Eclipse用,因为我已经预先进行的Eclipse更新的管理员权限运行。



Answer 3:

它不用说,该文件确实存在? 无论如何,虽然可能有权限,是否实际运行Ant任务已许可过程?



Answer 4:

你肯定想过这个问题,但你尝试过

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

我总是使用/ ,而不是\即使在Windows,不能记得有与复制目标的问题。



Answer 5:

这是在VirtualBox中的共享文件夹的系统出现问题。 它是固定的几个版本前的3.0.x的



文章来源: Ant Copy Task: Failed to copy due to java.io.FileNotFoundException