Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.6k views
in Technique[技术] by (71.8m points)

java - Open project with several subprojects in intellij

I have a project with the following structure

dtu-exam-project/
        ├── README.md
        ├── build_and_run.sh
        ├── docker-compose.yml
        ├── dtu-pay-account
        ├── dtu-pay-client
        ├── dtu-pay-log-api
        ├── dtu-pay-rest-api
        ├── dtu-payment-api
        ├── simple-dtu-pay-client
        └── simple-dtu-pay-server

All the folders in dtu-exam-projects/ are their own independent java projects.

I would like to open a new project in intellij with dtu-exam-projects/ as the root so that I can navigate to all the other projects within the same winodw. Therefore I click "open project", then naviagte to dtu-exam-projects/ and click on that. However, when the project has loaded then simple-dtu-pay-client is for some reason the root, and I can't navigate to the other projects. enter image description here

Why does this happen?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

IDE will try to open existing project defined in .idea directory. It may contain unexpected modules and content roots configuration.

Deleting this directory will force IDE to initialize the project from scratch when you try to open the root directory next time.

Another option is to open the Project Structure dialog and configured the modules and content roots manually.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...