So I ran into a strange problem today. I was having some issues with one of my modules in IntelliJ so I decided I should try blowing it out and rebuilding it from a fresh checkout. I deleted the module from the Project window and then deleted / redownloaded from my file system.
I went back to Intellij and tried importing the module. It took me through the normal steps of selecting options and then seemed to succeed. Only it didn't reappear in my projects window.
I'm not sure what I did, but recreating the whole project isn't an option at this point. I'm hoping someone can shine some light on why Intellij is angry with me.
System Specs: Mac OSX Mountain Lion IntelliJ 12.1.4
Using IntelliJ 2016.5, to remove a Maven module and it's underlying source code and remove it as a sub-module from the parent, go to the Project Files tab, find the unwanted module and use the triangle symbol to open it, then delete the entry that represents it on disk.
In the Gradle tool window, right-click your main project and from the context menu select Composite Build Configuration. In the Gradle Project Build Composite dialog, select projects that you want to include in your Gradle composite build. Re-import your main Gradle project.
Import an existing moduleFrom the main menu, select File | New | Module from Existing Sources. In the dialog that opens, specify the path the . iml file of the module that you want to import, and click Open. By doing so, you are attaching another module to the project without physically moving any files.
If this is a Gradle module, please check the .idea project folder there is a gradle.xml
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$/xxx" />
<option name="gradleHome" value="/opt/gradle/gradle-2.13" />
......
</GradleProjectSettings>
you should remove this entry and try to reimport your module
I am using Intellij Idea 2016.1.3, Mac OSX El Capitan 10.11.5
I also had this problem with an SBT module. You can remove the offending module by going to the SBT tool window, right clicking on the module and selecting "Detach external project".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With