You can configure triggers that execute Maven goals before or after certain events, for example, compiling, running, or testing. These triggers are called compilation triggers and execution triggers respectively.
- On the Maven Projects tool window, right-click the desired node (a phase of the lifecycle, or a plugin).
- On the context menu, click one of the options:
- Execute Before Make
- Execute After Make
- Execute Before Rebuild
- Execute After Rebuild
- Execute Before Run/Debug
