Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create multi-project structure in Intellij IDEA like Visual Studio

I am basically from windows development background and used visual studio very much. Recently, I am asked to worked on Java and I find Intellij IDEA community edition. I have one question, like how can I create multiple project in one solution? where we just build the top level solution and all sub-project builds automatically?

Any idea or tutorial in this case would be really helpful.

like image 586
Omkar Avatar asked Oct 21 '16 11:10

Omkar


1 Answers

You can add multiple Maven or Gradle projects to your IntelliJ-Projects by using the plus-button in the Maven/Gradle Projects toolbar. This opens a file browser that allows you to choose an additional .pom/.gradle file to add a project.

Afterwards you can create Build-Actions that build both projects at the same time using Maven or Gradle. Or you build everything using the IntelliJ build (Menu -> Build -> Make Project).

enter image description here

Having said that, kardans solution works just as well and should always be preferred if you want to build all projects using the command line or continuous integration.

like image 99
Florian Sandro Völkl Avatar answered Oct 02 '22 02:10

Florian Sandro Völkl