That is the basic folder structure of a maven project. IntelliJ usually recognizes this and sets up sensical defaults for you.

If it didn't (or if it did but you modified them afterwards), you need to set up your java folder as the sources folder (i.e. the folder that contains the source code).

For this, you need to:

  1. Go to your project structure settings: File > Project Structure
  2. Select your project in the middle panel
  3. Select the 'sources' tab in the right panel
    • Note from a comment (thanks @Line): In IntelliJ 2018.3.5, you "select 'modules' tab in left panel".
  4. Navigate to the src/main/java folder and select it
  5. Mark it as Sources

Repeat for test folder (mark as 'Tests'), resources (mark as 'Resources'), test-resources (mark as 'Test Resources'), etc.

Answer from blurfus on Stack Overflow
🌐
JetBrains
jetbrains.com › help › idea › convert-a-regular-project-into-a-maven-project.html
Add Maven support to an existing Java project | IntelliJ IDEA Documentation
IntelliJ IDEA generates a standard Maven layout in the Project tool window. IntelliJ IDEA also creates a corresponding structure with Lifecycle and Repositories in the Maven tool window.
Discussions

java - How do you "Mavenize" a project using Intellij? - Stack Overflow
Connect and share knowledge within a single location that is structured and easy to search. Learn more about Teams ... I have seen many posts about using eclipse to Mavenize a project. Is there a easy way to do that in IntelliJ? More on stackoverflow.com
🌐 stackoverflow.com
java - Intellij maven structure - Stack Overflow
I am new on Intellij and have some troubles about checking out an existing maven project. In the past using eclipse when I check out an existing maven project it checks out the a pom file and the "src" folder to project explorer view, then I used to right click project, configure, configure as maven project. This used to create a file structure ... More on stackoverflow.com
🌐 stackoverflow.com
August 21, 2018
Have I got my javafx project correctly structured?

No, it's a Maven project and Maven expects your application code to be in /src/main/java. You currently have it in just /src. Also, package names are lowercase so your "Main" package/folder should be "main" instead.

