How to mark / import subfolders as Maven projects in IntelliJ?

I imported a project from git where the topmost folder doesn't contain any pom file. It has a src folder and some java files underneath.

At the same time it has several subfolders with pom files in each.

How can I make IntelliJ think they are projects?

+3


source to share


2 answers


How can I make IntelliJ think they are projects?

You can add them as modules to your IDEA project. Open Maven tool window and use add button enter image description hereto add them.



If you want each one to be a separate IDEA project, just use File> Project from Existing Sources for each one and select the pom.

+7


source


You might also consider creating a "super pom" file in the root, which has a section <modules>

that defines a subfolder of each of the various modules, containing their own pom.xml files.

Superpom packaging should be pom

.



If the sub module pom.xml files are configured using the parent

super pom, you can centralize the configuration properties in one place, as well as the ability to create all modules by simply creating a parent pom.

+1


source







All Articles