Importing to an IDE

You can import a Maven project in IntelliJ IDEA in several ways. The most common approach is to open the pom.xml file directly.

  1. In the Welcome to IntelliJ IDEA screen, click Open.

    The welcome window is only shown when you close all projects in IntelliJ IDEA. If you don’t want to close your currently opened projects, you can select File  Open in the menu instead.

    Note that Import Project gives you more options to tweak the import process. However, this is out of the scope of this article.

  2. Find the extracted folder, and select the pom.xml file.

  3. Select Open as Project. This imports a project based on the POM file.

  4. IntelliJ imports the project and downloads all necessary dependencies. This can take several minutes, depending on your internet connection speed.

When the import is complete, your project structure will be similar to the following:

  • Java source files are in the src/main/java folder.

  • Test files are in the src/test folder (we’ll refer to these later).