views:

213

answers:

2

Hi

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

+2  A: 

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.

Winston Chen
+2  A: 

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.

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

Andrea Polci
Thanks for the info, man!!
Winston Chen
Thanks Andrea. Syntax is <eclipse.incrementalBuild project="ProjName" kind="clean"/>