You can configure triggers that run Ant targets before or after certain events, for example, compiling, running, or testing. These triggers are called compilation trigger and execution trigger respectively.
- On the Ant Build Tool Window, right-click the desired build target.
- On the context menu of the target, choose .
- On the submenu, choose or , as required. Note that you can set up both options.
- On the Ant Build tool window, right-click the desired build target.
- On the context menu of the target, choose .
- On the submenu, choose Before Run/Debug. Execute Target Before Run/Debug dialog appears, presenting the list of possible execution types.
- In the dialog, select check boxes next to the types of execution that should trigger the selected Ant target, and click OK.