I have a really strange problem with intellij-idea. When running some main function in my java program intellij creates a directory called out
to store the class files along with a few other things.
the directory it creates has the following structure
<PROJECT_ROOT>/out/production/<PROJECT_NAME>/
nothing weird there, HOWEVER, when I run the program inside intellij again, it creates an NEW out
directory with the same structure inside the directory so the result is as follows
<PROJECT_ROOT>/out/production/<PROJECT_NAME>/out/production/<PROJECT_NAME>/
then if I run it again it nests ANOTHER one!
<PROJECT_ROOT>/out/production/<PROJECT_NAME>/out/production/<PROJECT_NAME>/out/production/<PROJECT_NAME>/
and so on...
This is incredibly frustrating behavior to say the least. i thought it might be my environment (Windows) so I set the project on my linux box, and observed the same behavior. I did clone this project from a git repo but I dont think that would be the cause. I have noticed the same behavior in different projects i have cloned as well.
My next step is to create two entirely differnt projects from scratch in each environment and see if I can reproduce the problem that way. I will update this post with results once I have tried that along with anything else I try, but I thought i would post here while I continue trouble shooting just in case anyone else has seen this behavior and knows a solution.
i will keep this updated as I go. Any "idea" (see what I did there ;) or suggestions are appreciated!
UPDATE creating a hello world prog from scratch on the linux box did not reproduce the behavior.
UPDATE creating a hello world prog from scratch on the Windows box did not reproduce the behavior.
The . idea folder (hidden on OS X) in the solution root contains IntelliJ's project specific settings files. These include per-project details such as VCS mapping and run and debug configurations, as well as per-user details, such as currently open files, navigation history and currently selected configuration.
To change settings of a module that hosts the file you are currently editing, just press Alt+F1, 7 or open the View menu, select Select In and click Project Structure. IntelliJ IDEA will open the Project Structure dialog and jump to the required module.
Project settings are stored in the project directory as a set of XML files under the . idea folder.
I was able to reproduce this. When the base module is also the src root, IntelliJ will behave this way. If you unmark the base module as src root, and then create a src directory to put your source files in, you will notice that on the next compile that whole directory structure gets blown away and IntelliJ goes back to behaving sensibly.
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