如果有人在Windows(NTFS)上运行Ant符号链接任务会发生什么?

前端之家收集整理的这篇文章主要介绍了如果有人在Windows(NTFS)上运行Ant符号链接任务会发生什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我写了ant build脚本.我需要创建一个符号链接,我找到了 symlink任务.根据手册,它只适用于Unix.如果有人在Windows平台上运行我的构建脚本会发生什么?构建会失败吗?或者在Windows平台上会忽略此任务?或者在NTFS驱动器的情况下,它甚至可以工作?

解决方法

我正在运行Win7,我试过了.因为我有Mingw安装它使用ln. Ln似乎只是为了复制一切.由于正常的Windows安装没有ln,因此会失败.

这是没有ln会发生的事情:

C:\Users\Janus\Desktop>.\apache-ant-1.8.2\bin\ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: C:\Users\Janus\Desktop\build.xml

dist:

BUILD Failed
C:\Users\Janus\Desktop\build.xml:3: Could not launch ln: java.io.IOException: Cannot run program "ln": CreateProcess error=2,The system can
not find the file specified

Total time: 1 second

C:\Users\Janus\Desktop>

build.xml文件

<project name="MyProject" default="dist" basedir=".">
<target name="dist">
<symlink link="lol" resource="d3dwindower" />
</target>
</project>

猜你在找的Windows相关文章