简体   繁体   English

Ant构建脚本完全挂起,控制台中没有消息

[英]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? 有任何想法吗?

  • JDK 1.6.0_14 JDK 1.6.0_14
  • Eclipse 3.5.1 Eclipse 3.5.1

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: 这是另一种可能的解决方法:

  • Go to Preferences->Ant->Runtime 转到Preferences->Ant->Runtime
  • Classpath tab Classpath选项卡
  • Click 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.

相关问题 如果从Eclipse运行ant build,有没有办法将ant版本输出到控制台 - Is there a way to output the ant version to the console if running ant build from Eclipse intellij ant构建消息看起来与eclipse antbuild消息完全不同 - intellij ant build message looks totally different from eclipse antbuild message 在Ant中运行时,Eclipse控制台中的Log4j消息丢失 - Log4j messages lost in Eclipse console when running in Ant 如何在不同的Java IDE中更新一组ant构建脚本? - How to keep a set of ant build scripts updated in different java IDEs? Eclipse中的Ant构建失败:无法从控制台理解错误 - Ant build in Eclipse failing: Unable to understand the error from console Eclipse 3.4 ant任务挂起 - Eclipse 3.4 ant task hangs Ant任务:在ant build中,我正在使用Java任务,在这里我使用了未出现在eclipse控制台中的system.out.println - Ant task: In ant build i am using java task, where i used system.out.println which are not appearing in the eclipse console 是否存在Ant脚本的编辑器? - Do editors for Ant scripts exist? 如何从Eclipse插件运行ant,将输出发送到Eclipse控制台,并捕获构建结果(成功/失败)? - How to run ant from an Eclipse plugin, send output to an Eclipse console, and capture the build result (success/failure)? Ant构建NSIS失败 - Ant build NSIS fail
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM