在 Sublime Text 2 中使用 Ant
我在 Sublime Text 2 中与 Ant 一起使用 Build 命令时遇到问题。我定义了一个项目,在项目的根目录中有一个build.xml文件。然后在 Sublime Text 2 中,打开项目,选择“工具”->“工具”。构建系统->蚂蚁。然后,如果我尝试运行工具 ->构建,我得到以下输出:
Buildfile: build.xml does not exist!
Build failed
[Finished]
我确信我缺少一些简单的东西。我用的是Windows XP。谢谢。
I am having trouble getting the Build command in Sublime Text 2 working with Ant. I have defined a project, and in the root of the project is a build.xml file. Then in Sublime Text 2, with the project open, I choose Tools -> Build System -> Ant. Then if I try to run Tools -> Build, I get the following output:
Buildfile: build.xml does not exist!
Build failed
[Finished]
I'm sure there's something simple I'm missing. I'm on Windows XP. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
默认情况下,Sublime Text 2 在项目文件夹的根目录中查找 build.xml。最简单的事情可能是将你的 build.xml 移到那里。
否则,您可以通过修改 Ant.sublime-build 来更改working_dir(不确定它在 Windows 中的位置,请在您的系统中搜索它)。或者,您可以复制该文件的内容并创建一个新的构建系统(工具 -> 构建系统 -> 新构建系统)。
查看此线程以了解更多详细信息: http ://www.sublimetext.com/forum/viewtopic.php?f=2&t=1444&start=20
By default Sublime Text 2 looks for the build.xml in the root of your project folder. The easiest thing might be moving your build.xml there.
Otherwise, you can change the working_dir by modifying the Ant.sublime-build (not sure where this lives in Windows, search your system for it). Alternately, you can copy the contents of that file and make a new build system (Tools -> Build System -> New Build System).
Take a look at this thread for more details: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=1444&start=20
用户“-s”或“-find”开关。这将在当前文件的项目根目录中搜索“build.xml”。如果你
User "-s" or "-find" switch. This will search for "build.xml" towards the root of the project w.r.t. current file. If you
我也遇到过同样的问题,但我已经建立了自己的 Ant 构建;
代码是
我已将
"working_dir": "${project_path:${folder}}"
更改为"working_dir": "${file_path}"
。因为,我不喜欢将 st2 生成的东西放在项目目录中。I have occurred the same problems, but I have set up my own Ant build;
the code is
I've changed the
"working_dir": "${project_path:${folder}}"
to"working_dir": "${file_path}"
. Because, I do not like to put the very things generate by st2 in the project dir.