# Profile Maven goals

> **TL;DR**
> Profiler home page: `View | Tool Windows | Profiler`

In IntelliJ IDEA, you can profile several goals:

* [Maven Failsafe Plugin](https://maven.apache.org/surefire/maven-failsafe-plugin/): `failsafe:integration-test`

* [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/): `surefire:test`

* [Exec Maven Plugin](https://www.mojohaus.org/exec-maven-plugin/): `exec:exec` and `exec:java` Make sure to specify the `mainClass` argument for `exec:java`. You can do that in your `pom.xml` or in the Command line field in the corresponding run/debug configuration. For more information, refer to the [Exec Maven Plugin documentation](https://www.mojohaus.org/exec-maven-plugin/java-mojo.html#mainClass).

Procedure:

1. In the main menu, go to `View | Tool Windows | Maven`.

2. In the Maven tool window, right-click the goal that you want to profile and select Profile with IntelliJ Profiler.

IntelliJ IDEA creates a temporary [run configuration](run-debug-configuration.html) that you can [save](run-debug-configuration.html#save-as-permanent) and rerun later.

If you already have a Maven run/debug configuration for the required goal, you can [profile it the same way](create-a-profiling-report.html#start-with-profiler) as any other run configuration.

## Limitations

Currently, there are several limitations for profiling Maven goals:

* Profiling tools in IntelliJ IDEA do not support Maven profiles, executions, and versions. That is why, some complex configurations might not profile correctly.

* Profiling of specific versions of the mentioned goals is not supported (for example: `org.codehaus.mojo:exec-maven-plugin:3.0.0:exec`).

* You cannot profile the goals if they are configured in a way that more than one process is created during their execution.

* Profiling of the `exec:exec`, `surefire:test`, and `failsafe:integration-test` goals is possible only in projects without modules. You can, however, profile a specific module provided that it has no sub-modules.

* Profiling is not possible if there are certain arguments in a plugin configuration: * `commandlineArgs` in the `exec:exec` plugin configuration * `debugForkedProcess` in the `surefire:test` and `failsafe:integration-test` plugin configurations

* If the Exec Maven Plugin configuration has `<arguments>` in `pom.xml`, the values in `<arguments>` are skipped during the execution of the `exec:exec` goal.

