Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you "Mavenize" a project using Intellij?

I have seen many posts about using eclipse to Mavenize a project. Is there a easy way to do that in IntelliJ? From what I understand about "Mavenize", it's just add some xml in pom.xml and the directory structure is in src/main/java, src/main/test ....

like image 639
Billz Avatar asked Sep 20 '12 07:09

Billz


People also ask

How do I clean up and rebuild a project in IntelliJ?

To clean up the local working copy, do one of the following: Select the desired file or directory in the Project tool window and choose Subversion | Cleanup from the context menu of the selection. Open the desired file in the editor and choose VCS | Subversion | Cleanup from the main menu.

How do I mark a project as Maven in IntelliJ?

In the Project tool window, right-click your project and select Add Framework Support. In the dialog that opens, select Maven from the options on the left and click OK. IntelliJ IDEA adds a default POM to the project and generates the standard Maven layout in Project tool window.


2 Answers

For those that benefit from a visual, as I did:

enter image description here

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.

like image 155
kgui Avatar answered Oct 13 '22 05:10

kgui


Right-click on the module, select "Add framework support...", and check the "Maven" technology. (This also creates a pom.xml for you to modify.)

like image 22
Victor Avatar answered Oct 13 '22 06:10

Victor