We build in maven multiple projects (let's name them A,B,C). Project A uses .jar of project B which uses .jar of project C.
I am modifying codes of all A/B/C projects, (A is MVC app, B are business services and C is some shared layer).
The thing is, in Eclipse/NetBeans I can see all of them at once and it's comfortable to modify them. In IDEA though, I have to open 3 instances (or n instances) of IntelliJ IDEA.
Am I missing something? Is there better approach when using IntelliJ? This is the biggest downside of IntelliJ for me atm.
To expand @Neo answer: after choosing your directory. select
import module from external model
and choose your model (maven in this case).Then check
keep project files
option from next dialog. It will keep all files in original directory.Your final project structure would be something like this.
Now you can add your module as dependency to other module's
pom.xml
and if you change the source code of your dependencies, Intellij takes care of updating your project (there is no need to runmvn
build manually for dependencies)Prequisite
Having all the related projects in the same root directory.
Steps
1) First you create a new Empty project
2) Then you select the root directory of all you projects.
This will create a empty project, with a .idea directory that will simply remember the module organisation we are about to do in the next step
3) Then, in the next window, you import the different projects as modules
4) In the next window, to import each project, simply double click on the build.gradle, or pom.xml
The project will be imported as a new module.
5) Done, you now have all your projects as modules, opened on the same IntelliJ project
You can use Armory plugin which makes switching between projects comfortable. The default shortcut for Project List is Alt + A.
By default currently opened projects are displayed at the top of this list (with bold style).
Please follow these steps:
Step 1: Open "Maven Projects"
Step 2: Select project you want to import:
There is no need to move entire projects to a module. The use case for module is a bit finer grained than as a project container.
To open multiple projects in the same window:
File -> Open Project
Select open in this window.
Check box that says add to current project.