You can add multiple Maven or Gradle projects to your IntelliJ projects using the plus button on the Maven / Gradle Projects toolbar. This opens a file browser that allows you to select an additional .pom / .gradle file to add the project.
You can then create Build-Actions that simultaneously create both projects using Maven or Gradle. Or you build everything using the IntelliJ build (Menu → Build → Make Project).

Having said that, the 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.
source
share