日食:自动生成后保存 [英] eclipse: auto build after save
问题描述
我有一个创建运行的JAR一个Ant脚本,我希望它每一次我让我的code更改并保存它们运行。我想我需要一些自动生成后保存在Eclipse选项。是否有这样的事情吗?
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).
如果您可以将您的脚本导出为一个Ant脚本,像href=\"http://stackoverflow.com/users/377031/david-b\"> OP大卫乙中的他的回答,就变得相当容易:
If you can export your script as an ant script, like the OP David B did in his answer, it becomes quite easy:
- 导出为一个Ant脚本:右键单击
项目 - >出口 - > runaable jar文件
,勾选另存为ANT脚本
和<大骨节病>完成骨节病>。 - 添加ant脚本作为一个建设者:右键单击
项目 - &GT;性能 - &GT;建设者 - &GT;新(蚂蚁)
。结果
粘贴的蚂蚁文件的路径,进入目标
选项卡,然后点击设定目标
按钮旁边的自动生成
。结果
最后,点击<大骨节病>确定骨节病>,<大骨节病>确定骨节病>,<大骨节病>确定骨节病>。
- 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.
这篇关于日食:自动生成后保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!