[英]Ant build scripts totally hangs, with no messages in console
I have build.xml for my project, but even this small piece of code 我有我的项目的build.xml,但即使是这一小段代码
<target name="init">
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
It doesn't run 它没有运行
Console is empty but process is active. 控制台为空但进程处于活动状态。 I still can terminate it over STOP button
我仍然可以通过STOP按钮终止它
In same time I cannot debug it as well, same stuff active process no output in console and I can wait forever! 同时我也无法调试它,同样的东西活动过程在控制台没有输出,我可以永远等待! Any ideas?
有任何想法吗?
Edited : Thank to Peter's Loron question I checked workspace log file MyWorkspace/.metadata/.log There I saw error message I googled it and found that this happening because location of my Eclipse changed, but path to ANT jars remains old. 编辑 :感谢Peter的Loron问题我检查了工作区日志文件MyWorkspace / .metadata / .log在那里我看到了错误消息我用Google搜索它并发现这种情况发生了,因为我的Eclipse位置发生了变化,但是ANT jar的路径仍然很旧。 TO Fix that you have to go Preferences->Ant->Runtime and click Restore Default it will pickup new jar location and warn you about absence of tools.jar, copy it from somewhere and drop it in same folder where other ant jars.
要修复你必须进入Preferences-> Ant-> Runtime并单击Restore Default它将拾取新jar位置并警告你没有tools.jar,从某处复制它并将其放在其他ant jar的同一文件夹中。
Edited: Thank to Peter's Loron question I checked workspace log file MyWorkspace/.metadata/.log There I saw error message I googled it and found that this happening because location of my Eclipse changed, but path to ANT jars remains old. 编辑:感谢Peter的Loron问题我检查了工作区日志文件MyWorkspace / .metadata / .log在那里我看到了错误消息我用Google搜索它并发现这种情况发生了,因为我的Eclipse位置发生了变化,但是ANT jar的路径仍然很旧。
TO Fix that you have to go Preferences->Ant->Runtime and click Restore Default it will pickup new jar location and warn you about absence of tools.jar, copy it from somewhere and drop it in same folder where other ant jars. 要修复你必须进入Preferences-> Ant-> Runtime并单击Restore Default它将拾取新jar位置并警告你没有tools.jar,从某处复制它并将其放在其他ant jar的同一文件夹中。
Here is yet another possible fix: 这是另一种可能的解决方法:
Preferences->Ant->Runtime
Preferences->Ant->Runtime
Restore Defaults
button. Restore Defaults
按钮。 That happened to fix the issue for me. 这恰好解决了我的问题。
I'm using IBM RAD7 (which is based on Eclipse) and I was having exactly the same problem. 我正在使用IBM RAD7(基于Eclipse),我遇到了完全相同的问题。 After much fiddling I went to "External Tools" |
经过多次摆弄后我去了“外部工具”| JRE Tab |
JRE标签| select "Run in same JRE", mine was set yo use the Webpshere JRE.
选择“在同一个JRE中运行”,我的设置是使用Webpshere JRE。 Took a day to fix it!
花了一天时间修复它! Nigel
奈杰尔
If you are running the script using "External Tools Configuration" you should also check the following: 如果使用“外部工具配置”运行脚本,还应检查以下内容:
Open "External Tools Configuration" and select the launcher that starts the Ant script. 打开“外部工具配置”,然后选择启动Ant脚本的启动器。 In the tab "Common" make sure that "Allocate console (necessary for input)" is checked!
在“Common”选项卡中,确保选中“Allocate console(输入所需)”!
In my case it was not checked and was the reason why no console output was visible. 在我的情况下,它没有被检查,这是为什么没有控制台输出可见的原因。
另一个快速寻找的东西......检查你的VM内存规格......我正在搞乱低内存设置,它引起了与上面相同的问题......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.