Intellij - Convert a Java Project/Module into a Maven Project/Module

IntelliJ - Convert a Java project/module into a Maven project/module

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

Sample Image

Sample Image

(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.

How do you Mavenize a project using Intellij?

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

Sample Image

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.

Add a local IntelliJ Project as Dependency for another Project via Maven

You need to use install, package and deploy commands of maven for module B to make it accessible for module A. These commands make a .jar file for module B which can be imported by module A. Models and classes in different artifacts can not be visible for each other unless you define their dependencies in pom file of the other module.

Multi-module project in IntelliJ

you can create an empty module and add your common maven libraries for all modules into that pom.xml file and after that create modules on that. if you want to add specific libraries for the sub module you can add them into the sub module. if you have any doubts please refer to this.
https://youtu.be/yVzi3wuTUE4



Related Topics



Leave a reply



Submit