IntelliJ IDEA 2017.1 Help

Configuring Triggers for Maven Goals

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.