# Maven

> **TL;DR**
> IntelliJ IDEA supports the Maven version 3.1 and later.
>
>
>
> The default bundled Maven version is [3.9.11](https://maven.apache.org/docs/history.html).
>
>
>
> Starting with the IntelliJ IDEA version 2025.1, Maven version 4 is available.

IntelliJ IDEA supports a fully functional integration with [Maven](https://maven.apache.org) that helps you automate your building process. You can create a new Maven project, open and sync an existing one, [add a Maven support](convert-a-regular-project-into-a-maven-project.html) to any existing IntelliJ IDEA project, configure and manage a multi-module project.

You can also create a Maven project and store it in the WSL environment or open it from the WSL file system. For more information, refer to the [WSL](how-to-use-wsl-development-environment-in-product.html) section.

> **Note:**
> If you want to use a custom Maven version that is not bundled with IntelliJ IDEA, you need to [install it
> locally](#maven2_install).

Procedure: Create a new Maven project

1. If no project is currently open in IntelliJ IDEA, click New Project on the Welcome screen. Otherwise, select `File | New | Project` from the main menu.

![New project Maven](https://resources.jetbrains.com/help/img/idea/2026.2/new%20_project_maven.png)

2. Name the new project and change its location if necessary.

3. Select Create Git repository to place the new project under version control.

You will be able to do it later at any time.

4. Select a language that you want to use in your project. Click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg)  if you want to add other languages available via plugins.

5. Select Maven in the list of Build system.

6. Specify the project's SDK (JDK) or use the default one.

7. The selected Add sample code option will create a file with a basic code sample.

8. In Advanced Settings, specify the following [Maven coordinates](https://maven.apache.org/pom.html#Maven_Coordinates) that are added to the `pom.xml` file:

* GroupId - a package of a new project.

* ArtifactId - a name of your project.

For more information about Maven coordinates, refer to [Maven naming conventions](https://maven.apache.org/guides/mini/guide-naming-conventions.html).

9. Click Create.

IntelliJ IDEA creates a Maven project with the `pom.xml` file that includes compiler source and target versions of Java, the dedicated Maven tool window, and all the necessary dependencies to start your work.

> **Note:**
> The version of Java specified in the `pom.xml` file overrides the version specified in the JDK for Importer option, located in the [Maven](maven-importing.html) settings.

Procedure: Create a new project with Maven archetype

1. Launch the [New Project wizard](new-project-wizard.html). If no project is currently opened in IntelliJ IDEA, click New Project on the welcome screen. Otherwise, select `File | New | Project` from the main menu.

![Maven archetype](https://resources.jetbrains.com/help/img/idea/2026.2/maven_archetype.png)

2. Select [Maven Archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) from the options on the left.

3. Using options on the right, configure your project:

* Name: specify the name of your project.

* Location: specify the location of your project.

* Create Git repository: Select the Create Git repository to place the new project under version control. You will be able to do it later at any time. > **Note:** > The `.gitignore` file is generated in any case.

* JDK: specify project's SDK (JDK) or use the default one.

* Catalog: specify which Maven repository you want to use in your project. The [internal Maven catalog](https://maven.apache.org/archetype/archetype-common/internal.html) is a default one. You can also select the local repository that is located in the `.m2` directory, or you can select [Maven central repository](https://maven.apache.org/repository/). You can also click Manage Catalogs and add a custom repository if you need.

* Archetype: select the needed [Maven archetype](https://maven.apache.org/archetype/index.html). Click Add to specify the custom archetype.

* Version: the version is specified automatically.

* Additional properties: add additional properties

> **Note:**
> If you are creating a project using a [Maven
> archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html), IntelliJ IDEA displays the [Maven settings](new-projects-from-scratch-maven-settings-page.html) that you can use to set the Maven home path and Maven repositories. Also, you can check the archetype properties.
>
>
>
> To modify or add archetype catalogs later in your project, refer to the [Archetype Catalogs](archetype-catalogs.html) settings.

Procedure: Create a Jakarta EE project with Maven as a build tool

1. Launch the [New Project wizard](new-project-wizard.html). If no project is currently opened in IntelliJ IDEA, click New Project on the welcome screen. Otherwise, select `File | New | Project` from the main menu.

2. Select Jakarta EE from the list of generators.

3. Leave the default option Maven as your build tool system.

4. Select additional libraries and frameworks.

5. Specify your project's name, location, and [artifact coordinates](#maven_coordinates). Click Create.

IntelliJ IDEA creates a Maven project with the dedicated Maven tool window and adds necessary dependencies.

For the more detailed information, refer to [Tutorial: Your first Jakarta EE application](creating-and-running-your-first-jakarta-ee-application.html).

Procedure: Open an existing Maven project

1. Go to `File | Open`.

Alternatively, click Open on the welcome screen.

> **Note:**
> If you have some custom plugins that require you to import your project from the IntelliJ IDEA model, press `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)) and search for the Project from Existing Sources action.

2. In the dialog that opens, select the `pom.xml` file of the project you want to open.

Click OK.

3. In the dialog that opens, click Open as Project.

IntelliJ IDEA opens and syncs the Maven project in the IDE. If you need to adjust importing options when you open the project, refer to the [Maven settings](maven-importing.html). For example, if you have Maven options configured in the `maven/config` file and want to use them in your project, select the [Use settings from .mvn/maven.config](maven.html#maven_config) option in the Maven setting.

> **Tip:**
> If you have a Maven project with the configured Maven wrapper then IntelliJ IDEA will take the Maven version from the `maven.properties` file and add it as the Maven home path.

Procedure: Configure the Maven settings before opening a new project

You can configure IntelliJ IDEA to display Maven settings before you open a new Maven project. (A new Maven project in this case is the existing project that you open in IntelliJ IDEA for the first time.) Since these are application-level settings, they are applied to any new project you open.

1. On the Welcome screen, select `Customize | All Settings`.

Alternatively, go to `File |New Project Setup | Preferences for New Projects` in the main menu.

2. In the Settings dialog, select `Build, Execution, Deployment | Build Tools | Maven`.

3. In the Maven settings dialog, select the Show settings dialog for new Maven projects.

4. Click OK to save the changes.

Next time you open a new project, IntelliJ IDEA displays the Maven Settings dialog where you can specify a location of the local Maven repository and a user settings file.

![Maven Settings](https://resources.jetbrains.com/help/img/idea/2026.2/maven_settings_new_project.png)

Procedure: Add a new Maven module to an existing project

You can add a Maven module to the project in which you are already working.

1. In the Project tool window, right-click the project folder and select `New | Module`. Alternatively, go to `File| New | Module` in the main menu to open the New Module wizard.

2. If you used the main menu to add a module, then the process of adding a module is the same as [Creating a new Maven project](#maven_create_project).

If you are adding submodules by right-clicking the root folder then the process of adding a new module is shorter. You need to specify the name of your module in the Name field. The rest of the information is added automatically, and you can use either the default settings or change them according to your preferences.

Procedure: Configure a multi-module Maven project

You can create a [multi-module Maven project](https://maven.apache.org/pom.html#Aggregation) in IntelliJ IDEA. The multi-module project is defined by a parent POM file with several submodules.

> **Note:**
> If you have the Maven version 3.7 or later installed, IntelliJ IDEA will support importing a project from the [MNG-6656 model](https://issues.apache.org/jira/browse/MNG-6656).
>
>
>
> In this case when you open a child POM file in the editor, you don't have to specify a version inside the `parent` tags if it is located in the `relativePath` by default. If you add a dependency to a module in the same project, you don't have to specify a version of the dependent module.

1. [Create a  Maven parent project](#maven_create_project). IntelliJ IDEA creates a standard Maven layout including an `src` folder.

2. In the Project tool window, remove the `src` folder since you would only need it in the [very rare cases](https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html). For your general project, you don't need the `src` folder for the parent POM.

3. In the Project tool window, right-click your project (or in the main menu, go to File) and select New | Module to add a subproject.

4. In the New Module wizard following the instructions on [how to add a module](#add_module_Maven), specify the necessary information and click Finish.

The `src` folder is created automatically, and you can open POM and add a packaging that you need. IntelliJ IDEA adds the module to the parent project. IntelliJ IDEA also adds name and the description of the subproject to the parent POM.

![the parent POM](https://resources.jetbrains.com/help/img/idea/2026.2/maven_parent_pom.png)

> **Note:**
> In a multi-module project, the parent POM needs to have a `pom` packaging.

Last, but not least, IntelliJ IDEA adds the description of the parent POM to the subproject's POM.

![the subproject POM](https://resources.jetbrains.com/help/img/idea/2026.2/maven_module_pom.png) You can click ![the Parent POM icon](https://resources.jetbrains.com/help/img/idea/2026.2/maven.images.parentProject.svg) in the left gutter to quickly open the parent POM from your subproject.

5. You can also add dependencies to the parent POM that will be inherited by the subprojects.

![Parent POM: added dependency](https://resources.jetbrains.com/help/img/idea/2026.2/maven_parent_pom_dependency.png)

6. Open Maven tool window to see that all changes made in the parent POM are reflected in subprojects.

![the Maven tool window](https://resources.jetbrains.com/help/img/idea/2026.2/maven_global_dependency.png)

Procedure: Access the Maven settings

Use the [Maven settings](maven.html) to configure options such as Maven version, local repository, offline mode, and so on.

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))) , go to `Build, Execution, Deployment| Maven`.

> **Tip:**
> Click ![Maven Settings](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.settings.svg) on the toolbar, in the Maven tool window to access the Maven settings.

2. On the Maven settings page, configure the available options and click OK to save the changes.

Procedure: Use the Maven wrapper or a custom version of Maven

> **Note:**
> The Maven2 version is not bundled with IntelliJ IDEA. If you need to use it in your project, download and enable the [Maven2 support](https://plugins.jetbrains.com/plugin/19663-maven2-support) plugin.
>
>
>
> For a custom version, [Download](https://archive.apache.org/dist/maven/) the needed Maven version on your computer.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Build, Execution, Deployment | Build Tools |  Maven`.

2. On the Maven settings page, in the Maven home path field, specify the location of the Maven custom version installation.  For the Maven wrapper, select the use Maven wrapper option from the list. In this case the version of Maven defined in the `.mvn/wrapper/maven-wrapper.properties` file will be used.

![the Maven settings: Maven home path](https://resources.jetbrains.com/help/img/idea/2026.2/maven_settings_home_path.png)

3. Click OK.

## Change the JDK version in a Maven project

There are several places where you can change the JDK version that will affect not only your current project, but the whole application as well.

Procedure: Change the JDK version in the Project Structure

Changing the JDK version in the Project Structure dialog will only affect the current project.

1. In the main menu, go to `File | Project Structure` `Ctrl+Alt+Shift+S` (Windows), `⌘ ;` (macOS), `⌘ ;` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ Comma` (macOS System Shortcuts), `Ctrl+Alt+Shift+S` (XWin), `Ctrl+Alt+Shift+S` (GNOME), `Ctrl+Alt+Shift+S` (KDE), `Ctrl+Alt+Shift+S` (Emacs), `Ctrl+Alt+Shift+S` (Sublime Text), `⌘ ;` (Sublime Text (macOS)), `Ctrl+Alt+Shift+S` (NetBeans), `Ctrl+Alt+Shift+S` (Visual Studio), `⌘ ;` (Visual Studio (macOS)), `Ctrl+Alt+Shift+S` (Eclipse), `⌘ ;` (Eclipse (macOS)).

2. In the dialog that opens, in Project SDK, specify the JDK version and click OK to save the changes.

![Project Structure dialog / Project page](https://resources.jetbrains.com/help/img/idea/2026.2/maven_project_sdk.png)

Procedure: Change the JDK version for the Maven runner

When IntelliJ IDEA runs Maven goals, it will use the JDK version specified for the Maven runner. By default, IntelliJ IDEA uses the [project's JDK](#project_structure_maven).

Changing the JDK for the Maven runner will only affect the current project.

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Build, Execution, Deployment | Maven | Runner`.

2. On the [page](maven-runner.html) that opens, in the JRE field, select the JDK version.

![Maven Settings / Runner page](https://resources.jetbrains.com/help/img/idea/2026.2/maven_jre.png)

Procedure: Change the JDK version for the Maven importer

Changing the JDK version for the Maven importer will affect the whole application since it is a part of the Maven global settings. If you want to use the same [JDK version](#project_structure_maven) as you use in your project for syncing or resolving dependencies, change the JDK version for the importer.

https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Build, Execution, Deployment | Maven | Importing`.

2. On the [page](maven-importing.html) that opens, in the JDK for importer field, select the same JDK version as you used in the [Project Structure](#project_structure_maven) and click OK to save the changes.

![Maven Settings / Importing page](https://resources.jetbrains.com/help/img/idea/2026.2/maven_jdk_importer.png)

## See also

### Procedures

[Add Maven support to an existing Java project](convert-a-regular-project-into-a-maven-project.html) [Maven projects](delegate-build-and-run-actions-to-maven.html)

