Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
800 views
in Technique[技术] by (71.8m points)

ant - eclipse: auto build after save

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You could declare your script as a builder, and make it run "during auto build".

Launch configuration properties

See the properties of your project: you can add an external program (above) or an an script (below).

Target

If you can export your script as an ant script, like the OP David B did in his answer, it becomes quite easy:

  1. Export as an ant script: right-click the project -> export -> runaable jar file, tick "save as ANT script" and finish.
  2. 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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...