ant build.xml windows 路径中的空白 [英] ant build.xml windows white space in path

查看:38
本文介绍了ant build.xml windows 路径中的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Windows 并且我正在尝试让 ANT 工作.

I'm using Windows and I'm trying to get ANT to work.

当我从命令行执行 ant 构建时,我得到:C:\dev\Projects\springapp\${%ANT_HOME%}\lib 未找到.

When I do an ant build from the command line, I get: C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found.

我查看了 build.xml 文件,我发现:appserver.home=${user.home}/apache-tomcat-6.0.14(我刚刚从教程中直接复制粘贴)

I look into the build.xml file and I find: appserver.home=${user.home}/apache-tomcat-6.0.14 (which I just copied and pasted straight from a tutorial)

我改成:

appserver.home="C:\Program Files\Apache Software Foundation\Tomcat 6.0"

但现在我明白了:

C:\dev\Projects\springapp\"C:Program FilesApache Software FoundationTomcat 6.0"\lib not found.

似乎 Program Files 和 Tomcat 6.0 中的空白导致构建失败.你如何处理xml文件中的这些,而不用重新创建路径没有空格的目录?

It seems like the white space in Program Files and Tomcat 6.0 are causing the build to fail. How do you deal with these in xml files without re-creating the directory with a path with no white space?

推荐答案

改为

appserver.home="C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0"

这篇关于ant build.xml windows 路径中的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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