You can start a debugging session for a single Maven goal or a Maven run configuration that may contain more than one Maven goal. You can also select a goal in the Maven tool window and start a debugging session. You can create a regular debug configuration for one or several Maven goals. The goal is added to the list under the Maven node. In the dialog that opens, select a goal you need and click OK. In the Keymap dialog, under the Maven node, click Choose a phase/goal to assign a shortcut. While in the Keymap dialog, you can add a new goal to which you want to assign a shortcut. The shortcut is displayed against your goal in the Maven tool window. In the dialog that opens, depending on the shortcut's type, configure your shortcut and click OK. Right-click the goal and from the list that opens, select a type of the shortcut you want to assign. In the Keymap dialog, under the Maven node navigate to your goal. In the Maven tool window, right-click the desired goal.įrom the context menu, select Assign Shortcut. You can associate a Maven goal with a keyboard shortcut and execute goals with a single key. In the Select Maven Goal dialog, specify a project and a goal that you want to execute before launching the project.Īssociate Maven goals with keyboard shortcuts In the list that opens, select Run Maven Goal. In the Run/Debug Configurations dialog, in the Before Launch section, click. You can also create a run/debug configuration that would depend on a Maven goal.įrom the main menu, select Run | Edit Configurations to open the run/debug configuration for your project. The name of the activation is added to the selected goal in the Maven tool window. If the rebuild action is delegated to Maven, then the Maven clean,install commands are executed.
When you use Execute Before Rebuild, the goal with such trigger is executed before you run the project's rebuild action ( Build | Rebuild Project). If the build action is delegated to Maven, then the Maven install command is executed. In the list that opens, right-click the goal for which you want to set a trigger.įrom the context menu, select an activation phase.įor example, when you use the Execute Before Build action as a trigger, the goal with such trigger is executed before you run the project's build action ( Build | Build Project). In the Maven tool window, click Lifecycle to open a list of goals. IntelliJ IDEA lets you run Maven goals before your project's execution or set other conditions using the goal activation configuration. IntelliJ IDEA displays the goal under the Run Configurations node.ĭouble-click the goal to run it or right-click the goal and from the context menu select Run. In the Create Run/Debug Configuration: 'goal name' dialog, specify the goal settings (you can specify any Maven commands and arguments) and click OK. (To select several Maven goals, press Ctrl and highlight the desired goals.)įrom the list select Modify Run Configuration. Right-click a goal for which you want to create a Run configuration. IntelliJ IDEA lets you create a run configuration for one specific goal or a set of several goals. Run a Maven goal or a set of goals via Run configuration
IntelliJ IDEA runs the specified goal and adds it to the Run Configurations node.
Right-click the desired goal and from the context menu select Run 'name of the goal'. In the Maven tool window, click Lifecycle to open a list of Maven goals. IntelliJ IDEA runs the selected goal and displays the result in the Run tool window.
#Maven install goal Offline#
If you have options such as offline mode, profiles, or skip test configured for the project, IntelliJ IDEA will automatically include the configuration into the running scope. If you have a multi-module project and need to execute a goal from the specific module then in the Run Anything window, in the top-right corner, from the Project list, select a module, or a directory you need and in the search field enter the goal's name. The window also displays a list of recent Maven goal entries. In the Run Anything window, start typing a name of the goal you want to execute. Alternatively, press Ctrl twice to open the Run Anything window. In the Maven tool window, on the toolbar, click the button.
Run a Maven goal from the Run Anything window You can use several ways to run Maven goals such as use the Run Anything window, use the context menu in the Maven tool window, or create a run configuration for one or several Maven goals. IntelliJ IDEA lets you run, debug and manage Maven goals in your project.