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.
- 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

Associating maven goals with keyboard shortcuts
You can associate a Maven goal with a keyboard shortcut and execute commonly-used goals with a single key-stroke. In a Maven project, its goals appear under the Maven goals node in the Keymap dialog.
- In the Maven Projects tool window, right-click the desired goal.
- On the context menu, choose . Keymap dialog appears.
- Configure keymap, as described in the section Configuring Keyboard Shortcuts.
Executing a maven goal
There are two ways to execute a Maven goal:
-
Use Run Goal command, which produces the same result as
launching
mvnfrom the command line. - Run the Maven goal as an application with a Maven-specific run/debug configuration, which can be stored and reused for debugging Maven plugins.
Results are displayed in the console of the Run tool window.
- Select the desired node in the Maven Projects tool window.
- Choose on the context menu of the selection.
- Perform the regular procedure, as described in the section Running Applications.
- Perform the shortcut
procedure, which uses a Maven-specific run/debug configuration for each goal:
Select the desired node in the Maven Projects tool window, and choose Run <goal>[run/debug configuration] on the context menu, or press Ctrl+Shift+F10.