崇高文本2 Ant构建目标:[错误2]系统找不到指定的文件 [英] Sublime Text 2 Ant Build Target: [Error 2] The system cannot find the file specified
问题描述
当我从崇高的文本2(按Ctrl + B)运行基本Ant构建,它的工作原理,但它运行的所有目标。我想指定/覆盖默认的构建目标。我添加了一个新的构建系统,如:
When I run the basic Ant Build from Sublime Text 2 (Ctrl+B), it works, but it runs all targets. I want to specify/override the default build target. I added a new build system like:
{
"cmd": ["ant", "my_target"]
}
但它失败:
[Error 2] The system cannot find the file specified
[Finished]
哪些错误?
推荐答案
该sublimetext buildsystems文档页面告诉你如何才能使一个特例来执行的ant.bat,而不是在Windows蚁族。请参见特定于平台的选项
The sublimetext buildsystems documentation page show how you can make a special case to execute "ant.bat" instead of "ant" on Windows. See the section "Platform-specific Options":
窗户,OSX和Linux的元素让你提供特定于平台的
在构建系统数据。这里有一个例子:
The windows, osx and linux elements let you provide platform-specific data in the build system. Here’s an example:
{
"cmd": ["ant"],
"file_regex": "^ *\\[javac\\] (.+):([0-9]+):() (.*)$",
"working_dir": "${project_path:${folder}}",
"selector": "source.java",
"windows":
{
"cmd": ["ant.bat"]
}
}
在这种情况下,蚂蚁将是除Windows平台上的每个执行,
其中,ant.bat将被用来代替。
In this case, ant will be executed for every platform except Windows, where ant.bat will be used instead.
帮助吗?
这篇关于崇高文本2 Ant构建目标:[错误2]系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!