如何使用 Ant 在 Eclipse 中进行清理和构建

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2590407/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:36:10  来源:igfitidea点击:

How to do clean and build in eclipse using Ant

eclipseantbuild

提问by Manu

Is it possible to do clean and build a project using ant in eclipse

是否可以在 Eclipse 中使用 ant 进行清理和构建项目

采纳答案by Andrea Polci

In addition of the answer from Wing C. Chen, if you are looking for a way to interact with eclipse from ant, this may help you: Ant tasks provided by the platform.

除了Wing C. Chen的回答,如果您正在寻找一种与来自ant的eclipse交互的方式,这可能对您有所帮助:平台提供的Ant任务

There you can find some task to interact with the platform, like one to cause eclipse to do an incremental build.

在那里您可以找到一些与平台交互的任务,例如使 eclipse 进行增量构建的任务。

回答by Winston Chen

You can execute any ant "target" in eclipse. Open then the build.xml, click the "outline" view, and you will see the targets listed in green bubble from. Right-click the one that you would like to run, select "run as", and then "ant build". You should be able to run the target up already.

您可以在 Eclipse 中执行任何蚂蚁“目标”。然后打开build.xml,单击“ outline”视图,您将看到从绿色气泡中列出的目标。右击你想运行的那个,选择“ run as”,然后选择“ ant build”。您应该已经能够运行目标了。