在Windows上的符号链接的Ant任务(NTFS) [英] Ant symlink task on windows (NTFS)

查看:328
本文介绍了在Windows上的符号链接的Ant任务(NTFS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写的Ant构建脚本。我需要创建符号链接,我发现符号链接任务。根据手册,它只能在UNIX上。发生什么,如果有人运行在Windows平台上我的构建脚本?将建立失败?还是这个任务将在Windows平台上被忽略?或在NTFS的情况下,驾驶它甚至会工作?

I write ant build script. I need create symlink and I found symlink task. According to manual, it works only on unix. What happen if someone run my build script on windows platform? Will build fail? Or this task will be ignored on windows platform? Or in case of ntfs drive it will even work?

推荐答案

我运行Win7和我试了一下。因为我有称为Mingw安装了它使用LN。 LN似乎只是复制一切。由于正常的Windows安装没有LN,它会失败在那里。

I'm running Win7 and I tried it. Since I have Mingw installed it used ln. Ln seemed just to copy everything. Since a normal Windows installation does not have ln, it would fail there.

下面是无LN发生了什么:

Here's what happens without 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中:

Build.xml:

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

这篇关于在Windows上的符号链接的Ant任务(NTFS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