It is recommended to add the function of importing modules in batches, because importing modules one by one is too troublesome.
Answered
It is recommended to add the function of importing modules in batches, because importing modules one by one is too troublesome.
Please sign in to leave a comment.
哈哈看了你的头像,感谢。
For example, I created an Empty Project abc with 60 submodules in it. One day, abc project could not be opened by idea due to the loss of related files, so I need to create a new empty project named xyz. Then import the 60 submodules into xyz's empty project one by one, one by one is too cumbersome.
Generally, if there are modules not imported, IDE will notify the users when it opens the project root.
If the modules are defined in .iml files, and as you mentioned the modules are gone due to some reason, you can try to restore the .idea/modules.xml file and reopen the project. There are modules definitions in that xml file.
Another way to add modules is to right-click on the .iml / pom.xml / build.gradle files inside the sub modules and select add / load them menu.
In my case, only the new module, parent project iml file or other files in the parent project are all gone, in this case, i create new empty project , next step can only one import?
Usually, you can put these files in a version control system, like Git. So far there is no batch way to import modules unless they are using Gradle/Maven build system etc.
I'm just creating a maven project of type quickstart. My situation: only the sub-module folder, no iml file of the parent project, all files of the parent project are gone. If I create a new Empty Project, can't I batch import 100 maven submodules? Do you want to import them one by one? I'm just creating a maven project of type quickstart. My situation: only the sub-module folder, no iml file of the parent project, all files of the parent project are gone. If I create a new Empty Project, can't I batch import 100 maven submodules? Do you want to import them one by one?
Did you ever put a pom.xml and define all the submodules in the root folder? It should be like this:
...
spring-cloud-function-dependencies
spring-cloud-function-core
spring-cloud-function-context
spring-cloud-function-web
spring-cloud-starter-function-web
spring-cloud-starter-function-webflux
spring-cloud-function-samples
spring-cloud-function-deployer
spring-cloud-function-adapters
spring-cloud-function-integration
spring-cloud-function-rsocket
spring-cloud-function-kotlin
If yes, then it will be automatically imported.
You may share a directory project structure screenshot to help us understand the issue.