Search code examples
javaspring-bootintellij-idea

How to configure and structurize subproject using Intellij


Regarding the Joe Grandja presentation on OAuth2.0 in Spring Security 5.0 in the exact linked moment 5:01 enter image description here the project messaging-app is containing two "subprojects": client-app and resource-server, which are separate gradle/maven projects.

Here are the subprojects repo.

However, in IntelliJ - under Project window - both subprojects seems to be "joined"/structured somehow UNDER the messaging-app parent project, which is like a container project for both of them.

Questions:

  1. How to achieve this kind of structure in IntelliJ for two (or more) separate maven/gradle projects under third parent project? I assume that the subprojects' codebase is not under parent directory of parent proejct.

  2. Are those child projects considered as IntelliJ modules?


Solution

  • If the projects you want to see in the Project View do not have a common parent/aggregate project that can be imported in IntelliJ IDEA, do the following:

    1. Create a new empty project (without any modules) via the wizard

    2. Add the modules manually in the Project Structure | Modules dialog, click the + button, Import, point to the location of the build.gradle or pom.xml file you want to be in the project.