eclipse:保存后自动构建 [英] eclipse: auto build after save
本文介绍了eclipse:保存后自动构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您可以将脚本声明为构建器,并使其运行在自动构建期间
。
查看项目的属性:可以添加一个外部程序(上图)或一个脚本(下面)。
如果您可以将脚本作为蚂蚁脚本导出,例如 OP David B 在他的答案,这很容易:
- 导出为蚂蚁脚本:右键单击
项目 - >出口 - > runaable jar文件
,勾选另存为ANT脚本
和完成。 - 将蚂蚁脚本添加为构建器:右键单击
项目 - >属性 - >建筑商 - >新的(Ant)
。
粘贴ant文件的路径,转到目标
选项卡,然后单击设置目标
按钮旁边的自动构建
。
最后点击确定,确定,确定。
I have an ant script that creates runnable jar and I want it to run each time I make changes in my code and save them. I guess I need some "auto build after save" option in Eclipse. Is there such a thing?
解决方案
You could declare your script as a builder, and make it run "during auto build
".
See the properties of your project: you can add an external program (above) or an an script (below).
If you can export your script as an ant script, like the OP David B did in his answer, it becomes quite easy:
- Export as an ant script: right-click the
project -> export -> runaable jar file
, tick "save as ANT script
" and finish. - Add the ant script as a builder: right-click the
project -> properties -> Builders -> new (Ant)
.
Paste the path for the ant file, go to "targets
" tab and click the "set targets
" button next to "auto build
".
Finally, click OK, OK, OK.
这篇关于eclipse:保存后自动构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文