I had a project with small code sample snippets, grouped by modules, like this:
Each module has individual POM file and no (apparently) global one.
Previously I had one more module, called Wikidata
. At some moment IntelliJ said, that this module was "removed from Maven structure" and suggested to removed from project too. I agreed and now it is gone. It is still on disk in separate folder.
My questions are
How to put module back?
What was that "maven structure", from which module was removed and how to control this structure?
With regard to the maven structure. It seems that you removed the modules from one of the pom.xml files that was using it and then IntelliJ saw this and suggested that since you're no longer building these files, then perhaps you'd like to remove them.
Maybe combine this with Craigs answer.
In your .idea
directory you can find a modules.xml
file. Open it and just add
<module fileurl="file://$PROJECT_DIR$/path_to_your_project/your_project.iml" filepath="$PROJECT_DIR$/path_to_your_project/your_project.iml" />
to the modules
-element. After this the module is marked with the blue square again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.