Right-click on the module, select "Add framework support...", and check the "Maven" technology.


(This also creates a pom.xml for you to modify.)
If you mean adding source repository elements, I think you need to do that manually–not sure.
Pre-IntelliJ 13 this won't convert the project to the Maven Standard Directory Layout, 13+ it will.
Answer from Dave Newton on Stack OverflowCan't add Maven support to existing project
java - How do you "Mavenize" a project using Intellij? - Stack Overflow
No matter how I create my Spring boot project, IntelliJ is unable to recognize the dependencies in pom file and more!
Does Intellij Automatically install Maven?
Videos
Right-click on the module, select "Add framework support...", and check the "Maven" technology.


(This also creates a pom.xml for you to modify.)
If you mean adding source repository elements, I think you need to do that manually–not sure.
Pre-IntelliJ 13 this won't convert the project to the Maven Standard Directory Layout, 13+ it will.
A visual for those that benefit from it.

After right-clicking the project name ("test" in this example), select "Add framework support" and check the "Maven" option.
The title pretty much sums up the issue but I will provide more context here. I am self learning Java so the error could be on me but I can't seem to get IntelliJ to do this.
I have a simple console application that I built and my next step in learning was to add Maven support (not suggested by me). I followed the instructions in the docs to a T but it seems to fail on step 5. Here is step 5:
"IntelliJ IDEA detects a Maven build script and displays a notification suggesting to load a Maven project. Click Load Maven Project. IntelliJ IDEA adds a default POM to the project and generates the standard Maven layout in Project tool window."
I've created the pom.xml file and clicked 'Load Maven Project' on the rare occasions that the button does pop up but I get nothing. It does not generate the standard Maven layout and I run into all kinds of errors when I try to do that manually.
Has anyone else ran into this? I am on version 2025.1.2 on IntelliJ btw.
EDIT: Turns out manually adding the project file structure was a skill issue on my part. I did not correctly import my files with the new files.
IntelliJ still does not automatically create the project structure as stated in their docs though.
For those that benefit from a visual, as I did:

Essentially, just right-click on the folder. In this example, it's called StackOverFlow and choose Add Framework Support and then check the Maven box. Please note, that this option only exists when you have created a class within the src folder.
Right-click on the module, select "Add framework support...", and check the "Maven" technology. (This also creates a pom.xml for you to modify.)