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.
(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:
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
Scheduledexecutorservice Exception Handling
Invalid Signature File Digest for Manifest Main Attributes Exception While Trying to Run Jar File
Differencebetween Declaration and Definition in Java
Java String.Indexof and Empty Strings
What Does an Integer That Has Zero in Front of It Mean and How to Print It
Preparedstatement Syntax Error
Spring 3 MVC: One-To-Many Within a Dynamic Form (Add/Remove on Create/Update)
Noclassdeffounderror While Trying to Run My Jar with Java.Exe -Jar...What's Wrong
Can an Interface Extend Multiple Interfaces in Java
How to Set Base Url for Rest in Spring Boot
How Does the JPA @Sequencegenerator Annotation Work
Xml Element with Attribute and Content Using Jaxb