Using IntelliJ IDEA to run Maven goals

Finally, let us look at what IntelliJ IDEA provides.

How to do it...

To run Maven goals using IntelliJ IDEA, perform the following steps:

  1. Open the simple project in IntelliJ IDEA.
  2. Select Maven Projects:
    How to do it...
  3. Open Lifecycle and click on a suitable goal/phase:
    How to do it...

How it works...

Clicking on a Maven phase/goal invokes the corresponding Maven command and the same is executed. For instance, clicking on compile does the following:

There are also other configuration options provided by IntelliJ IDEA to customize Maven projects.

Get Apache Maven Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.