IntelliJ IDEA 2023.3 Help

Maven. Runner

Use this page to configure settings for the external Maven that will be used to run goals.

Item

Description

Delegate IDE build/run actions to Maven

Select this checkbox to build, run, and debug code through Maven. It might be helpful if you have a configuration that changes the compilation on the fly, or your build generates an artifact with a custom layout.

For more information, refer to Maven projects.

VM Options

Specify VM options that will be passed to the selected JRE.

When specifying JVM options, follow these rules:

  • Use spaces to separate individual options, for example, -client -ea -Xmx1024m.

  • If an option includes spaces, enclose the spaces or the argument that contains spaces in double quotes, for example, some" "arg or "some arg".

  • If an option includes double quotes (as part of the argument), escape the double quotes using backslashes, for example, -Dmy.prop=\"quoted_value\".

  • You can pass environment variable values to custom Java properties. For example, if you define a variable MY_ENV_VAR, you can pass it to the foo property as follows:

    -Dfoo=${MY_ENV_VAR}

JRE

Select the JRE that will be used to run the Maven goals.

Environment variables

This field lets you set custom environment variables on the project level for running maven goals.

Specify an environment variable, for example, ${env.JAVA_VERSION} in the pom.xml of your project.

Environment variable in the pom.xml

Click Browse the Browse button to open the Environment Variables dialog, where you can set a value for the specified environment variable. For example, JAVA_VERSION=17.

Environment Variables dialog

Properties

Specify the properties and their values to be passed to Maven.

or Alt+Insert

Use this icon or shortcut to define a new property as a name - value pair.

or Enter

Use this icon or shortcut to change the selected property.

or Alt+Delete

Use this icon or shortcut to remove the selected properties from the list.

Skip tests

Check this option to skip performing unit tests. This corresponds to the Maven option -DskipTests=true.

Last modified: 15 March 2024