More on reddit.com
🌐 r/IntelliJIDEA
5
0
September 30, 2024
I want to create a new project, and simply import the work from a previous project into it, but I cannot figure how to do it in IntelliJ IDEA...
Just copy and paste your project folder in your file manager, then open the new folder with IntelliJ. And presto, you now have a new project! More on reddit.com
🌐 r/IntelliJIDEA
7
8
January 17, 2023
🌐
JetBrains
jetbrains.com › help › idea › delegate-build-and-run-actions-to-maven.html
Maven projects | IntelliJ IDEA Documentation
In the Maven tool window, right-click a linked project. From the context menu, select Sync Project . On invoking this action, IntelliJ IDEA parses the project structure in the Maven tool window.
🌐
JetBrains
jetbrains.com › guide › java › tutorials › working-with-maven › creating-a-project
Creating a Maven project - JetBrains Guide
February 17, 2023 - If you're creating a simple project, you don't need to select an archetype. If you click on Artifact Coordinates you'll see more Maven settings. You can declare a group id, and the artifact id of the application itself. Press Create, and IntelliJ IDEA will generate the basic pom.xml file as well as the default directory structure for a Maven project with the source and test folders defined.
🌐
JetBrains
jetbrains.com › help › idea › project-settings-and-structure.html
Project structure settings | IntelliJ IDEA Documentation
November 18, 2025 - Project structure settings include the SDK, project compiler output paths, and project libraries.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206885365-Maven-project-structure
Maven project structure – IDEs Support (IntelliJ Platform) | JetBrains
April 23, 2007 - The fundamental reason of Maven putting everything in different directories is that they are trying to infer the purpose of a file from it's location. The top level contains only project files, src, target and sub-modules. This gives an uniform structure which allows the plugins to reason about the application structure and do their magic without explicit configuration.
🌐
JetBrains
jetbrains.com › help › idea › maven-support.html
Maven | IntelliJ IDEA Documentation
In the main menu, go to File | Project Structure Ctrl+Alt+Shift+S. In the dialog that opens, in Project SDK, specify the JDK version and click OK to save the changes. When IntelliJ IDEA runs Maven goals, it will use the JDK version specified ...
Find elsewhere
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 206842715-Project-Structure
Project Structure – IDEs Support (IntelliJ Platform) | JetBrains
August 1, 2014 - The typical structure is: project-root +--module-1 | +--src | +--module-1.iml +--module-1 +--src +--module-2.iml · If you have a multi-module maven project (for example that you checked out from source control), you can simply use File > Import Project then select the parent/root pom.xml file in the file chooser and click OK.
🌐
Medium
medium.com › @iamfaisalkhatri › what-is-maven-and-how-to-create-maven-project-using-intellij-6c1924edba04
What is Maven and how to create Maven Project using IntelliJ? | by Mohammad Faisal Khatri | Medium
December 9, 2024 - Congratulations, we have created the Maven Project successfully using IntelliJ. ... Maven automatically creates the project structure for you. Hence you don’t have to worry about organizing your project folders.
🌐
JetBrains
jetbrains.com › guide › java › tutorials › working-with-maven › importing-a-project
Importing a Maven project - JetBrains Guide
February 17, 2023 - You can select the root of the ... and you want to use this model for your project structure, it's simplest to select the top-level pom.xml file, and the IDE will know you ......
🌐
javathinking
javathinking.com › blog › how-do-you-mavenize-a-project-using-intellij
How to Mavenize a Project in IntelliJ: Step-by-Step Guide to Setting Up Directory Structure & pom.xml — javathinking.com
IntelliJ will generate a pom.xml file in the project root. You’ll now need to restructure your project to match Maven’s conventions (see Step 2). Maven enforces a standard directory layout, which ensures consistency across projects.
🌐
JetBrains
jetbrains.com › guide › java › tutorials › configuring-intellij-idea › configuring-project-structure
Configuring Project Structure - JetBrains Guide
February 17, 2023 - Summary - Configuring IntelliJ ... with ⌘; (macOS) / Ctrl+Alt+Shift+S (Windows/Linux). The most important thing to note is that if you're using a build system such as Maven, or Gradle, they will override settings in your Project Structure...
🌐
Medium
medium.com › ai-qa-nexus › a-comprehensive-guide-to-creating-a-simple-maven-project-and-understanding-its-structure-c84a02c240b3
A Comprehensive Guide to Creating a Simple Maven Project and Understanding Its Structure | by Suresh Madhusanka Rodrigo | AI & QA Nexus | Medium
September 8, 2024 - A Comprehensive Guide to Creating a Simple Maven Project and Understanding Its Structure Required Tools and Technologies Integrated Development Environment (IDEs) (Ex: Intelli J Idea, Eclipse or …
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360007424799-Opening-a-complex-project-structure-with-Maven-modules
Opening a complex project structure with Maven modules – IDEs Support (IntelliJ Platform) | JetBrains
February 9, 2020 - Hi! I want to work on projects where a repository contains a number of Maven modules in subdirectories. These modules are basically separate projects with their own src directories etc, that are gr...
🌐
IronPDF
ironpdf.com › ironpdf for java › blog › using ironpdf for java › intellij maven
Working with Maven Projects in IntelliJ | IronPDF for Java
April 22, 2026 - Open IntelliJ IDEA and go to File > Project Structure. In the dialog that opens, under Platform Settings, click on SDKs. Click the + button and navigate to the location of your installed JDK.
🌐
TestingDocs
testingdocs.com › home › intellij idea › create maven project with intellij idea [ 2024 ]
Create Maven Project with IntelliJ IDEA [ 2024 ] | TestingDocs
June 22, 2025 - IntelliJ IDEA has excellent built-in support for build tools like Ant, Maven, and Gradle. We can create blank projects or Maven projects based on the Maven archetype.
🌐
YouTube
youtube.com › automation step by step
IntelliJ IDEA Beginner Tutorial | How to create Maven Project - YouTube
After watching take this Quiz - https://automationstepbystep.com/2021/08/17/maven-quiz/All FREE courses - https://automationstepbystep.com/Today we will lear...
Published   August 17, 2021
Views   154K
🌐
LinkedIn
linkedin.com › learning › intellij-idea-community-edition-essential-training-2 › explore-the-structure-of-a-java-project
Explore the structure of a Java project - IntelliJ IDEA Community Edition Essential Training Video Tutorial | LinkedIn Learning, formerly Lynda.com
January 26, 2021 - Now, as you add more capabilities to your project say if you're using dependencies and you're using the Maven or Gradle Frameworks, you'll see more directories and more configuration files. This is just the simplest structure that you're going to see when you create a brand new Java project in IntelliJ IDEA.