Configure triggers for Ant build target
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 tool window, right-click the desired build target.
On the context menu of the target, choose Execute on.
On the submenu, choose Before Compilation or After Compilation, 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 Execute on.
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 checkboxes next to the types of execution that should trigger the selected Ant target, and click OK.
Thanks for your feedback!