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 projec
Step 1: Open "Maven Projects"
Step 2: Select the project you want to import:
Having all the related projects in the same root directory.
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
The project will be imported as a new module.
I think this has improved with recent versions of IntelliJ. In my current version (12.0.2), you can add any number of separate Maven projects to the same "workspace".
The simplest way I've found to do this is to click the little +
icon in the "Maven Projects" window (View > Tool Windows > Maven Projects) and then select the additional pom file you want to import.
you can use import module option which will open it just like eclipse in the same navigator.
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 run mvn
build manually for dependencies)
In IntelliJ 14.1.2, I did it like following:
Select File
->Project Structure
->Modules
.
Select +
and Import Module
and select the directory of your project(or directory where pom exists) and click OK.
Follow through the next flow of screens and after you click Finish
, you should see the project alongside your existing one.