Every repository with this icon (
Every repository with this icon (
idea
The Maven CLI Plugin can install an IDEA plugin that allows you to execute fast CLI commands with a single keystroke. The IDEA plugin sets up three actions for executing three separate commands via keystrokes. The commands themselves are configurable.
Installation
The IDEA plugin can be installed from the Maven CLI Plugin itself. Execute the “idea” goal to have the Maven plugin extract and install the IDEA plugin into your IDEA installation. At a minimum, it will look like this:
mvn cli:idea
This example installs the plugin into my personal settings directory so that it is only active for my user by automatically discovering my IDEA personal directory. Alternatively, you can use the following system properties:
| System Property | Description |
|---|---|
| idea.plugins | The location of the exact directory you want the plugin to be extracted into |
| idea.home | The location of either your IDEA installation or user directory, and the plugin will try to guess the correct plugin subdirectory. |
Usage
The Maven CLI plugin can be completely configured and controlled within IDEA.
Start the Maven CLI Plugin from within IDEA
Before you can execute commands via keystrokes, you probably want to run the Maven CLI Plugin from within IDEA. This step isn’t required, but it does minimize alt-tab’ing between your terminal and IDE.
First, create a Configuration that executes the “cli:execute” goal using the IDEA Maven Plugin (assuming you have it enabled, of course):

Also set the system property to listen on port 4330 for remote commands:

When you run the Configuration, you should see something like this:

Execute the command via a keystroke
There are three commands you can bind to keystrokes, and they default to Shift-Control-F1, Shift-Control-F2, Shift-Control-F3, respectively. If you execute the first one, you’ll see something like this in your console:

Customize the commands
You can customize the commands that are bound do the keystrokes per project:

Customize the keymap
Like other IDEA actions, you can bind the commands to any key stroke you’d like:







